Difference between revisions of "Documentation:Alternative Interfaces"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Modify sortkey)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Outdated}}
 
{{RightMenu|Documentation TOC}}
 
{{RightMenu|Documentation TOC}}
 
== The HTTP interface ==
 
== The HTTP interface ==
Line 4: Line 5:
 
VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface.  
 
VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface.  
  
To start VLC with the HTTP interface, use:  
+
To start VLC with the [[HTTP interface]], use:  
  
  % '''vlc -I http [--http-src /directory/] [--http-host host:port]'''
+
  {{%}} '''vlc -I http [--http-src /directory/] [--http-host host:port]'''
  
 
If you want to have both the "normal" interface and the HTTP interface, use '''vlc --extraintf http'''.  
 
If you want to have both the "normal" interface and the HTTP interface, use '''vlc --extraintf http'''.  
  
The HTTP interface will start listening at host:port (<all interfaces>:8080 if omitted), and will reproduce the structure of /directory at http://host:port/ ( vlc_source_path/share/http if omitted ).  
+
The HTTP interface will start listening at host:port (&lt;all interfaces&gt;:8080 if omitted), and will reproduce the structure of /directory at <nowiki>http://host:port/</nowiki> ( vlc_source_path/share/http if omitted ).  
  
Use a browser to go to http://your_host_machine:port. You should be taken to the main page.  
+
Use a browser to go to <nowiki>http://your_host_machine:port</nowiki>. You should be taken to the main page.  
  
 
VLC is shipped with a set of files that should be enough for generic needs. It is also possible to customize pages. See [[Documentation:Play HowTo/Building Pages for the HTTP Interface]].  
 
VLC is shipped with a set of files that should be enough for generic needs. It is also possible to customize pages. See [[Documentation:Play HowTo/Building Pages for the HTTP Interface]].  
Line 18: Line 19:
 
Available pages for 1.0.3&nbsp;:  
 
Available pages for 1.0.3&nbsp;:  
  
*http://host:port - Main Interface  
+
* <nowiki>http://host:port</nowiki> - Main Interface  
*http://host:port/vlm.html - VLM Interface  
+
* <nowiki>http://host:port/vlm.html</nowiki> - VLM Interface  
*http://host:port/mosaic.html - Mosaic Wizard  
+
* <nowiki>http://host:port/mosaic.html</nowiki> - Mosaic Wizard  
*http://host:port/flash.html - Flash based remote playback
+
* <nowiki>http://host:port/flash.html</nowiki> - Flash based remote playback
 
 
=== HTTP Requests ====
 
 
 
 
 
'''ADDENDUM - HTTP COMMAND LIST
 
 
 
COMMANDS WHICH MAY BE USED OVER THE HTTP REMOTE-CONTROL PORT'''
 
 
 
There is a fulsome set of remote-control commands for VLC which are for some reason not documented on the site - hence I have added them here.  This seems the most convenient and reliable interface for developers to use.  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 URL of the form
 
 
 
  http://127.0.0.1:9090/requests/playlist.xml    (that is for a VLC which was started, listening on port 9090).
 
 
 
Similarly, 
 
 
 
  http://127.0.0.1:9090/requests/status.xml
 
 
 
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. 
 
 
 
A few examples:
 
 
 
SHOW CURRENT PLAYLIST:
 
  http://127.0.0.1:9090/requests/playlist.xml
 
 
 
SHOW STATUS:
 
  http://127.0.0.1:9090/requests/status.xml
 
 
 
STOP
 
  http://127.0.0.1:9090/requests/status.xml?command=pl_stop
 
 
 
CLEAR PLAYLIST
 
  http://127.0.0.1:9090/requests/status.xml?command=pl_empty
 
 
 
PLAY AN RTSP STREAM URL: 
 
  http://127.0.0.1:9090/requests/status.xml?command=in_play&input=rtsp://user:pass@somewebcameraaddress.com:9552/cam1/mpeg4
 
 
 
 
 
