Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

VLC HTTP Command list and quick demo.


  • Please log in to reply
No replies to this topic
specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Edit, I've turned this into a function library that is much easier to use.
http://www.autohotke...pic.php?t=69150

Merry Christmas Everyone. :D

After several days of searching for the correct codes for controlling VLC Media player with the HTTP interface I finally gathered enough information to start piecing them together. It's almost like they don't want anyone to have this information, I searched the web and found dozens post asking for it but not one that showed an example. I decided to post these so if your like me and can't quite decipher the instructions that assume you are a programing expert, you don't have so spend days piecing it together.

C:\Program Files\VideoLAN\VLC\http\ ; Location of index.html on my computer and
http://127.0.0.1:8080 ; host and port set in my VLC http interface options.

UrlDownloadToFile, http://127.0.0.1:8080/?control=play, trashfile ;Example of complete control cmd.
UrlDownloadToFile, http://127.0.0.1:8080/requests/status.xml?command=volume&val=`%2B10.24,  trashfile ; 
;Example of complete request cmd.  %2B is an html "+", Remove the "`" if not using in AHK.

Transport
http://127.0.0.1:8080/?control=pause
http://127.0.0.1:8080/?control=play
http://127.0.0.1:8080/?control=stop
http://127.0.0.1:8080/?control=fullscreen ;Togle
http://127.0.0.1:8080/?control=next
http://127.0.0.1:8080/?control=previous
http://127.0.0.1:8080/requests/status.xml?command=seek&val=-3 ;Jump back 3 sec
http://127.0.0.1:8080/requests/status.xml?command=seek&val=`%2B3 ;Jump forward 3sec

Volume
http://127.0.0.1:8080/requests/status.xml?command=volume&val=`%2B10.24 ;Volume +4 approximately
http://127.0.0.1:8080/requests/status.xml?command=volume&val=-10.24 ;Volume -4 approximately
;Either the decimal isn't being received or my math is wrong, it should be 100 steps.

More commands are available in the vlc http folder requests/readme.txt.
The first two line are what is to be entered into the VLC Tools-Preferences-All-Interface-Main Interfaces-HTTP page. The interface needs to be selected on the Main Interfaces page. This points to the folder on my computer, while studying this I read of several different "Default" locations VLC installs these folders. I'm guessing it changes with new version but be sure to find your folder with the index.html file in it.

And here is a clickable virtual remote control that I threw together to test these commands.
http://www.millerpro...lick-remote.zip
I have not found an actual "Mute" command in the HTTP interface so I just stored the current volume to a variable and set the volume to 0. When you click mute again it returns it to what is in the variable. The text file which holds the retrieved volume status wasn't updating correctly so I'm sending the commands twice to get it to update.

If anyone is interested I'll add more commands as I sort them out.

One note, I started out trying to use the RC interface but couldn't work that out. I think it should be very close to this but if anyone can show me how that works I would appreciate it.