WiFi Audio/Video Raspberry Pi and Android

Play Wireless Audio using Raspberry Pi
This is quite easy by using VLC player.

Step:1 Download and install VLC player in your raspberry pi( I am using Raspbian OS)

First ensure you have the latest Raspbian by using following command

 sudo apt-get update 

Then install VLC
sudo apt-get vlc install
Run VLC player, go to view and select web in interface

In Linux it is not easy to get access
VLC in the latest versions uses a file called ‘.hosts’ to define which computers can access the VLC remote player. You need to open this file and edit it:
you will need to edit the hosts file:
the file is in /usr/share/vlc/lua/http/.hosts
To edit this file from the command line (making sure I have permission to save changes), I use

 cd /usr/share/vlc/lua/http/ 
sudo nano .hosts

 # Access-list for VLC HTTP interface 
# $Id$
#
# localhost
::1
127.0.0.1
# link-local addresses
#fe80::/64
# private addresses
fc00::/7
fec0::/10
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
169.254.0.0/16
#End


Then save the file.

Now this is the time to test the VLC player web interface is working or not.

Open the browser in Raspberry and type:
http://localhost:8080


If you see the above screen you are ready from Pi side.

Install VLCdirectpro from Android market and connect to the same network.

Open VLC Direct in your device

Open menu

Go to “Settings”

Click “Automatic Connection Wizard”

Click “Start”. VLC Direct will start scanning the network, looking for VLC.

That’s it! VLC Direct is now configured and ready to use!

Click “Automatic Connection Wizard”

 

For better Audio Quality refer to the following links to install Pulse Audio MPD:

Advertisements

3 comments

  1. Please make sure you are connected to your mobile and Pi in the same wireless and LAN.
    In my home I am using a wireless router which have LAN ports. Raspberry pi is connected to LAN port and Mobile is connected using WiFi.

    Like

  2. Start VLC automatic at startup

    sudo nano /etc/init.d/vlc

    vlc –extraintf http

    # vlc autostart created by Nanda
    export USER='pi'

    eval cd ~$USER

    # Check the state of the command – this'll either be start or stop
    case “$1” in
    start)
    # if it's start, then start vlc using the details below
    su $USER -c '/usr/bin/vlc –extraintf http
    echo “Starting vlc for $USER “
    ;;
    stop)
    # if it's stop, then just kill the process
    pkill Xvlc
    echo “vlc stopped”
    ;;
    *)
    echo “Usage: /etc/init.d/vlc{start|stop}”
    exit 1
    ;;
    esac
    exit 0

    Set file properties
    Once that's done make sure the file has the right propertied by typing the following:
    sudo chmod 755 /etc/init.d/vlc

    NOTE: Important to do this step every time you modify this file. I redid these steps to create the tutorial, skipped this step and couldn't VLC in on the reboot!

    Add File to startup sequence
    And now just add your file to the list of startup actions by typing the following:
    sudo update-rc.d vlc defaults

    And that should be it! Just restart, and you should be able to VLC straight in!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s