By the bye: to start VLC's control HTTPD service on a specific port, use the syntax
 
 
 
  vlc --intf http --http-host 10.1.1.156:9090
 
 
 
 
 
 
 
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 -> +
 
...
 
 
 
'''status.xml:'''
 
 
 
< Get VLC status information, current item info and meta.
 
 
 
> add <mrl> to playlist and start playback:
 
  ?command=in_play&input=<mrl>
 
 
 
> add <mrl> to playlist:
 
  ?command=in_enqueue&input=<mrl>
 
 
 
> play playlist item <id>:
 
  ?command=pl_play&id=<id>
 
 
 
 
 
NB:  ?command=pl_play      also works  (no ID needed).
 
 
 
 
 
> toggle pause. If current state was 'stop', play item <id>:
 
  ?command=pl_pause&id=<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:
 
  ?command=pl_stop
 
                            NB:  seems not to clear the playlist.    If in doubt clear the playlist and reload to start.
 
 
 
 
 
> jump to next item:
 
  ?command=pl_next
 
 
 
> jump to previous item:
 
  ?command=pl_previous
 
 
 
> delete item <id> from playlist:
 
  ?command=pl_delete&id=<id>
 
 
 
> empty playlist:
 
  ?command=pl_empty
 
 
 
> sort playlist using sort mode <val> and order <id>:
 
  ?command=pl_sort&id=<id>&val=<val>
 
  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:
 
  ?command=pl_random
 
 
 
> toggle loop:
 
  ?command=pl_loop
 
 
 
> toggle repeat:
 
  ?command=pl_repeat
 
 
 
> toggle enable service discovery module <val>:
 
  ?command=pl_sd&val=<val>
 
  Typical values are:
 
    sap
 
    shoutcast
 
    podcast
 
    hal
 
 
 
> toggle fullscreen:
 
  ?command=fullscreen
 
 
 
> set volume level to <val> (can be absolute integer, percent or +/- relative value):
 
  ?command=volume&val=<val>
 
  Allowed values are of the form:
 
    +<int>, -<int>, <int> or <int>%
 
 
 
> seek to <val>:
 
  ?command=seek&val=<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)
 
  examples:
 
    1000 -> seek to the 1000th second
 
    +1H:2M -> seek 1 hour and 2 minutes forward
 
    -10% -> seek 10% back
 
 
 
 
 
'''playlist.xml:'''
 
 
 
< get the full playlist tree
 
 
 
 
 
'''browse.xml:'''
 
 
 
< ?dir=<dir>
 
 
 
> get <dir>'s filelist
 
 
 
 
 
'''
 
vlm.xml:'''
 
 
 
< get the full list of VLM elements
 
 
 
 
 
'''vlm_cmd.xml:'''
 
 
 
< execute VLM command <cmd>
 
  ?command=<cmd>
 
> get the error message from <cmd>
 
 
 
  
 
== Ncurses ==
 
== Ncurses ==
Line 205: Line 31:
  
  
http://www.videolan.org/doc/play-howto/en/images/play-howto/intf-ncurses-playlist.jpg
+
https://images.videolan.org/images/documentation/play-howto/intf-ncurses-playlist.jpg
  
  
Line 214: Line 40:
 
There is also a filebrowser available for the ncurses interface in order to add playlist items. Press 'B' to use it.  
 
There is also a filebrowser available for the ncurses interface in order to add playlist items. Press 'B' to use it.  
  
http://www.videolan.org/doc/play-howto/en/images/play-howto/intf-ncurses-filebrowser.jpg
+
https://images.videolan.org/images/documentation/play-howto/intf-ncurses-filebrowser.jpg
  
 
The ncurses filebrowser  
 
The ncurses filebrowser  
Line 254: Line 80:
 
=== Gestures ===
 
=== Gestures ===
  
Gestures provide a simple mouse gestures control. TODO  
+
Gestures provide a simple [[mouse gestures]] control. TODO  
  
 
<br>  
 
<br>  
Line 260: Line 86:
 
{{Documentation}}
 
{{Documentation}}
  
[[Category:Stubs]]
+
[[Category:Control VLC|*]]

Latest revision as of 03:06, 17 February 2019

This page is outdated and information might be incorrect.
Create an account to start editing, and then click here to update this article.
VLC User Guide

Quick Start Guide
Installing VLC
History
Usage
Interface
Open Media
Audio
Video
Playback
Playlist
Subtitles
Video and Audio Filters
Snapshots
Hotkeys
Uninstalling VLC
Troubleshooting
Advanced usage
Using VLC inside a webpage
Command line
Alternative Interfaces
Misc

Appendix
Building Pages for the HTTP Interface
Format String
Building Lua Playlist Scripts
View this alone

The HTTP interface

VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface.

To start VLC with the HTTP interface, use:

% vlc -I http [--http-src /directory/] [--http-host host:port]

If you want to have both the "normal" interface and the HTTP interface, use vlc --extraintf http.

The HTTP interface will start listening at host:port (<all interfaces>:8080 if omitted), and will reproduce the structure of /directory at http://host:port/ ( vlc_source_path/share/http if omitted ).

Use a browser to go to http://your_host_machine:port. You should be taken to the main page.

VLC is shipped with a set of files that should be enough for generic needs. It is also possible to customize pages. See Documentation:Play HowTo/Building Pages for the HTTP Interface.

Available pages for 1.0.3 :

  • http://host:port - Main Interface
  • http://host:port/vlm.html - VLM Interface
  • http://host:port/mosaic.html - Mosaic Wizard
  • http://host:port/flash.html - Flash based remote playback

Ncurses

This is a text interface, using ncurses library.

Start VLC with -I ncurses or --extraintf ncurses. You will then get something like that:


intf-ncurses-playlist.jpg


The ncurses interface

Press h to get the list of all available commands, with a short description.

There is also a filebrowser available for the ncurses interface in order to add playlist items. Press 'B' to use it.

intf-ncurses-filebrowser.jpg

The ncurses filebrowser

You can set the filebrowser starting point by launching vlc with the --browse-dir option:

% vlc -I ncurses --browse-dir /filebrowser/starting/point/

Other control interfaces

VLC includes a number of so-called interfaces that are not really interfaces, but means of controlling VLC. Nevertheless, they are enabled by setting them as interface or extra interface, either in the Preferences, in General/Interface, or using -I or --extraintf on the command line.

Hotkeys

This module allows you to control VLC and playback via hotkeys. It is always enabled by default. You can use hotkeys in the video output window, you can't in the audio dummy interface.

Hotkeys can be hacked by:

% vlc --key-<function> <code>

Code is composed by modifiers keys (Alt, Shift, Ctrl, Meta,Command) separated by a dash (-) and terminated by a key (a...z, +, =, -, ',', +, <, >, `, /, ;, ', \, [, ], *, Left, Right, Up, Down, Space, Enter, F1...F12, Home, End, Menu, Esc, Page Up, Page Down, Tab, Backspace, Mouse Wheel Up and Mouse Wheel Down). Main controls are available from hotkeys, such as : fullscreen, play-pause, faster, slower, next, prev, stop, quit, vol-up, etc. (use the --longhelp option for full list of functions). For example, for binding fullscreen to Ctrl-f, run:

% vlc --key-fullscreen 'Ctrl-f' 

The list of the default hotkeys is available here.

RC, Telnet

These two interfaces allow you to control VLC from a command shell (possibly using a remote connexion or a Unix socket).

Start VLC with -I rc or --extraintf rc. When you get the Remote control interface initialized, `h' for help message, press h and Enter to get help about available commands.

To be able to remote connect to your VLC using a TCP socket (telnet-like connexion), use --rc-host your_host:port. Then, by connecting (using telnet or netcat) to the host on the given port, you will get the command shell.

To use a UNIX socket (local socket, this does not work for Windows), use --rc-unix /path/to/socket. Commands can then be passed using this UNIX socket.

The RTCI interface is an old module merged into the RC interface.

Gestures

Gestures provide a simple mouse gestures control. TODO


This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.