VLC HTTP requests

From VideoLAN Wiki
Revision as of 07:23, 31 January 2019 by DoesItReallyMatter (talk | contribs) (→‎Full command list: Reference at Wikipedia about URL encoding)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There is a set of remote-control commands for VLC over HTTP.

This is probably the most convenient and reliable interface for developers to use to control VLC.

The commands ARE listed - but the list is tucked away in a README file, in the http subfolder of the little HTTP server under the VLC executables folder.

How the Commands & Status Queries Work

The commands below are all applied by submitting an HTTP-GET for one of the XML files stored in the VLC http/requests folder. For example, VLC will report back the current playlist when you submit a MRL of the form     (that is for a VLC which was started, listening on port 9090). 


will report back the player status. Commands TO the player are sent by appending a trailing command parameter (following a '?' separator) to this latter status query command.







By the bye: to start VLC's control HTTPD service on a specific port, use the syntax

 vlc --intf http --http-host

Full command list

HERE IS the FULL http-remote-control command list (as listed in README.txt in the VLC http subfolder) :-

Commands available through the requests/ path:

Lines starting with < describe what the page sends back

Lines starting with > describe what you can send to the page

All parameters need to be URL encoded. Examples:

# -> %23
% -> %25
+ -> %2B
space -> +


< Get VLC status information, current item info and meta.

> add <mrl> to playlist and start playback:


> add <mrl> to playlist:


> play playlist item <id>:


NB: ?command=pl_play also works (no ID needed).

> toggle pause. If current state was 'stop', play item <id>:


NB: ?command=pl_pause NB: seems largely ignored ? stream often continues. (May depend on whether camera obeys pause command - NB this command may only cause a PAUSE to be sent out to the video stream source, so result will depend on whether source obeys.)

> stop playback:

                           NB:   seems not to clear the playlist.    If in doubt clear the playlist and reload to start.

> jump to next item:


> jump to previous item:


> delete item <id> from playlist:


> empty playlist:


> sort playlist using sort mode <val> and order <id>:

 If id=0 then items will be sorted in normal order, if id=1 they will be
 sorted in reverse order
 A non exhaustive list of sort modes:
   0 Id
   1 Name
   3 Author
   5 Random
   7 Track number

> toggle random playback:


> toggle loop:


> toggle repeat:


> toggle enable service discovery module <val>:

 Typical values are:

> toggle fullscreen:


> set volume level to <val> (can be absolute integer, percent or +/- relative value):

 Allowed values are of the form:
   +<int>, -<int>, <int> or <int>%

> seek to <val>:

 Allowed values are of the form:
   [+ or -][<int><H or h>:][<int><M or m or '>:][<int><nothing or S or s or ">]
   or [+ or -]<int>%
   (value between [ ] are optional, value between < > are mandatory)
   1000 -> seek to the 1000th second
   +1H:2M -> seek 1 hour and 2 minutes forward
   -10% -> seek 10% back


< get the full playlist tree


< ?dir=<dir>

> get <dir>'s filelist


< get the full list of VLM elements


< execute VLM command <cmd>


> get the error message from <cmd>