Add VLC player to run at start up

Add VLC player to run at start up

sudo nano /etc/init.d/vlc

Copy and paste the following code in the editor

# 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
# if it's start, then start vlc using the details below
su $USER -c '/usr/bin/vlc --extraintf http
echo "Starting vlc for $USER "
# if it's stop, then just kill the process
pkill Xvlc
echo "vlc stopped"
echo "Usage: /etc/init.d/vlc{start|stop}"
exit 1
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!

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
# link-local addresses
# private addresses

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:

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: