Ubuntu - Control VLC from Browser


This post will show you how to allow your vlc player in ubuntu to be controlled through your browser on another device. This is convinient as it allows you to use your smartphone or tablet (android or iphone equivalent) to fully control vlc (change the volume, pause, play, change file, etc).

Demonstration Of Final Result


Open the hosts configuration file for vlc on the device that will be playing media.
sudo gedit /usr/share/vlc/lua/http/.hosts
Uncomment the file so it looks like the one below:
Open your terminal and run the following command to open vlc in a mode that starts the http server that it comes with (you dont have to do anything extra).
vlc --extraintf http &
Press return/enter and then close the terminal (I'm not sure why, but if I close the terminal immediately without hitting enter, then closing the terminal also closes vlc.)
On the device that you wish you control the playback device with, navigate your browser to the ip of the vlc playing machine but with :8080 at the end for the port. For example this could be something like ''. (To find out the device's ip address you may want to run the ifconfig command in the terminal and use the ip next to the relevant device, ie next to wlan if you are using wireless or eth0 if you are using a lan connection)
If all goes well then you should have a browser that looks like below:
Congratulations that was it, you now have control over your vlc application through the browser. You can now navigate your media player's filesystem using the browser and play a video.


No comments:

Post a Comment