<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gth</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gth"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Gth/"/>
	<updated>2026-11-04T18:21:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation_Talk:Streaming_HowTo_New&amp;diff=22556</id>
		<title>Documentation Talk:Streaming HowTo New</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation_Talk:Streaming_HowTo_New&amp;diff=22556"/>
		<updated>2012-04-26T22:54:10Z</updated>

		<summary type="html">&lt;p&gt;Gth: Suggestion to remove the &amp;#039;new&amp;#039; version...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New page? ==&lt;br /&gt;
It&#039;s rather a mixed message to have this &#039;new&#039; version of the page.  Is there a list of what remains to be added/updated so we can remove this confusion? --[[User:Gth|Gth]] 00:54, 27 April 2012 (CEST)&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo_New&amp;diff=22555</id>
		<title>Documentation:Streaming HowTo New</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo_New&amp;diff=22555"/>
		<updated>2012-04-26T22:45:05Z</updated>

		<summary type="html">&lt;p&gt;Gth: /* More Links */ Link was incorrect; moved to &amp;quot;See Also&amp;quot; and corrected.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This documentation explains how to stream, transcode and save streams using [[VLC media player]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: This is work in progress. For a more complete, yet outdated, documentation on Streaming with VLC please see the old [[Documentation:Streaming HowTo|Streaming HowTo]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
VLC media player is able to stream, transcode and save different media streams. For more information about the formats and codecs supported please see the [http://www.videolan.org/streaming-features.html VideoLAN Streaming Features list].&lt;br /&gt;
&lt;br /&gt;
==Transcoding==&lt;br /&gt;
[[Transcode|Transcoding]] is the process of taking a media file or stream and converting it to a different format or bitrate. There are two methods for transcoding in VLC, via the GUI (VLC&#039;s default interface) or via the commandline. The term &#039;&#039;transcode&#039;&#039; by itself normally refers to converting one media format to another and saving the output to a file (i.e. no streaming involved).&lt;br /&gt;
&lt;br /&gt;
===Transcoding using the GUI===&lt;br /&gt;
One of the methods of transcoding is via the GUI. To access this:&lt;br /&gt;
#In VLC, go to &amp;quot;Media &amp;gt;&amp;gt; Convert / Save...&amp;quot; (Ctrl+R).&lt;br /&gt;
#Add the input file(s) or stream(s) you want to transcode. Press &amp;quot;Convert / Save&amp;quot;.&lt;br /&gt;
#In the &amp;quot;Convert&amp;quot; windows specify the destination file name (including file extension - e.g. on Windows &amp;quot;C:\out.mp3&amp;quot;).&lt;br /&gt;
#Select the desired codec from the profile list. To check/edit the settings of a given profile press the &amp;quot;Edit selected profile&amp;quot; button. Profiles can also be added/deleted.&lt;br /&gt;
#Press &amp;quot;Start&amp;quot;.&lt;br /&gt;
If the profile settings were compatible and transcoding was sucessful a playable destination file should be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Basic_interface_convert.png]]&lt;br /&gt;
&lt;br /&gt;
===Using the commandline===&lt;br /&gt;
Another method of transcoding is via the commandline. This is more flexible than via the GUI as it enables full usage of the modules and options available in VLC.&lt;br /&gt;
&lt;br /&gt;
To use the VLC&#039;s commandline you need to have access to the commandline interface, for example via a shell.&lt;br /&gt;
====Windows-based systems====&lt;br /&gt;
On Windows-based system Command Prompt can be used. This can be found in the &amp;quot;Accessories&amp;quot; folder of the Start menu. Alternatively by going to &amp;quot;Start &amp;gt;&amp;gt; Run...&amp;quot; or pressing &amp;quot;Windows key + R&amp;quot;, entering &amp;quot;cmd&amp;quot; into the text field and press &amp;quot;OK&amp;quot; or Enter.&lt;br /&gt;
&lt;br /&gt;
Once the Command Prompt window is opened navigating to the folder/directory where VLC is located is easiest for using the commandline as only &amp;quot;vlc.exe&amp;quot; or &amp;quot;vlc&amp;quot; (as the .exe part is assumed) needs to entered to run VLC. If VLC is installed in the default location (on a 32-bit system) running:&lt;br /&gt;
 cd &amp;quot;C:\Program Files\VideoLAN\VLC&amp;quot;&lt;br /&gt;
Should change to the directory where vlc.exe is located.&lt;br /&gt;
&lt;br /&gt;
====Unix systems====&lt;br /&gt;
On Unix-based system (such as Linux and Mac OS X) a terminal window can be opened. Running &amp;quot;vlc&amp;quot; should be all that is needed to open VLC.&lt;br /&gt;
&lt;br /&gt;
====Transcoding commandline string structure====&lt;br /&gt;
A typical commandline string for converting a file to another format is:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{[TRANSCODE_OPTIONS]}:std{[OUTPUT_OPTIONS]}&amp;quot; INPUT&lt;br /&gt;
Where &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt; is the input stream, &amp;lt;tt&amp;gt;[TRANSCODE_OPTIONS]&amp;lt;/tt&amp;gt; are the options set for the desired output format, codecs, bitrate etc. and &amp;lt;tt&amp;gt;[OUTPUT_OPTIONS]&amp;lt;/tt&amp;gt; are the option set for the output type. &amp;lt;tt&amp;gt;--sout&amp;lt;/tt&amp;gt; is the stream output commandline option.&lt;br /&gt;
&lt;br /&gt;
====Example commandline: Converting an audio file to a MP3 file====&lt;br /&gt;
An example usage might be converting an audio file to a MP3 file:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=file,mux=raw,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
Where INPUT is the input file ans OUTPUT is the destination file (for example &amp;quot;C:\out.mp3&amp;quot; on Windows or &amp;quot;/home/username/out.mp3&amp;quot; on a *nix system).&lt;br /&gt;
The above sout string is the default &amp;quot;Audio - MP3&amp;quot; profile setting accessible via the GUI. It will convert an audio input to a 128kbps CBR MP3 file (sample rate 44100Hz, 2 channels).&lt;br /&gt;
====Other examples commandline strings====&lt;br /&gt;
Convert an audio input to an uncompressed WAVE (*.wav) file:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=s16l,channels=2,samplerate=44100}:std{access=file,mux=wav,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
Convert an audio input to an AAC file (MP4 container):&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
&lt;br /&gt;
==Streaming==&lt;br /&gt;
&lt;br /&gt;
===Streaming using the GUI===&lt;br /&gt;
&lt;br /&gt;
Basically, to stream using the GUI, open VLC, then Media [menu] -&amp;gt; Streaming -&amp;gt; (select any media to stream, then hit Stream button).  At this point it asks you *how* to stream it.  The most common way is via HTTP.  To stream via HTTP, click on &amp;quot;Destinations&amp;quot;, choose HTTP from the drop down as a &amp;quot;New Destination&amp;quot; and click add.  Now if you are streaming video, you will want to stream to something like &amp;quot;/go.mpg.&amp;quot;  Now hit stream, and you should be able to use a different instance of VLC as a client, and listen to that stream now (ex: on the same computer it would be &amp;quot;Media&amp;quot; [menu] -&amp;gt; Open Network Stream -&amp;gt; &amp;quot;http://localhost:8080/go.mpg&amp;quot; and it should work.&lt;br /&gt;
&lt;br /&gt;
A few caveats:&lt;br /&gt;
* even though you click on &amp;quot;enable transcoding&amp;quot; and specify some other container type, it will give you the flv container type unless you use a suffix, like &amp;quot;.mpg&amp;quot; [http://forum.videolan.org/viewtopic.php?f=14&amp;amp;t=80722 ref]&lt;br /&gt;
* VLC client cannot receive a stream at less than 5 fps, though it can stream it all right for those speeds (and other players can receive it). [http://trac.videolan.org/vlc/ticket/214 ref].&lt;br /&gt;
* NB that *many* times when using the GUI to stream it will choose the wrong thing.  Like if you give a path of &amp;quot;/&amp;quot; it will use FLV container type (which you probably didn&#039;t want, and which overrides your transcoding settings&#039; container type *silently*), and if you give it &amp;quot;/go.mp4&amp;quot; it will *silently* fail (you can look at the log messages to see what the error is--it says &amp;quot;mp4 type is not supported except for files&amp;quot;).  It is tricky to get it setup.  It&#039;s like the GUI sets it up wrong most times.  Here is a [[http://forum.videolan.org/viewtopic.php?f=14&amp;amp;t=80722 laundry list]].&lt;br /&gt;
&lt;br /&gt;
First there is an input text called &#039;&#039;&#039;Source&#039;&#039;&#039;, where you&#039;ll find your media path and the its type.&lt;br /&gt;
&lt;br /&gt;
[[File:VlcStream.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you&#039;ll click on Destination you&#039;ll see the destination of stream that could be: &#039;&#039;File&#039;&#039;, &#039;&#039;HTTP&#039;&#039;, &#039;&#039;MS-WSMP&#039;&#039;, &#039;&#039;RTSP&#039;&#039;, &#039;&#039;RTP/MPG&#039;&#039;, &#039;&#039;RTP, Audio/Video&#039;&#039;, &#039;&#039;UDP&#039;&#039; and &#039;&#039;Icecast&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stream-destination.png]]&lt;br /&gt;
&lt;br /&gt;
You can abilitate &#039;&#039;&#039;Transcoding&#039;&#039;&#039; to transcode your video to one in the list or in a one you can specify by clicking on the proper icon.&lt;br /&gt;
&lt;br /&gt;
Last you have the option of stream you&#039;ll share.&lt;br /&gt;
&lt;br /&gt;
[[File:Stream-option.png]]&lt;br /&gt;
&lt;br /&gt;
By clicking stream it will return to VLC main user interface and the playbar will scroll as the video will play.&lt;br /&gt;
&lt;br /&gt;
===Streaming using the command line interface===&lt;br /&gt;
&lt;br /&gt;
If you want to stream using the command line interface instead of the GUI (more control, for example you can specify your own container), you can &amp;quot;sniff&amp;quot; the options the GUI is using by opening up the logger (Tools menu -&amp;gt; message) and setting verbosity level to &amp;quot;2&amp;quot; then doing a stream.  It will output debug messages that basically tell you what it is using for command line parameters, then you will take those same parameters and use them on the command line (you may need to add quotation marks around words that have spaces in them, and you may need to add --&#039;s).&lt;br /&gt;
&lt;br /&gt;
An example is in a unique command line: &lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\VideoLAN\VLC&amp;gt;vlc &amp;quot;C:\Users\Public\Videos\Sample Videos\Wildlife.wmv&amp;quot;:&lt;br /&gt;
 sout=#transcode{vcodec=h264,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{dst=:8090/go.mpg}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Documentation:Streaming HowTo|Streaming HowTo]] - Outdated HowTo for streaming with VLC&lt;br /&gt;
* [[Transcode]] - Further information about transcoding with VLC&lt;br /&gt;
* [http://www.videolan.org/doc/vlc-user-guide/en/ch04.html VideoLAN documentation site, chapter 4]&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo_New&amp;diff=22554</id>
		<title>Documentation:Streaming HowTo New</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo_New&amp;diff=22554"/>
		<updated>2012-04-26T22:44:15Z</updated>

		<summary type="html">&lt;p&gt;Gth: /* See also */ Moved a link to this more appropriate section, and corrected it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This documentation explains how to stream, transcode and save streams using [[VLC media player]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: This is work in progress. For a more complete, yet outdated, documentation on Streaming with VLC please see the old [[Documentation:Streaming HowTo|Streaming HowTo]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
VLC media player is able to stream, transcode and save different media streams. For more information about the formats and codecs supported please see the [http://www.videolan.org/streaming-features.html VideoLAN Streaming Features list].&lt;br /&gt;
&lt;br /&gt;
==Transcoding==&lt;br /&gt;
[[Transcode|Transcoding]] is the process of taking a media file or stream and converting it to a different format or bitrate. There are two methods for transcoding in VLC, via the GUI (VLC&#039;s default interface) or via the commandline. The term &#039;&#039;transcode&#039;&#039; by itself normally refers to converting one media format to another and saving the output to a file (i.e. no streaming involved).&lt;br /&gt;
&lt;br /&gt;
===Transcoding using the GUI===&lt;br /&gt;
One of the methods of transcoding is via the GUI. To access this:&lt;br /&gt;
#In VLC, go to &amp;quot;Media &amp;gt;&amp;gt; Convert / Save...&amp;quot; (Ctrl+R).&lt;br /&gt;
#Add the input file(s) or stream(s) you want to transcode. Press &amp;quot;Convert / Save&amp;quot;.&lt;br /&gt;
#In the &amp;quot;Convert&amp;quot; windows specify the destination file name (including file extension - e.g. on Windows &amp;quot;C:\out.mp3&amp;quot;).&lt;br /&gt;
#Select the desired codec from the profile list. To check/edit the settings of a given profile press the &amp;quot;Edit selected profile&amp;quot; button. Profiles can also be added/deleted.&lt;br /&gt;
#Press &amp;quot;Start&amp;quot;.&lt;br /&gt;
If the profile settings were compatible and transcoding was sucessful a playable destination file should be created.&lt;br /&gt;
&lt;br /&gt;
[[File:Basic_interface_convert.png]]&lt;br /&gt;
&lt;br /&gt;
===Using the commandline===&lt;br /&gt;
Another method of transcoding is via the commandline. This is more flexible than via the GUI as it enables full usage of the modules and options available in VLC.&lt;br /&gt;
&lt;br /&gt;
To use the VLC&#039;s commandline you need to have access to the commandline interface, for example via a shell.&lt;br /&gt;
====Windows-based systems====&lt;br /&gt;
On Windows-based system Command Prompt can be used. This can be found in the &amp;quot;Accessories&amp;quot; folder of the Start menu. Alternatively by going to &amp;quot;Start &amp;gt;&amp;gt; Run...&amp;quot; or pressing &amp;quot;Windows key + R&amp;quot;, entering &amp;quot;cmd&amp;quot; into the text field and press &amp;quot;OK&amp;quot; or Enter.&lt;br /&gt;
&lt;br /&gt;
Once the Command Prompt window is opened navigating to the folder/directory where VLC is located is easiest for using the commandline as only &amp;quot;vlc.exe&amp;quot; or &amp;quot;vlc&amp;quot; (as the .exe part is assumed) needs to entered to run VLC. If VLC is installed in the default location (on a 32-bit system) running:&lt;br /&gt;
 cd &amp;quot;C:\Program Files\VideoLAN\VLC&amp;quot;&lt;br /&gt;
Should change to the directory where vlc.exe is located.&lt;br /&gt;
&lt;br /&gt;
====Unix systems====&lt;br /&gt;
On Unix-based system (such as Linux and Mac OS X) a terminal window can be opened. Running &amp;quot;vlc&amp;quot; should be all that is needed to open VLC.&lt;br /&gt;
&lt;br /&gt;
====Transcoding commandline string structure====&lt;br /&gt;
A typical commandline string for converting a file to another format is:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{[TRANSCODE_OPTIONS]}:std{[OUTPUT_OPTIONS]}&amp;quot; INPUT&lt;br /&gt;
Where &amp;lt;tt&amp;gt;INPUT&amp;lt;/tt&amp;gt; is the input stream, &amp;lt;tt&amp;gt;[TRANSCODE_OPTIONS]&amp;lt;/tt&amp;gt; are the options set for the desired output format, codecs, bitrate etc. and &amp;lt;tt&amp;gt;[OUTPUT_OPTIONS]&amp;lt;/tt&amp;gt; are the option set for the output type. &amp;lt;tt&amp;gt;--sout&amp;lt;/tt&amp;gt; is the stream output commandline option.&lt;br /&gt;
&lt;br /&gt;
====Example commandline: Converting an audio file to a MP3 file====&lt;br /&gt;
An example usage might be converting an audio file to a MP3 file:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access=file,mux=raw,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
Where INPUT is the input file ans OUTPUT is the destination file (for example &amp;quot;C:\out.mp3&amp;quot; on Windows or &amp;quot;/home/username/out.mp3&amp;quot; on a *nix system).&lt;br /&gt;
The above sout string is the default &amp;quot;Audio - MP3&amp;quot; profile setting accessible via the GUI. It will convert an audio input to a 128kbps CBR MP3 file (sample rate 44100Hz, 2 channels).&lt;br /&gt;
====Other examples commandline strings====&lt;br /&gt;
Convert an audio input to an uncompressed WAVE (*.wav) file:&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=s16l,channels=2,samplerate=44100}:std{access=file,mux=wav,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
Convert an audio input to an AAC file (MP4 container):&lt;br /&gt;
 vlc --sout &amp;quot;#transcode{acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=OUTPUT}&amp;quot; INPUT&lt;br /&gt;
&lt;br /&gt;
==Streaming==&lt;br /&gt;
&lt;br /&gt;
===Streaming using the GUI===&lt;br /&gt;
&lt;br /&gt;
Basically, to stream using the GUI, open VLC, then Media [menu] -&amp;gt; Streaming -&amp;gt; (select any media to stream, then hit Stream button).  At this point it asks you *how* to stream it.  The most common way is via HTTP.  To stream via HTTP, click on &amp;quot;Destinations&amp;quot;, choose HTTP from the drop down as a &amp;quot;New Destination&amp;quot; and click add.  Now if you are streaming video, you will want to stream to something like &amp;quot;/go.mpg.&amp;quot;  Now hit stream, and you should be able to use a different instance of VLC as a client, and listen to that stream now (ex: on the same computer it would be &amp;quot;Media&amp;quot; [menu] -&amp;gt; Open Network Stream -&amp;gt; &amp;quot;http://localhost:8080/go.mpg&amp;quot; and it should work.&lt;br /&gt;
&lt;br /&gt;
A few caveats:&lt;br /&gt;
* even though you click on &amp;quot;enable transcoding&amp;quot; and specify some other container type, it will give you the flv container type unless you use a suffix, like &amp;quot;.mpg&amp;quot; [http://forum.videolan.org/viewtopic.php?f=14&amp;amp;t=80722 ref]&lt;br /&gt;
* VLC client cannot receive a stream at less than 5 fps, though it can stream it all right for those speeds (and other players can receive it). [http://trac.videolan.org/vlc/ticket/214 ref].&lt;br /&gt;
* NB that *many* times when using the GUI to stream it will choose the wrong thing.  Like if you give a path of &amp;quot;/&amp;quot; it will use FLV container type (which you probably didn&#039;t want, and which overrides your transcoding settings&#039; container type *silently*), and if you give it &amp;quot;/go.mp4&amp;quot; it will *silently* fail (you can look at the log messages to see what the error is--it says &amp;quot;mp4 type is not supported except for files&amp;quot;).  It is tricky to get it setup.  It&#039;s like the GUI sets it up wrong most times.  Here is a [[http://forum.videolan.org/viewtopic.php?f=14&amp;amp;t=80722 laundry list]].&lt;br /&gt;
&lt;br /&gt;
First there is an input text called &#039;&#039;&#039;Source&#039;&#039;&#039;, where you&#039;ll find your media path and the its type.&lt;br /&gt;
&lt;br /&gt;
[[File:VlcStream.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you&#039;ll click on Destination you&#039;ll see the destination of stream that could be: &#039;&#039;File&#039;&#039;, &#039;&#039;HTTP&#039;&#039;, &#039;&#039;MS-WSMP&#039;&#039;, &#039;&#039;RTSP&#039;&#039;, &#039;&#039;RTP/MPG&#039;&#039;, &#039;&#039;RTP, Audio/Video&#039;&#039;, &#039;&#039;UDP&#039;&#039; and &#039;&#039;Icecast&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Stream-destination.png]]&lt;br /&gt;
&lt;br /&gt;
You can abilitate &#039;&#039;&#039;Transcoding&#039;&#039;&#039; to transcode your video to one in the list or in a one you can specify by clicking on the proper icon.&lt;br /&gt;
&lt;br /&gt;
Last you have the option of stream you&#039;ll share.&lt;br /&gt;
&lt;br /&gt;
[[File:Stream-option.png]]&lt;br /&gt;
&lt;br /&gt;
By clicking stream it will return to VLC main user interface and the playbar will scroll as the video will play.&lt;br /&gt;
&lt;br /&gt;
===Streaming using the command line interface===&lt;br /&gt;
&lt;br /&gt;
If you want to stream using the command line interface instead of the GUI (more control, for example you can specify your own container), you can &amp;quot;sniff&amp;quot; the options the GUI is using by opening up the logger (Tools menu -&amp;gt; message) and setting verbosity level to &amp;quot;2&amp;quot; then doing a stream.  It will output debug messages that basically tell you what it is using for command line parameters, then you will take those same parameters and use them on the command line (you may need to add quotation marks around words that have spaces in them, and you may need to add --&#039;s).&lt;br /&gt;
&lt;br /&gt;
An example is in a unique command line: &lt;br /&gt;
&lt;br /&gt;
 C:\Program Files\VideoLAN\VLC&amp;gt;vlc &amp;quot;C:\Users\Public\Videos\Sample Videos\Wildlife.wmv&amp;quot;:&lt;br /&gt;
 sout=#transcode{vcodec=h264,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{dst=:8090/go.mpg}&lt;br /&gt;
&lt;br /&gt;
=== More Links ===&lt;br /&gt;
The [http://www.videolan.org/doc/videolan-howto/en/ch04.html Documentation chapter 4].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Documentation:Streaming HowTo|Streaming HowTo]] - Outdated HowTo for streaming with VLC&lt;br /&gt;
* [[Transcode]] - Further information about transcoding with VLC&lt;br /&gt;
* [http://www.videolan.org/doc/vlc-user-guide/en/ch04.html VideoLAN documentation site, chapter 4]&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:VideoLAN_Design&amp;diff=22552</id>
		<title>Talk:VideoLAN Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Talk:VideoLAN_Design&amp;diff=22552"/>
		<updated>2012-04-25T05:59:49Z</updated>

		<summary type="html">&lt;p&gt;Gth: Question about wiki vs. the videolan doc website area&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Wiki vs. Doc pages==&lt;br /&gt;
I&#039;ve been messing with the http interface and noticed quite a variation in the information available from the videolan/doc/ area compared to wiki.videolan.org.  Is there a migration progress likely?  This discussion page seems as good as any to find out about the plans for the wiki, although I&#039;m not sure why the talk page was previously deleted.  Anyway, the wiki seems much more comprehensive and up to date - some of the http interface info in the wiki is scattered across several articles, but that&#039;s easily fixable.  Look forward to updating it, if that&#039;s going to be useful. --[[User:Gth|Gth]] 07:59, 25 April 2012 (CEST)&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation_Talk:Building_Pages_for_the_HTTP_Interface&amp;diff=22549</id>
		<title>Documentation Talk:Building Pages for the HTTP Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation_Talk:Building_Pages_for_the_HTTP_Interface&amp;diff=22549"/>
		<updated>2012-04-23T16:26:45Z</updated>

		<summary type="html">&lt;p&gt;Gth: Suggestion for some examples.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Undocumented RPN operators==&lt;br /&gt;
[[User:Teyut|Teyut]] 19:38, 15 April 2007 (CEST): I&#039;ve added informations about some RPN operators using the source code in &#039;&#039;rpn.c&#039;&#039;. However, I didn&#039;t test them all, and especially, I&#039;m not sure how &#039;&#039;&#039;vlc_get_meta&#039;&#039;&#039; and &#039;&#039;&#039;snapshot&#039;&#039;&#039; works, and I have no clue what &#039;&#039;&#039;vlm_command&#039;&#039;&#039; and &#039;&#039;&#039;services_discovery_*&#039;&#039;&#039; commands are made for. So if someone can confirm what I&#039;ve written, and give a better example for &#039;&#039;&#039;vlm_command&#039;&#039;&#039;, it would be better I think.&lt;br /&gt;
:Thanks for the help! The descriptions look ok. (except the VLM example which is kind of not using a VLM command, but I&#039;ll fix it) [[User:Dionoea|Dionoea]] 21:59, 15 April 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==Updated RPN: examples?==&lt;br /&gt;
I fixed some wiki formatting on the RPN section, but it really needs an example or two to explain how RPN works, say an example of seeking forward 20 seconds? --[[User:Gth|Gth]] 18:26, 23 April 2012 (CEST)&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Help_talk:Editing&amp;diff=22548</id>
		<title>Help talk:Editing</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Help_talk:Editing&amp;diff=22548"/>
		<updated>2012-04-23T16:16:49Z</updated>

		<summary type="html">&lt;p&gt;Gth: Question about external links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Link to Wikimedia, not Wikipedia==&lt;br /&gt;
Shouldn&#039;t the Editing Help at the foot of an &#039;Editing&#039; Page, ie. the content of this page, link to a Wikimedia page, and not to a Wikipedia page? [[User:Stq|Stq]]&lt;br /&gt;
&lt;br /&gt;
:Agreed; it&#039;s a much better editing help reference, too.  The wikipedia one has various style guides for encyclopedic referencing, etc.  I&#039;ve updated the link. --[[User:Gth|Gth]] 18:16, 23 April 2012 (CEST)&lt;br /&gt;
&lt;br /&gt;
==External Link icon==&lt;br /&gt;
Anyone else see the videolan witch-hat obscuring the last few letters of any external link in their browser? --[[User:Gth|Gth]] 18:16, 23 April 2012 (CEST)&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22547</id>
		<title>Documentation:Building Pages for the HTTP Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22547"/>
		<updated>2012-04-23T15:59:01Z</updated>

		<summary type="html">&lt;p&gt;Gth: /* RPN Introduction */ Minor reformatting of table.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation play howto toc}}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This appendix describes the language used for writing dynamic web pages for the HTTP interface.&lt;br /&gt;
&lt;br /&gt;
Pages must be placed in the share/http folder in either VLC&#039;s folder (Windows, Mac) or /usr/share/vlc/share/http or /usr/local/share/vlc/share/http (or wherever vlc&#039;s shared files are installed).&lt;br /&gt;
&lt;br /&gt;
Some files are handled a bit specially:&lt;br /&gt;
*Files beginning with &#039;.&#039; are not exported.&lt;br /&gt;
*A &#039;.access&#039; file will be opened and the http interface will expect to find at the first line a login/password (written as login:password). This login/password will be used to protect all files in this directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
* A &#039;.hosts&#039; file will be opened and the http interface will expect to find a list of network/mask pairs separated by new line, for instance 192.168.0.0/255.255.255.0. If this file is present, then the default behaviour is to deny access from hosts which don&#039;t match any of the network/mask pairs to all the files of the directory. If the file is not present, then any host has access to the files of the directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
*The file &amp;lt;dir&amp;gt;/index.html will be exported as &amp;lt;dir&amp;gt; and &amp;lt;dir&amp;gt;/ and not as index.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MIME type is set by looking at the file extension and cannot be specified nor modified for a specific file. Unknown extensions will have &amp;quot;application/octet-stream&amp;quot; as MIME type.&lt;br /&gt;
&lt;br /&gt;
You should avoid exporting big files. Each file is indeed first loaded into the memory before being sent to the client, so please be careful.&lt;br /&gt;
&lt;br /&gt;
==VLC macros==&lt;br /&gt;
&lt;br /&gt;
Each time a .html/.htm page is requested, it is parsed by VLC before being sent. The parser searches for the VLC macros, and executes or substitutes them. Moreover, URL arguments received by the GET method can be interpreted.&lt;br /&gt;
&lt;br /&gt;
A VLC macro looks like:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;macro-name&amp;quot; param1=&amp;quot;macro-parameters1&amp;quot; param2=&amp;quot;macro-parameters2&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;quot;id&amp;quot; is the only mandatory field, param1 and param2 may or may not be present and depend on the value of &amp;quot;id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You should take care that you &#039;&#039;&#039;have to&#039;&#039;&#039; respect this syntax, VLC won&#039;t like invalid syntax. (It could easily leads to crashes).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; /&amp;gt;&lt;br /&gt;
Incorrect:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; &amp;gt; (missing tag ending)&lt;br /&gt;
 &amp;lt;vlc id=value param1=&amp;quot;version&amp;quot; /&amp;gt; (missing &amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Valid macros are:&lt;br /&gt;
*&#039;&#039;&#039;control&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;include&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;get&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;set&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;rpn&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;if&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;else&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;value&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;foreach&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
&lt;br /&gt;
For powerful macros, you may use these tools:&lt;br /&gt;
&lt;br /&gt;
*RPN Evaluator (see part 2)&lt;br /&gt;
*Stacks: The stack is a place where you can push numbers and strings, and then pop them backs. It&#039;s used with the little RPN evaluator.&lt;br /&gt;
*Local variables: You can dynamically create new variables and changes their values. Some local variables are predefined:&lt;br /&gt;
**&#039;&#039;&#039;url_value&#039;&#039;&#039;: parameter of the URL&lt;br /&gt;
**&#039;&#039;&#039;url_param&#039;&#039;&#039;: 1 if url_value isn&#039;t empty else 0&lt;br /&gt;
**&#039;&#039;&#039;version&#039;&#039;&#039;: the VLC version&lt;br /&gt;
**&#039;&#039;&#039;copyright&#039;&#039;&#039;: the VLC copyright&lt;br /&gt;
**&#039;&#039;&#039;vlc_compile_time, vlc_compile_by, vlc_compile_host, vlc_compile_domain, vlc_compiler, vlc_changeset&#039;&#039;&#039;: information on the VLC build&lt;br /&gt;
**&#039;&#039;&#039;stream_position, stream_time, stream_length, stream_state&#039;&#039;&#039;: information on the currently playing stream&lt;br /&gt;
**&#039;&#039;&#039;volume&#039;&#039;&#039;: current volume setting&lt;br /&gt;
&lt;br /&gt;
Remark: The stacks, and local variables context is reset before the page is executed.&lt;br /&gt;
&lt;br /&gt;
==The RPN evaluator==&lt;br /&gt;
&lt;br /&gt;
RPN means Reverse Polish Notation.&lt;br /&gt;
&lt;br /&gt;
===RPN Introduction===&lt;br /&gt;
&lt;br /&gt;
RPN may look strange but it&#039;s a fast and easy way to write expressions. It also avoids the use of ( and ).&lt;br /&gt;
&lt;br /&gt;
Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *.&lt;br /&gt;
&lt;br /&gt;
The idea behind it is: if we have a number or a string (using &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;), push it on the stack. If it is an operator (like +),  pop the arguments from the stack, execute the operators and then push the result onto the stack. The result of the RPN sequence is the value on the top of the stack.  A step by step explanation of the sequence &#039;&#039;&#039;1 2 + 5 *&#039;&#039;&#039; is shown below, to illustrate this process:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Stack Contents&lt;br /&gt;
! Word&lt;br /&gt;
! Action taken on the stack&lt;br /&gt;
|-&lt;br /&gt;
| empty&lt;br /&gt;
| 1&lt;br /&gt;
| 1 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2 is pushed onto the stack, &#039;above&#039; 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 2&lt;br /&gt;
| +&lt;br /&gt;
| The plus operator results in removal of 1 and 2 from the stack, then write 3 onto the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 5&lt;br /&gt;
| 5 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 5&lt;br /&gt;
| *&lt;br /&gt;
| The multiplication operator removes 3 and 5 and writes 15 onto the stack.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
|&lt;br /&gt;
| Final result.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
&lt;br /&gt;
Notation: ST(1) means the first stack element, ST(2) the second one ... and op is the operator.&lt;br /&gt;
&lt;br /&gt;
You have access to :&lt;br /&gt;
&lt;br /&gt;
*Standard arithmetics operators: &#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039; these ones push the result of ST(1) op ST(2) onto the stack&lt;br /&gt;
&lt;br /&gt;
*Binary operators: &#039;&#039;&#039;!&#039;&#039;&#039; (push !ST(1)); &#039;&#039;&#039;^, &amp;amp;, |&#039;&#039;&#039;: push the result ST(1) op ST(2)&lt;br /&gt;
&lt;br /&gt;
*test: &#039;&#039;&#039;=, &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=&#039;&#039;&#039;: execute ST(1) op ST(2) and push -1 if true else 0&lt;br /&gt;
&lt;br /&gt;
*string functions:&lt;br /&gt;
**&#039;&#039;&#039;strcat&#039;&#039;&#039;: pushes the result of &#039;ST(1)ST(2)&lt;br /&gt;
**&#039;&#039;&#039;strcmp&#039;&#039;&#039;: compares ST(1) and ST(2) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strncmp&#039;&#039;&#039;: compares the first ST(1) characters of ST(2) and ST(3) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strsub&#039;&#039;&#039;: extracts characters ST(2) to ST(1) of string ST(3)&lt;br /&gt;
**&#039;&#039;&#039;strlen&#039;&#039;&#039;: pushes the length of ST(1)&lt;br /&gt;
**&#039;&#039;&#039;str_replace&#039;&#039;&#039;: replaces string ST(2) with ST(1) in ST(3)&lt;br /&gt;
**&#039;&#039;&#039;url_encode&#039;&#039;&#039;: encodes non-alphanumeric characters of ST(1) as %XX so that they can be safely passed as GET or POST variables&lt;br /&gt;
**&#039;&#039;&#039;url_extract&#039;&#039;&#039;: performs the reverse operation of url_encode&lt;br /&gt;
**&#039;&#039;&#039;addslashes&#039;&#039;&#039;: protects single quotes (&#039;) and double quotes (&amp;quot;) of ST(1) with backslashes (\) so that they can be safely passed to a VLC playlist function&lt;br /&gt;
**&#039;&#039;&#039;stripslashes&#039;&#039;&#039;: performs the reverse operation of addslashes&lt;br /&gt;
**&#039;&#039;&#039;htmlspecialchars&#039;&#039;&#039;: encodes &amp;amp;, &#039;, &amp;quot;, &amp;lt;, and &amp;gt; of ST(1) as their &amp;amp;stuff; HTML counterpart, so that they don&#039;t interact with HTML tags&lt;br /&gt;
**&#039;&#039;&#039;realpath&#039;&#039;&#039;: parses ST(1) as a filename path, and pushes an absolute path to that file, removing ~ and ../&lt;br /&gt;
&lt;br /&gt;
*stack manipulation:&lt;br /&gt;
**&#039;&#039;&#039;dup&#039;&#039;&#039;: pops ST(1) and pushes the same string twice&lt;br /&gt;
**&#039;&#039;&#039;drop&#039;&#039;&#039;: pops ST(1) and drops it&lt;br /&gt;
**&#039;&#039;&#039;swap&#039;&#039;&#039;: exchanges ST(1) and ST(2)&lt;br /&gt;
**&#039;&#039;&#039;flush&#039;&#039;&#039;: empties the stack&lt;br /&gt;
&lt;br /&gt;
*variables manipulation:&lt;br /&gt;
**&#039;&#039;&#039;store&#039;&#039;&#039;: stores ST(2) in a local variable named ST(1)&lt;br /&gt;
**&#039;&#039;&#039;value&#039;&#039;&#039;: pushes the value of the local variable named ST(1)&lt;br /&gt;
&lt;br /&gt;
*player control:&lt;br /&gt;
**&#039;&#039;&#039;vlc_play&#039;&#039;&#039;: plays the playlist item whose ID is ST(1), and pushes the return value of the play function (0 in case of success); see playlist functions below&lt;br /&gt;
**&#039;&#039;&#039;vlc_stop&#039;&#039;&#039;: stops the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_pause&#039;&#039;&#039;: pauses the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_next&#039;&#039;&#039;: plays the next playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_previous&#039;&#039;&#039;: plays the previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_seek&#039;&#039;&#039;: seeks the current input to a location defined in ST(1), for instance+3m (minutes), -20s, 45%, 1:12, 1h12m25s&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_type&#039;&#039;&#039;: pushes the type of the variable ST(2) of object ST(1); the type is one of these strings &#039;&#039;&#039;VLC_VAR_BOOL, VLC_VAR_INTEGER, VLC_VAR_HOTKEY, VLC_VAR_STRING, VLC_VAR_MODULE, VLC_VAR_FILE, VLC_VAR_DIRECTORY, VLC_VAR_VARIABLE, VLC_VAR_FLOAT, UNDEFINED&#039;&#039;&#039; (no such variable) or &#039;&#039;&#039;INVALID&#039;&#039;&#039; (no input stream); the object is one of &#039;&#039;&#039;VLC_OBJECT_ROOT, VLC_OBJECT_VLC, VLC_OBJECT_INTF, VLC_OBJECT_PLAYLIST, VLC_OBJECT_INPUT, VLC_OBJECT_VOUT, VLC_OBJECT_AOUT&#039;&#039;&#039; or &#039;&#039;&#039;VLC_OBJECT_SOUT&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_set&#039;&#039;&#039;: sets variable ST(2) of object ST(1) to ST(3)&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_get&#039;&#039;&#039;: pushes the value of the variable ST(2) of object ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_object_exists&#039;&#039;&#039;: checks if object ST(1) exists&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_type&#039;&#039;&#039;: pushes the type of the configuration variable ST(1); see &#039;&#039;&#039;vlc_var_type&#039;&#039;&#039; for a list of types&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_set&#039;&#039;&#039;:  sets configuration variable ST(1) to ST(2)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_get&#039;&#039;&#039;: pushes the value of the configuration variable ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_save&#039;&#039;&#039;: saves the modification made to the configuration variables of module ST(1) to the configuration file (ST(1) may be empty, in which case the whole configuration is saved) and pushes the return status (0 in case of success)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_reset&#039;&#039;&#039;: resets the configuration file to the default value (use with caution)&lt;br /&gt;
**&#039;&#039;&#039;vlc_volume_set&#039;&#039;&#039;: sets the volume value to ST(1) which can be a raw value between 0 and 1024, or a relative one between 0% and 400%, where 1% is equal to the maximum volume value divided by 400 (thus, the maximum volume value is equal to 400%, that is 1024). If ST(1) begins with a &#039;+&#039; (or &#039;-&#039;) operator, the volume is increased (or decreased) by the raw value which follows this operator&lt;br /&gt;
**&#039;&#039;&#039;vlc_get_meta&#039;&#039;&#039;: pushes the value of the meta information named by ST(1) from the stream being played. Available meta names are: &amp;quot;Title&amp;quot; (or &amp;quot;TITLE&amp;quot;), &amp;quot;Author&amp;quot;, &amp;quot;Artist&amp;quot; (or &amp;quot;ARTIST&amp;quot;), &amp;quot;Genre&amp;quot; (or &amp;quot;GENRE&amp;quot;), &amp;quot;Copyright&amp;quot;, &amp;quot;Album/movie/show title&amp;quot; (or &amp;quot;ALBUM&amp;quot;), &amp;quot;Track number/position in set&amp;quot;, &amp;quot;Description&amp;quot;, &amp;quot;Rating&amp;quot;, &amp;quot;Date&amp;quot;, &amp;quot;Setting&amp;quot;, &amp;quot;URL&amp;quot;, &amp;quot;Language&amp;quot;, &amp;quot;Now Playing&amp;quot;, &amp;quot;Publisher&amp;quot;&lt;br /&gt;
**&#039;&#039;&#039;vlm_command&#039;&#039;&#039; or &#039;&#039;&#039;vlm_cmd&#039;&#039;&#039;: sends the command that is on the stack to the VLM (VideoLan Manager). Since the command can contain more than one component on the stack, it must be ended by an &#039;;&#039; or an empty string pushed on the stack (e.g.: param1=&amp;quot;&#039;;&#039; &#039;command&#039; &#039;my&#039; &#039;this is&#039; vlm_command&amp;quot;). Once the VLM has executed the command, the return value is assigned to the local variable &#039;&#039;&#039;vlm_value&#039;&#039;&#039; and the error string (if available) is assigned to &#039;&#039;&#039;vlm_error&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;snapshot&#039;&#039;&#039;: takes a snapshot&lt;br /&gt;
&lt;br /&gt;
*playlist functions:&lt;br /&gt;
**&#039;&#039;&#039;playlist_add&#039;&#039;&#039;: adds MRL ST(1) to the playlist, with name ST(2) and returns the playlist ID associated to this item; special characters must be escaped with addslashes first; it is very convenient to call &#039;toto.mpg&#039; playlist_add vlc_play&lt;br /&gt;
**&#039;&#039;&#039;playlist_empty&#039;&#039;&#039;: clears the playlist of all items&lt;br /&gt;
**&#039;&#039;&#039;playlist_move&#039;&#039;&#039;: moves playlist item at position ST(2) to position ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_delete&#039;&#039;&#039;: deletes playlist item ID ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_sort&#039;&#039;&#039;: sorts the playlist using the mode ST(2) and order ST(1). Available order values are 0 (normal order) and 1 (reverse order). Available mode values are 0 (sort by ID), 1 (sort by title), 2 (sort by title, nodes first), 3 (sort by author), 4 (sort by genre), 5 (sort randomly), 6 (sort by duration), 7 (numerically sort by title) and 8 (sort by album)&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_add&#039;&#039;&#039;: adds the service discovery ST(1) to the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_remove&#039;&#039;&#039;: removes the service discovery ST(1) from the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_is_loaded&#039;&#039;&#039;: checks if the service discovery ST(1) is loaded in the playlist, and pushes the answer on the stack&lt;br /&gt;
&lt;br /&gt;
==The macros==&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;control&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The use of the control macro is now deprecated in favour of the RPN functions above. The documentation is provided here for the maintainance of HTML pages still using this old API. The main problem with this API is that there is no way to retrieve the playlist ID of the last added item.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When asking for a page, you can give arguments to it through the url. (e.g. using a &amp;lt;form&amp;gt;). Ex: http://host:port/page.html?var=value&amp;amp;var2=value2&amp;amp;... The &amp;quot;control&amp;quot; macro tells a page to parse these arguments and to execute the ones that are allowed. param1 of this macro says which commands are allowed. If empty, all commands will be permitted.&lt;br /&gt;
&lt;br /&gt;
Some commands require an argument that must be passed in the URL too.&lt;br /&gt;
*URL commands&lt;br /&gt;
**Name, Argument, Description&lt;br /&gt;
**&#039;&#039;&#039;play&#039;&#039;&#039;, item (integer), Play the specified playlist item&lt;br /&gt;
**&#039;&#039;&#039;stop&#039;&#039;&#039;, ,Stop&lt;br /&gt;
**&#039;&#039;&#039;pause&#039;&#039;&#039;, Pause&lt;br /&gt;
**&#039;&#039;&#039;next&#039;&#039;&#039;, , Go to next playlist item&lt;br /&gt;
**&#039;&#039;&#039;previous&#039;&#039;&#039;, , Go to previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;add&#039;&#039;&#039;, mrl (string), Add a [[MRL]] to the playlist&lt;br /&gt;
**&#039;&#039;&#039;delete&#039;&#039;&#039;, item (integer), Delete the specified playlist item or list of playlist items&lt;br /&gt;
**&#039;&#039;&#039;empty&#039;&#039;&#039;, , Empty the playlist&lt;br /&gt;
**&#039;&#039;&#039;close&#039;&#039;&#039;, id (hexa), Close a specific connection&lt;br /&gt;
**&#039;&#039;&#039;shutdown&#039;&#039;&#039;, , Quit VLC&lt;br /&gt;
&lt;br /&gt;
For example, you can restrict execution of the &#039;&#039;&#039;shutdown&#039;&#039;&#039; command to protected page (through a &#039;&#039;.access&#039;&#039; file), using the control macro in all unprotected pages.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;include&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro is replaced by the contents of the file param1. If the file contains vlc macros, they are correctly parsed and replaced.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;get&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro will be replaced by the value of the configuration variable which name is stored in param1 and which type is given by param2.&lt;br /&gt;
&lt;br /&gt;
param1 must be the name of an existing configuration variable. param2 must be the right type of the variable. It can be one of &#039;&#039;int&#039;&#039;, &#039;&#039;float&#039;&#039;, or &#039;&#039;string&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;get&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt; will be replaced in the output page by the value of sout.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;set&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows to set the value of a configuration variable. The name is given by param1 and the type by param2 (like for get). The value is retrieved from the url using the name given in param1.&lt;br /&gt;
&lt;br /&gt;
For example, if player.html contains&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;set&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt;&lt;br /&gt;
and if you browse at &amp;lt;emphasis&amp;gt; http://host:ip/player.html?sout=sout_value&amp;lt;/emphasis&amp;gt;, the sout variable will be set to &amp;quot;sout_value&amp;quot;. If the URL doesn&#039;t contain sout, nothing will be done.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;rpn&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to interpret RPN commands. (See II).&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;if,else,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to control the parsing of the HTML page.&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. If the first element from the stack is not 0, the test value is true, else false..&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;if&amp;quot; param1=&amp;quot;1 2 =&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;amp;lt;!-- Never reached --&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;else&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;amp;lt;p&amp;gt; Test succeed: 1 isn&#039;t equal to 2 &amp;amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also just use &amp;quot;if&amp;quot; and &amp;quot;end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;value&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. The macro is replaced with the value of the first element of the stack.&lt;br /&gt;
&lt;br /&gt;
Note: If the element is the name of a local variable, its value will be displayed instead of its name.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;foreach,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
param1 is the name of the variable that will be used for the loop. param2 is the name of the set to be built:&lt;br /&gt;
*integer: take the first element from the stack to construct a set of integer. The stack element should be a string like: &#039;&#039;first:last[:step][,first2:last2[:step2][,...]&#039;&#039; (Ex:1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8)&lt;br /&gt;
*directory: take the first element of the stack as the base directory and construct a set of filename and directly in it. Each element has the following fields:&lt;br /&gt;
**basename: file/directory name&lt;br /&gt;
**name: complete file/directory name (including path)&lt;br /&gt;
**ext: file extension in lowercase&lt;br /&gt;
**type: &amp;quot;directory&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;unknown&amp;quot;&lt;br /&gt;
**size: size of the file&lt;br /&gt;
**date&lt;br /&gt;
*playlist: set based on the playlist with fields: current is 1 if item is currently selected, 0 else. index is the index value, that can be used by the play or delete control command. name is the&lt;br /&gt;
name of the item.&lt;br /&gt;
*&amp;quot;information&amp;quot;: Create information for the current playing stream. name is the name of the category, value is its value, info is a new set that can be parsed with a new foreach (subfields of info are name and value).&lt;br /&gt;
*input variables such as &amp;quot;program&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;chapter&amp;quot;, &amp;quot;audio-es&amp;quot;, &amp;quot;video-es&amp;quot; and &amp;quot;spu-es&amp;quot;: Create lists for the current playing stream. Every list has the following fields:&lt;br /&gt;
**name: item name (language for elementary streams, tracks, etc.) to display in places where a human-readable format is preferred&lt;br /&gt;
**id: item ID to pass to the RPN function vlc_var_set, and returned by vlc_var_get&lt;br /&gt;
**selected: 1 if the item is selected, 0 otherwise&lt;br /&gt;
*the name of a foreach variable if it&#039;s a set of set of value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;cat&amp;quot; param2=&amp;quot;informations&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;cat.name&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;ul&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;info&amp;quot; param2=&amp;quot;cat.info&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;li&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.name&amp;quot; /&amp;amp;gt; :&lt;br /&gt;
                    &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.value&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/li&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/ul&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, have a look at the share/http directory of the VLC source tree...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22546</id>
		<title>Documentation:Building Pages for the HTTP Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22546"/>
		<updated>2012-04-23T15:57:03Z</updated>

		<summary type="html">&lt;p&gt;Gth: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation play howto toc}}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This appendix describes the language used for writing dynamic web pages for the HTTP interface.&lt;br /&gt;
&lt;br /&gt;
Pages must be placed in the share/http folder in either VLC&#039;s folder (Windows, Mac) or /usr/share/vlc/share/http or /usr/local/share/vlc/share/http (or wherever vlc&#039;s shared files are installed).&lt;br /&gt;
&lt;br /&gt;
Some files are handled a bit specially:&lt;br /&gt;
*Files beginning with &#039;.&#039; are not exported.&lt;br /&gt;
*A &#039;.access&#039; file will be opened and the http interface will expect to find at the first line a login/password (written as login:password). This login/password will be used to protect all files in this directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
* A &#039;.hosts&#039; file will be opened and the http interface will expect to find a list of network/mask pairs separated by new line, for instance 192.168.0.0/255.255.255.0. If this file is present, then the default behaviour is to deny access from hosts which don&#039;t match any of the network/mask pairs to all the files of the directory. If the file is not present, then any host has access to the files of the directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
*The file &amp;lt;dir&amp;gt;/index.html will be exported as &amp;lt;dir&amp;gt; and &amp;lt;dir&amp;gt;/ and not as index.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MIME type is set by looking at the file extension and cannot be specified nor modified for a specific file. Unknown extensions will have &amp;quot;application/octet-stream&amp;quot; as MIME type.&lt;br /&gt;
&lt;br /&gt;
You should avoid exporting big files. Each file is indeed first loaded into the memory before being sent to the client, so please be careful.&lt;br /&gt;
&lt;br /&gt;
==VLC macros==&lt;br /&gt;
&lt;br /&gt;
Each time a .html/.htm page is requested, it is parsed by VLC before being sent. The parser searches for the VLC macros, and executes or substitutes them. Moreover, URL arguments received by the GET method can be interpreted.&lt;br /&gt;
&lt;br /&gt;
A VLC macro looks like:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;macro-name&amp;quot; param1=&amp;quot;macro-parameters1&amp;quot; param2=&amp;quot;macro-parameters2&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;quot;id&amp;quot; is the only mandatory field, param1 and param2 may or may not be present and depend on the value of &amp;quot;id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You should take care that you &#039;&#039;&#039;have to&#039;&#039;&#039; respect this syntax, VLC won&#039;t like invalid syntax. (It could easily leads to crashes).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; /&amp;gt;&lt;br /&gt;
Incorrect:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; &amp;gt; (missing tag ending)&lt;br /&gt;
 &amp;lt;vlc id=value param1=&amp;quot;version&amp;quot; /&amp;gt; (missing &amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Valid macros are:&lt;br /&gt;
*&#039;&#039;&#039;control&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;include&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;get&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;set&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;rpn&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;if&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;else&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;value&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;foreach&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
&lt;br /&gt;
For powerful macros, you may use these tools:&lt;br /&gt;
&lt;br /&gt;
*RPN Evaluator (see part 2)&lt;br /&gt;
*Stacks: The stack is a place where you can push numbers and strings, and then pop them backs. It&#039;s used with the little RPN evaluator.&lt;br /&gt;
*Local variables: You can dynamically create new variables and changes their values. Some local variables are predefined:&lt;br /&gt;
**&#039;&#039;&#039;url_value&#039;&#039;&#039;: parameter of the URL&lt;br /&gt;
**&#039;&#039;&#039;url_param&#039;&#039;&#039;: 1 if url_value isn&#039;t empty else 0&lt;br /&gt;
**&#039;&#039;&#039;version&#039;&#039;&#039;: the VLC version&lt;br /&gt;
**&#039;&#039;&#039;copyright&#039;&#039;&#039;: the VLC copyright&lt;br /&gt;
**&#039;&#039;&#039;vlc_compile_time, vlc_compile_by, vlc_compile_host, vlc_compile_domain, vlc_compiler, vlc_changeset&#039;&#039;&#039;: information on the VLC build&lt;br /&gt;
**&#039;&#039;&#039;stream_position, stream_time, stream_length, stream_state&#039;&#039;&#039;: information on the currently playing stream&lt;br /&gt;
**&#039;&#039;&#039;volume&#039;&#039;&#039;: current volume setting&lt;br /&gt;
&lt;br /&gt;
Remark: The stacks, and local variables context is reset before the page is executed.&lt;br /&gt;
&lt;br /&gt;
==The RPN evaluator==&lt;br /&gt;
&lt;br /&gt;
RPN means Reverse Polish Notation.&lt;br /&gt;
&lt;br /&gt;
===RPN Introduction===&lt;br /&gt;
&lt;br /&gt;
RPN may look strange but it&#039;s a fast and easy way to write expressions. It also avoids the use of ( and ).&lt;br /&gt;
&lt;br /&gt;
Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *.&lt;br /&gt;
&lt;br /&gt;
The idea behind it is: if we have a number or a string (using &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;), push it on the stack. If it is an operator (like +),  pop the arguments from the stack, execute the operators and then push the result onto the stack. The result of the RPN sequence is the value on the top of the stack.  A step by step explanation of the sequence &#039;&#039;&#039;1 2 + 5 *&#039;&#039;&#039; is shown below, to illustrate this process:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Stack Contents&lt;br /&gt;
! Word&lt;br /&gt;
! Action taken on the stack&lt;br /&gt;
|-&lt;br /&gt;
| empty&lt;br /&gt;
| 1&lt;br /&gt;
| 1 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2 is pushed onto the stack, &#039;above&#039; 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 | 2&lt;br /&gt;
| +&lt;br /&gt;
| The plus operator results in removal of 1 and 2 from the stack, then write 3 onto the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 5&lt;br /&gt;
| 5 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3 | 5&lt;br /&gt;
| *&lt;br /&gt;
| The multiplication operator removes 3 and 5 and writes 15 onto the stack.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
|&lt;br /&gt;
| Final result.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
&lt;br /&gt;
Notation: ST(1) means the first stack element, ST(2) the second one ... and op is the operator.&lt;br /&gt;
&lt;br /&gt;
You have access to :&lt;br /&gt;
&lt;br /&gt;
*Standard arithmetics operators: &#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039; these ones push the result of ST(1) op ST(2) onto the stack&lt;br /&gt;
&lt;br /&gt;
*Binary operators: &#039;&#039;&#039;!&#039;&#039;&#039; (push !ST(1)); &#039;&#039;&#039;^, &amp;amp;, |&#039;&#039;&#039;: push the result ST(1) op ST(2)&lt;br /&gt;
&lt;br /&gt;
*test: &#039;&#039;&#039;=, &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=&#039;&#039;&#039;: execute ST(1) op ST(2) and push -1 if true else 0&lt;br /&gt;
&lt;br /&gt;
*string functions:&lt;br /&gt;
**&#039;&#039;&#039;strcat&#039;&#039;&#039;: pushes the result of &#039;ST(1)ST(2)&lt;br /&gt;
**&#039;&#039;&#039;strcmp&#039;&#039;&#039;: compares ST(1) and ST(2) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strncmp&#039;&#039;&#039;: compares the first ST(1) characters of ST(2) and ST(3) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strsub&#039;&#039;&#039;: extracts characters ST(2) to ST(1) of string ST(3)&lt;br /&gt;
**&#039;&#039;&#039;strlen&#039;&#039;&#039;: pushes the length of ST(1)&lt;br /&gt;
**&#039;&#039;&#039;str_replace&#039;&#039;&#039;: replaces string ST(2) with ST(1) in ST(3)&lt;br /&gt;
**&#039;&#039;&#039;url_encode&#039;&#039;&#039;: encodes non-alphanumeric characters of ST(1) as %XX so that they can be safely passed as GET or POST variables&lt;br /&gt;
**&#039;&#039;&#039;url_extract&#039;&#039;&#039;: performs the reverse operation of url_encode&lt;br /&gt;
**&#039;&#039;&#039;addslashes&#039;&#039;&#039;: protects single quotes (&#039;) and double quotes (&amp;quot;) of ST(1) with backslashes (\) so that they can be safely passed to a VLC playlist function&lt;br /&gt;
**&#039;&#039;&#039;stripslashes&#039;&#039;&#039;: performs the reverse operation of addslashes&lt;br /&gt;
**&#039;&#039;&#039;htmlspecialchars&#039;&#039;&#039;: encodes &amp;amp;, &#039;, &amp;quot;, &amp;lt;, and &amp;gt; of ST(1) as their &amp;amp;stuff; HTML counterpart, so that they don&#039;t interact with HTML tags&lt;br /&gt;
**&#039;&#039;&#039;realpath&#039;&#039;&#039;: parses ST(1) as a filename path, and pushes an absolute path to that file, removing ~ and ../&lt;br /&gt;
&lt;br /&gt;
*stack manipulation:&lt;br /&gt;
**&#039;&#039;&#039;dup&#039;&#039;&#039;: pops ST(1) and pushes the same string twice&lt;br /&gt;
**&#039;&#039;&#039;drop&#039;&#039;&#039;: pops ST(1) and drops it&lt;br /&gt;
**&#039;&#039;&#039;swap&#039;&#039;&#039;: exchanges ST(1) and ST(2)&lt;br /&gt;
**&#039;&#039;&#039;flush&#039;&#039;&#039;: empties the stack&lt;br /&gt;
&lt;br /&gt;
*variables manipulation:&lt;br /&gt;
**&#039;&#039;&#039;store&#039;&#039;&#039;: stores ST(2) in a local variable named ST(1)&lt;br /&gt;
**&#039;&#039;&#039;value&#039;&#039;&#039;: pushes the value of the local variable named ST(1)&lt;br /&gt;
&lt;br /&gt;
*player control:&lt;br /&gt;
**&#039;&#039;&#039;vlc_play&#039;&#039;&#039;: plays the playlist item whose ID is ST(1), and pushes the return value of the play function (0 in case of success); see playlist functions below&lt;br /&gt;
**&#039;&#039;&#039;vlc_stop&#039;&#039;&#039;: stops the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_pause&#039;&#039;&#039;: pauses the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_next&#039;&#039;&#039;: plays the next playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_previous&#039;&#039;&#039;: plays the previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_seek&#039;&#039;&#039;: seeks the current input to a location defined in ST(1), for instance+3m (minutes), -20s, 45%, 1:12, 1h12m25s&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_type&#039;&#039;&#039;: pushes the type of the variable ST(2) of object ST(1); the type is one of these strings &#039;&#039;&#039;VLC_VAR_BOOL, VLC_VAR_INTEGER, VLC_VAR_HOTKEY, VLC_VAR_STRING, VLC_VAR_MODULE, VLC_VAR_FILE, VLC_VAR_DIRECTORY, VLC_VAR_VARIABLE, VLC_VAR_FLOAT, UNDEFINED&#039;&#039;&#039; (no such variable) or &#039;&#039;&#039;INVALID&#039;&#039;&#039; (no input stream); the object is one of &#039;&#039;&#039;VLC_OBJECT_ROOT, VLC_OBJECT_VLC, VLC_OBJECT_INTF, VLC_OBJECT_PLAYLIST, VLC_OBJECT_INPUT, VLC_OBJECT_VOUT, VLC_OBJECT_AOUT&#039;&#039;&#039; or &#039;&#039;&#039;VLC_OBJECT_SOUT&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_set&#039;&#039;&#039;: sets variable ST(2) of object ST(1) to ST(3)&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_get&#039;&#039;&#039;: pushes the value of the variable ST(2) of object ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_object_exists&#039;&#039;&#039;: checks if object ST(1) exists&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_type&#039;&#039;&#039;: pushes the type of the configuration variable ST(1); see &#039;&#039;&#039;vlc_var_type&#039;&#039;&#039; for a list of types&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_set&#039;&#039;&#039;:  sets configuration variable ST(1) to ST(2)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_get&#039;&#039;&#039;: pushes the value of the configuration variable ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_save&#039;&#039;&#039;: saves the modification made to the configuration variables of module ST(1) to the configuration file (ST(1) may be empty, in which case the whole configuration is saved) and pushes the return status (0 in case of success)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_reset&#039;&#039;&#039;: resets the configuration file to the default value (use with caution)&lt;br /&gt;
**&#039;&#039;&#039;vlc_volume_set&#039;&#039;&#039;: sets the volume value to ST(1) which can be a raw value between 0 and 1024, or a relative one between 0% and 400%, where 1% is equal to the maximum volume value divided by 400 (thus, the maximum volume value is equal to 400%, that is 1024). If ST(1) begins with a &#039;+&#039; (or &#039;-&#039;) operator, the volume is increased (or decreased) by the raw value which follows this operator&lt;br /&gt;
**&#039;&#039;&#039;vlc_get_meta&#039;&#039;&#039;: pushes the value of the meta information named by ST(1) from the stream being played. Available meta names are: &amp;quot;Title&amp;quot; (or &amp;quot;TITLE&amp;quot;), &amp;quot;Author&amp;quot;, &amp;quot;Artist&amp;quot; (or &amp;quot;ARTIST&amp;quot;), &amp;quot;Genre&amp;quot; (or &amp;quot;GENRE&amp;quot;), &amp;quot;Copyright&amp;quot;, &amp;quot;Album/movie/show title&amp;quot; (or &amp;quot;ALBUM&amp;quot;), &amp;quot;Track number/position in set&amp;quot;, &amp;quot;Description&amp;quot;, &amp;quot;Rating&amp;quot;, &amp;quot;Date&amp;quot;, &amp;quot;Setting&amp;quot;, &amp;quot;URL&amp;quot;, &amp;quot;Language&amp;quot;, &amp;quot;Now Playing&amp;quot;, &amp;quot;Publisher&amp;quot;&lt;br /&gt;
**&#039;&#039;&#039;vlm_command&#039;&#039;&#039; or &#039;&#039;&#039;vlm_cmd&#039;&#039;&#039;: sends the command that is on the stack to the VLM (VideoLan Manager). Since the command can contain more than one component on the stack, it must be ended by an &#039;;&#039; or an empty string pushed on the stack (e.g.: param1=&amp;quot;&#039;;&#039; &#039;command&#039; &#039;my&#039; &#039;this is&#039; vlm_command&amp;quot;). Once the VLM has executed the command, the return value is assigned to the local variable &#039;&#039;&#039;vlm_value&#039;&#039;&#039; and the error string (if available) is assigned to &#039;&#039;&#039;vlm_error&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;snapshot&#039;&#039;&#039;: takes a snapshot&lt;br /&gt;
&lt;br /&gt;
*playlist functions:&lt;br /&gt;
**&#039;&#039;&#039;playlist_add&#039;&#039;&#039;: adds MRL ST(1) to the playlist, with name ST(2) and returns the playlist ID associated to this item; special characters must be escaped with addslashes first; it is very convenient to call &#039;toto.mpg&#039; playlist_add vlc_play&lt;br /&gt;
**&#039;&#039;&#039;playlist_empty&#039;&#039;&#039;: clears the playlist of all items&lt;br /&gt;
**&#039;&#039;&#039;playlist_move&#039;&#039;&#039;: moves playlist item at position ST(2) to position ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_delete&#039;&#039;&#039;: deletes playlist item ID ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_sort&#039;&#039;&#039;: sorts the playlist using the mode ST(2) and order ST(1). Available order values are 0 (normal order) and 1 (reverse order). Available mode values are 0 (sort by ID), 1 (sort by title), 2 (sort by title, nodes first), 3 (sort by author), 4 (sort by genre), 5 (sort randomly), 6 (sort by duration), 7 (numerically sort by title) and 8 (sort by album)&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_add&#039;&#039;&#039;: adds the service discovery ST(1) to the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_remove&#039;&#039;&#039;: removes the service discovery ST(1) from the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_is_loaded&#039;&#039;&#039;: checks if the service discovery ST(1) is loaded in the playlist, and pushes the answer on the stack&lt;br /&gt;
&lt;br /&gt;
==The macros==&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;control&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The use of the control macro is now deprecated in favour of the RPN functions above. The documentation is provided here for the maintainance of HTML pages still using this old API. The main problem with this API is that there is no way to retrieve the playlist ID of the last added item.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When asking for a page, you can give arguments to it through the url. (e.g. using a &amp;lt;form&amp;gt;). Ex: http://host:port/page.html?var=value&amp;amp;var2=value2&amp;amp;... The &amp;quot;control&amp;quot; macro tells a page to parse these arguments and to execute the ones that are allowed. param1 of this macro says which commands are allowed. If empty, all commands will be permitted.&lt;br /&gt;
&lt;br /&gt;
Some commands require an argument that must be passed in the URL too.&lt;br /&gt;
*URL commands&lt;br /&gt;
**Name, Argument, Description&lt;br /&gt;
**&#039;&#039;&#039;play&#039;&#039;&#039;, item (integer), Play the specified playlist item&lt;br /&gt;
**&#039;&#039;&#039;stop&#039;&#039;&#039;, ,Stop&lt;br /&gt;
**&#039;&#039;&#039;pause&#039;&#039;&#039;, Pause&lt;br /&gt;
**&#039;&#039;&#039;next&#039;&#039;&#039;, , Go to next playlist item&lt;br /&gt;
**&#039;&#039;&#039;previous&#039;&#039;&#039;, , Go to previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;add&#039;&#039;&#039;, mrl (string), Add a [[MRL]] to the playlist&lt;br /&gt;
**&#039;&#039;&#039;delete&#039;&#039;&#039;, item (integer), Delete the specified playlist item or list of playlist items&lt;br /&gt;
**&#039;&#039;&#039;empty&#039;&#039;&#039;, , Empty the playlist&lt;br /&gt;
**&#039;&#039;&#039;close&#039;&#039;&#039;, id (hexa), Close a specific connection&lt;br /&gt;
**&#039;&#039;&#039;shutdown&#039;&#039;&#039;, , Quit VLC&lt;br /&gt;
&lt;br /&gt;
For example, you can restrict execution of the &#039;&#039;&#039;shutdown&#039;&#039;&#039; command to protected page (through a &#039;&#039;.access&#039;&#039; file), using the control macro in all unprotected pages.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;include&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro is replaced by the contents of the file param1. If the file contains vlc macros, they are correctly parsed and replaced.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;get&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro will be replaced by the value of the configuration variable which name is stored in param1 and which type is given by param2.&lt;br /&gt;
&lt;br /&gt;
param1 must be the name of an existing configuration variable. param2 must be the right type of the variable. It can be one of &#039;&#039;int&#039;&#039;, &#039;&#039;float&#039;&#039;, or &#039;&#039;string&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;get&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt; will be replaced in the output page by the value of sout.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;set&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows to set the value of a configuration variable. The name is given by param1 and the type by param2 (like for get). The value is retrieved from the url using the name given in param1.&lt;br /&gt;
&lt;br /&gt;
For example, if player.html contains&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;set&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt;&lt;br /&gt;
and if you browse at &amp;lt;emphasis&amp;gt; http://host:ip/player.html?sout=sout_value&amp;lt;/emphasis&amp;gt;, the sout variable will be set to &amp;quot;sout_value&amp;quot;. If the URL doesn&#039;t contain sout, nothing will be done.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;rpn&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to interpret RPN commands. (See II).&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;if,else,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to control the parsing of the HTML page.&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. If the first element from the stack is not 0, the test value is true, else false..&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;if&amp;quot; param1=&amp;quot;1 2 =&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;amp;lt;!-- Never reached --&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;else&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;amp;lt;p&amp;gt; Test succeed: 1 isn&#039;t equal to 2 &amp;amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also just use &amp;quot;if&amp;quot; and &amp;quot;end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;value&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. The macro is replaced with the value of the first element of the stack.&lt;br /&gt;
&lt;br /&gt;
Note: If the element is the name of a local variable, its value will be displayed instead of its name.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;foreach,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
param1 is the name of the variable that will be used for the loop. param2 is the name of the set to be built:&lt;br /&gt;
*integer: take the first element from the stack to construct a set of integer. The stack element should be a string like: &#039;&#039;first:last[:step][,first2:last2[:step2][,...]&#039;&#039; (Ex:1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8)&lt;br /&gt;
*directory: take the first element of the stack as the base directory and construct a set of filename and directly in it. Each element has the following fields:&lt;br /&gt;
**basename: file/directory name&lt;br /&gt;
**name: complete file/directory name (including path)&lt;br /&gt;
**ext: file extension in lowercase&lt;br /&gt;
**type: &amp;quot;directory&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;unknown&amp;quot;&lt;br /&gt;
**size: size of the file&lt;br /&gt;
**date&lt;br /&gt;
*playlist: set based on the playlist with fields: current is 1 if item is currently selected, 0 else. index is the index value, that can be used by the play or delete control command. name is the&lt;br /&gt;
name of the item.&lt;br /&gt;
*&amp;quot;information&amp;quot;: Create information for the current playing stream. name is the name of the category, value is its value, info is a new set that can be parsed with a new foreach (subfields of info are name and value).&lt;br /&gt;
*input variables such as &amp;quot;program&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;chapter&amp;quot;, &amp;quot;audio-es&amp;quot;, &amp;quot;video-es&amp;quot; and &amp;quot;spu-es&amp;quot;: Create lists for the current playing stream. Every list has the following fields:&lt;br /&gt;
**name: item name (language for elementary streams, tracks, etc.) to display in places where a human-readable format is preferred&lt;br /&gt;
**id: item ID to pass to the RPN function vlc_var_set, and returned by vlc_var_get&lt;br /&gt;
**selected: 1 if the item is selected, 0 otherwise&lt;br /&gt;
*the name of a foreach variable if it&#039;s a set of set of value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;cat&amp;quot; param2=&amp;quot;informations&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;cat.name&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;ul&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;info&amp;quot; param2=&amp;quot;cat.info&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;li&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.name&amp;quot; /&amp;amp;gt; :&lt;br /&gt;
                    &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.value&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/li&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/ul&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, have a look at the share/http directory of the VLC source tree...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22545</id>
		<title>Documentation:Building Pages for the HTTP Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22545"/>
		<updated>2012-04-23T15:55:18Z</updated>

		<summary type="html">&lt;p&gt;Gth: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation play howto toc}}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This appendix describes the language used for writing dynamic web pages for the HTTP interface.&lt;br /&gt;
&lt;br /&gt;
Pages must be placed in the share/http folder in either VLC&#039;s folder (Windows, Mac) or /usr/share/vlc/share/http or /usr/local/share/vlc/share/http (or wherever vlc&#039;s shared files are installed).&lt;br /&gt;
&lt;br /&gt;
Some files are handled a bit specially:&lt;br /&gt;
*Files beginning with &#039;.&#039; are not exported.&lt;br /&gt;
*A &#039;.access&#039; file will be opened and the http interface will expect to find at the first line a login/password (written as login:password). This login/password will be used to protect all files in this directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
* A &#039;.hosts&#039; file will be opened and the http interface will expect to find a list of network/mask pairs separated by new line, for instance 192.168.0.0/255.255.255.0. If this file is present, then the default behaviour is to deny access from hosts which don&#039;t match any of the network/mask pairs to all the files of the directory. If the file is not present, then any host has access to the files of the directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
*The file &amp;lt;dir&amp;gt;/index.html will be exported as &amp;lt;dir&amp;gt; and &amp;lt;dir&amp;gt;/ and not as index.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MIME type is set by looking at the file extension and cannot be specified nor modified for a specific file. Unknown extensions will have &amp;quot;application/octet-stream&amp;quot; as MIME type.&lt;br /&gt;
&lt;br /&gt;
You should avoid exporting big files. Each file is indeed first loaded into the memory before being sent to the client, so please be careful.&lt;br /&gt;
&lt;br /&gt;
==VLC macros==&lt;br /&gt;
&lt;br /&gt;
Each time a .html/.htm page is requested, it is parsed by VLC before being sent. The parser searches for the VLC macros, and executes or substitutes them. Moreover, URL arguments received by the GET method can be interpreted.&lt;br /&gt;
&lt;br /&gt;
A VLC macro looks like:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;macro-name&amp;quot; param1=&amp;quot;macro-parameters1&amp;quot; param2=&amp;quot;macro-parameters2&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;quot;id&amp;quot; is the only mandatory field, param1 and param2 may or may not be present and depend on the value of &amp;quot;id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You should take care that you &#039;&#039;&#039;have to&#039;&#039;&#039; respect this syntax, VLC won&#039;t like invalid syntax. (It could easily leads to crashes).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; /&amp;gt;&lt;br /&gt;
Incorrect:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; &amp;gt; (missing tag ending)&lt;br /&gt;
 &amp;lt;vlc id=value param1=&amp;quot;version&amp;quot; /&amp;gt; (missing &amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Valid macros are:&lt;br /&gt;
*&#039;&#039;&#039;control&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;include&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;get&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;set&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;rpn&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;if&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;else&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;value&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;foreach&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
&lt;br /&gt;
For powerful macros, you may use these tools:&lt;br /&gt;
&lt;br /&gt;
*RPN Evaluator (see part 2)&lt;br /&gt;
*Stacks: The stack is a place where you can push numbers and strings, and then pop them backs. It&#039;s used with the little RPN evaluator.&lt;br /&gt;
*Local variables: You can dynamically create new variables and changes their values. Some local variables are predefined:&lt;br /&gt;
**&#039;&#039;&#039;url_value&#039;&#039;&#039;: parameter of the URL&lt;br /&gt;
**&#039;&#039;&#039;url_param&#039;&#039;&#039;: 1 if url_value isn&#039;t empty else 0&lt;br /&gt;
**&#039;&#039;&#039;version&#039;&#039;&#039;: the VLC version&lt;br /&gt;
**&#039;&#039;&#039;copyright&#039;&#039;&#039;: the VLC copyright&lt;br /&gt;
**&#039;&#039;&#039;vlc_compile_time, vlc_compile_by, vlc_compile_host, vlc_compile_domain, vlc_compiler, vlc_changeset&#039;&#039;&#039;: information on the VLC build&lt;br /&gt;
**&#039;&#039;&#039;stream_position, stream_time, stream_length, stream_state&#039;&#039;&#039;: information on the currently playing stream&lt;br /&gt;
**&#039;&#039;&#039;volume&#039;&#039;&#039;: current volume setting&lt;br /&gt;
&lt;br /&gt;
Remark: The stacks, and local variables context is reset before the page is executed.&lt;br /&gt;
&lt;br /&gt;
==The RPN evaluator==&lt;br /&gt;
&lt;br /&gt;
RPN means Reverse Polish Notation.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
RPN may look strange but it&#039;s a fast and easy way to write expressions. It also avoids the use of ( and ).&lt;br /&gt;
&lt;br /&gt;
Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *.&lt;br /&gt;
&lt;br /&gt;
The idea behind it is: if we have a number or a string (using &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;), push it on the stack. If it is an operator (like +),  pop the arguments from the stack, execute the operators and then push the result onto the stack. The result of the RPN sequence is the value on the top of the stack.  A step by step explanation of the sequence &#039;&#039;&#039;1 2 + 5 *&#039;&#039;&#039; is shown below, to illustrate this process:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Stack Contents&lt;br /&gt;
! Word&lt;br /&gt;
! Action taken on the stack&lt;br /&gt;
|-&lt;br /&gt;
| empty&lt;br /&gt;
| 1&lt;br /&gt;
| 1 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2 is pushed onto the stack, &#039;above&#039; 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 | 2&lt;br /&gt;
| +&lt;br /&gt;
| The plus operator results in removal of 1 and 2 from the stack, then write 3 onto the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 5&lt;br /&gt;
| 5 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3 | 5&lt;br /&gt;
| *&lt;br /&gt;
| The multiplication operator removes 3 and 5 and writes 15 onto the stack.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
|&lt;br /&gt;
| Final result.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
&lt;br /&gt;
Notation: ST(1) means the first stack element, ST(2) the second one ... and op is the operator.&lt;br /&gt;
&lt;br /&gt;
You have access to :&lt;br /&gt;
&lt;br /&gt;
*Standard arithmetics operators: &#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039; these ones push the result of ST(1) op ST(2) onto the stack&lt;br /&gt;
&lt;br /&gt;
*Binary operators: &#039;&#039;&#039;!&#039;&#039;&#039; (push !ST(1)); &#039;&#039;&#039;^, &amp;amp;, |&#039;&#039;&#039;: push the result ST(1) op ST(2)&lt;br /&gt;
&lt;br /&gt;
*test: &#039;&#039;&#039;=, &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=&#039;&#039;&#039;: execute ST(1) op ST(2) and push -1 if true else 0&lt;br /&gt;
&lt;br /&gt;
*string functions:&lt;br /&gt;
**&#039;&#039;&#039;strcat&#039;&#039;&#039;: pushes the result of &#039;ST(1)ST(2)&lt;br /&gt;
**&#039;&#039;&#039;strcmp&#039;&#039;&#039;: compares ST(1) and ST(2) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strncmp&#039;&#039;&#039;: compares the first ST(1) characters of ST(2) and ST(3) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strsub&#039;&#039;&#039;: extracts characters ST(2) to ST(1) of string ST(3)&lt;br /&gt;
**&#039;&#039;&#039;strlen&#039;&#039;&#039;: pushes the length of ST(1)&lt;br /&gt;
**&#039;&#039;&#039;str_replace&#039;&#039;&#039;: replaces string ST(2) with ST(1) in ST(3)&lt;br /&gt;
**&#039;&#039;&#039;url_encode&#039;&#039;&#039;: encodes non-alphanumeric characters of ST(1) as %XX so that they can be safely passed as GET or POST variables&lt;br /&gt;
**&#039;&#039;&#039;url_extract&#039;&#039;&#039;: performs the reverse operation of url_encode&lt;br /&gt;
**&#039;&#039;&#039;addslashes&#039;&#039;&#039;: protects single quotes (&#039;) and double quotes (&amp;quot;) of ST(1) with backslashes (\) so that they can be safely passed to a VLC playlist function&lt;br /&gt;
**&#039;&#039;&#039;stripslashes&#039;&#039;&#039;: performs the reverse operation of addslashes&lt;br /&gt;
**&#039;&#039;&#039;htmlspecialchars&#039;&#039;&#039;: encodes &amp;amp;, &#039;, &amp;quot;, &amp;lt;, and &amp;gt; of ST(1) as their &amp;amp;stuff; HTML counterpart, so that they don&#039;t interact with HTML tags&lt;br /&gt;
**&#039;&#039;&#039;realpath&#039;&#039;&#039;: parses ST(1) as a filename path, and pushes an absolute path to that file, removing ~ and ../&lt;br /&gt;
&lt;br /&gt;
*stack manipulation:&lt;br /&gt;
**&#039;&#039;&#039;dup&#039;&#039;&#039;: pops ST(1) and pushes the same string twice&lt;br /&gt;
**&#039;&#039;&#039;drop&#039;&#039;&#039;: pops ST(1) and drops it&lt;br /&gt;
**&#039;&#039;&#039;swap&#039;&#039;&#039;: exchanges ST(1) and ST(2)&lt;br /&gt;
**&#039;&#039;&#039;flush&#039;&#039;&#039;: empties the stack&lt;br /&gt;
&lt;br /&gt;
*variables manipulation:&lt;br /&gt;
**&#039;&#039;&#039;store&#039;&#039;&#039;: stores ST(2) in a local variable named ST(1)&lt;br /&gt;
**&#039;&#039;&#039;value&#039;&#039;&#039;: pushes the value of the local variable named ST(1)&lt;br /&gt;
&lt;br /&gt;
*player control:&lt;br /&gt;
**&#039;&#039;&#039;vlc_play&#039;&#039;&#039;: plays the playlist item whose ID is ST(1), and pushes the return value of the play function (0 in case of success); see playlist functions below&lt;br /&gt;
**&#039;&#039;&#039;vlc_stop&#039;&#039;&#039;: stops the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_pause&#039;&#039;&#039;: pauses the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_next&#039;&#039;&#039;: plays the next playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_previous&#039;&#039;&#039;: plays the previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_seek&#039;&#039;&#039;: seeks the current input to a location defined in ST(1), for instance+3m (minutes), -20s, 45%, 1:12, 1h12m25s&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_type&#039;&#039;&#039;: pushes the type of the variable ST(2) of object ST(1); the type is one of these strings &#039;&#039;&#039;VLC_VAR_BOOL, VLC_VAR_INTEGER, VLC_VAR_HOTKEY, VLC_VAR_STRING, VLC_VAR_MODULE, VLC_VAR_FILE, VLC_VAR_DIRECTORY, VLC_VAR_VARIABLE, VLC_VAR_FLOAT, UNDEFINED&#039;&#039;&#039; (no such variable) or &#039;&#039;&#039;INVALID&#039;&#039;&#039; (no input stream); the object is one of &#039;&#039;&#039;VLC_OBJECT_ROOT, VLC_OBJECT_VLC, VLC_OBJECT_INTF, VLC_OBJECT_PLAYLIST, VLC_OBJECT_INPUT, VLC_OBJECT_VOUT, VLC_OBJECT_AOUT&#039;&#039;&#039; or &#039;&#039;&#039;VLC_OBJECT_SOUT&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_set&#039;&#039;&#039;: sets variable ST(2) of object ST(1) to ST(3)&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_get&#039;&#039;&#039;: pushes the value of the variable ST(2) of object ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_object_exists&#039;&#039;&#039;: checks if object ST(1) exists&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_type&#039;&#039;&#039;: pushes the type of the configuration variable ST(1); see &#039;&#039;&#039;vlc_var_type&#039;&#039;&#039; for a list of types&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_set&#039;&#039;&#039;:  sets configuration variable ST(1) to ST(2)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_get&#039;&#039;&#039;: pushes the value of the configuration variable ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_save&#039;&#039;&#039;: saves the modification made to the configuration variables of module ST(1) to the configuration file (ST(1) may be empty, in which case the whole configuration is saved) and pushes the return status (0 in case of success)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_reset&#039;&#039;&#039;: resets the configuration file to the default value (use with caution)&lt;br /&gt;
**&#039;&#039;&#039;vlc_volume_set&#039;&#039;&#039;: sets the volume value to ST(1) which can be a raw value between 0 and 1024, or a relative one between 0% and 400%, where 1% is equal to the maximum volume value divided by 400 (thus, the maximum volume value is equal to 400%, that is 1024). If ST(1) begins with a &#039;+&#039; (or &#039;-&#039;) operator, the volume is increased (or decreased) by the raw value which follows this operator&lt;br /&gt;
**&#039;&#039;&#039;vlc_get_meta&#039;&#039;&#039;: pushes the value of the meta information named by ST(1) from the stream being played. Available meta names are: &amp;quot;Title&amp;quot; (or &amp;quot;TITLE&amp;quot;), &amp;quot;Author&amp;quot;, &amp;quot;Artist&amp;quot; (or &amp;quot;ARTIST&amp;quot;), &amp;quot;Genre&amp;quot; (or &amp;quot;GENRE&amp;quot;), &amp;quot;Copyright&amp;quot;, &amp;quot;Album/movie/show title&amp;quot; (or &amp;quot;ALBUM&amp;quot;), &amp;quot;Track number/position in set&amp;quot;, &amp;quot;Description&amp;quot;, &amp;quot;Rating&amp;quot;, &amp;quot;Date&amp;quot;, &amp;quot;Setting&amp;quot;, &amp;quot;URL&amp;quot;, &amp;quot;Language&amp;quot;, &amp;quot;Now Playing&amp;quot;, &amp;quot;Publisher&amp;quot;&lt;br /&gt;
**&#039;&#039;&#039;vlm_command&#039;&#039;&#039; or &#039;&#039;&#039;vlm_cmd&#039;&#039;&#039;: sends the command that is on the stack to the VLM (VideoLan Manager). Since the command can contain more than one component on the stack, it must be ended by an &#039;;&#039; or an empty string pushed on the stack (e.g.: param1=&amp;quot;&#039;;&#039; &#039;command&#039; &#039;my&#039; &#039;this is&#039; vlm_command&amp;quot;). Once the VLM has executed the command, the return value is assigned to the local variable &#039;&#039;&#039;vlm_value&#039;&#039;&#039; and the error string (if available) is assigned to &#039;&#039;&#039;vlm_error&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;snapshot&#039;&#039;&#039;: takes a snapshot&lt;br /&gt;
&lt;br /&gt;
*playlist functions:&lt;br /&gt;
**&#039;&#039;&#039;playlist_add&#039;&#039;&#039;: adds MRL ST(1) to the playlist, with name ST(2) and returns the playlist ID associated to this item; special characters must be escaped with addslashes first; it is very convenient to call &#039;toto.mpg&#039; playlist_add vlc_play&lt;br /&gt;
**&#039;&#039;&#039;playlist_empty&#039;&#039;&#039;: clears the playlist of all items&lt;br /&gt;
**&#039;&#039;&#039;playlist_move&#039;&#039;&#039;: moves playlist item at position ST(2) to position ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_delete&#039;&#039;&#039;: deletes playlist item ID ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_sort&#039;&#039;&#039;: sorts the playlist using the mode ST(2) and order ST(1). Available order values are 0 (normal order) and 1 (reverse order). Available mode values are 0 (sort by ID), 1 (sort by title), 2 (sort by title, nodes first), 3 (sort by author), 4 (sort by genre), 5 (sort randomly), 6 (sort by duration), 7 (numerically sort by title) and 8 (sort by album)&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_add&#039;&#039;&#039;: adds the service discovery ST(1) to the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_remove&#039;&#039;&#039;: removes the service discovery ST(1) from the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_is_loaded&#039;&#039;&#039;: checks if the service discovery ST(1) is loaded in the playlist, and pushes the answer on the stack&lt;br /&gt;
&lt;br /&gt;
==The macros==&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;control&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The use of the control macro is now deprecated in favour of the RPN functions above. The documentation is provided here for the maintainance of HTML pages still using this old API. The main problem with this API is that there is no way to retrieve the playlist ID of the last added item.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When asking for a page, you can give arguments to it through the url. (e.g. using a &amp;lt;form&amp;gt;). Ex: http://host:port/page.html?var=value&amp;amp;var2=value2&amp;amp;... The &amp;quot;control&amp;quot; macro tells a page to parse these arguments and to execute the ones that are allowed. param1 of this macro says which commands are allowed. If empty, all commands will be permitted.&lt;br /&gt;
&lt;br /&gt;
Some commands require an argument that must be passed in the URL too.&lt;br /&gt;
*URL commands&lt;br /&gt;
**Name, Argument, Description&lt;br /&gt;
**&#039;&#039;&#039;play&#039;&#039;&#039;, item (integer), Play the specified playlist item&lt;br /&gt;
**&#039;&#039;&#039;stop&#039;&#039;&#039;, ,Stop&lt;br /&gt;
**&#039;&#039;&#039;pause&#039;&#039;&#039;, Pause&lt;br /&gt;
**&#039;&#039;&#039;next&#039;&#039;&#039;, , Go to next playlist item&lt;br /&gt;
**&#039;&#039;&#039;previous&#039;&#039;&#039;, , Go to previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;add&#039;&#039;&#039;, mrl (string), Add a [[MRL]] to the playlist&lt;br /&gt;
**&#039;&#039;&#039;delete&#039;&#039;&#039;, item (integer), Delete the specified playlist item or list of playlist items&lt;br /&gt;
**&#039;&#039;&#039;empty&#039;&#039;&#039;, , Empty the playlist&lt;br /&gt;
**&#039;&#039;&#039;close&#039;&#039;&#039;, id (hexa), Close a specific connection&lt;br /&gt;
**&#039;&#039;&#039;shutdown&#039;&#039;&#039;, , Quit VLC&lt;br /&gt;
&lt;br /&gt;
For example, you can restrict execution of the &#039;&#039;&#039;shutdown&#039;&#039;&#039; command to protected page (through a &#039;&#039;.access&#039;&#039; file), using the control macro in all unprotected pages.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;include&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro is replaced by the contents of the file param1. If the file contains vlc macros, they are correctly parsed and replaced.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;get&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro will be replaced by the value of the configuration variable which name is stored in param1 and which type is given by param2.&lt;br /&gt;
&lt;br /&gt;
param1 must be the name of an existing configuration variable. param2 must be the right type of the variable. It can be one of &#039;&#039;int&#039;&#039;, &#039;&#039;float&#039;&#039;, or &#039;&#039;string&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;get&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt; will be replaced in the output page by the value of sout.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;set&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows to set the value of a configuration variable. The name is given by param1 and the type by param2 (like for get). The value is retrieved from the url using the name given in param1.&lt;br /&gt;
&lt;br /&gt;
For example, if player.html contains&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;set&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt;&lt;br /&gt;
and if you browse at &amp;lt;emphasis&amp;gt; http://host:ip/player.html?sout=sout_value&amp;lt;/emphasis&amp;gt;, the sout variable will be set to &amp;quot;sout_value&amp;quot;. If the URL doesn&#039;t contain sout, nothing will be done.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;rpn&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to interpret RPN commands. (See II).&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;if,else,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to control the parsing of the HTML page.&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. If the first element from the stack is not 0, the test value is true, else false..&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;if&amp;quot; param1=&amp;quot;1 2 =&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;amp;lt;!-- Never reached --&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;else&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;amp;lt;p&amp;gt; Test succeed: 1 isn&#039;t equal to 2 &amp;amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also just use &amp;quot;if&amp;quot; and &amp;quot;end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;value&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. The macro is replaced with the value of the first element of the stack.&lt;br /&gt;
&lt;br /&gt;
Note: If the element is the name of a local variable, its value will be displayed instead of its name.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;foreach,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
param1 is the name of the variable that will be used for the loop. param2 is the name of the set to be built:&lt;br /&gt;
*integer: take the first element from the stack to construct a set of integer. The stack element should be a string like: &#039;&#039;first:last[:step][,first2:last2[:step2][,...]&#039;&#039; (Ex:1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8)&lt;br /&gt;
*directory: take the first element of the stack as the base directory and construct a set of filename and directly in it. Each element has the following fields:&lt;br /&gt;
**basename: file/directory name&lt;br /&gt;
**name: complete file/directory name (including path)&lt;br /&gt;
**ext: file extension in lowercase&lt;br /&gt;
**type: &amp;quot;directory&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;unknown&amp;quot;&lt;br /&gt;
**size: size of the file&lt;br /&gt;
**date&lt;br /&gt;
*playlist: set based on the playlist with fields: current is 1 if item is currently selected, 0 else. index is the index value, that can be used by the play or delete control command. name is the&lt;br /&gt;
name of the item.&lt;br /&gt;
*&amp;quot;information&amp;quot;: Create information for the current playing stream. name is the name of the category, value is its value, info is a new set that can be parsed with a new foreach (subfields of info are name and value).&lt;br /&gt;
*input variables such as &amp;quot;program&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;chapter&amp;quot;, &amp;quot;audio-es&amp;quot;, &amp;quot;video-es&amp;quot; and &amp;quot;spu-es&amp;quot;: Create lists for the current playing stream. Every list has the following fields:&lt;br /&gt;
**name: item name (language for elementary streams, tracks, etc.) to display in places where a human-readable format is preferred&lt;br /&gt;
**id: item ID to pass to the RPN function vlc_var_set, and returned by vlc_var_get&lt;br /&gt;
**selected: 1 if the item is selected, 0 otherwise&lt;br /&gt;
*the name of a foreach variable if it&#039;s a set of set of value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;cat&amp;quot; param2=&amp;quot;informations&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;cat.name&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;ul&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;info&amp;quot; param2=&amp;quot;cat.info&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;li&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.name&amp;quot; /&amp;amp;gt; :&lt;br /&gt;
                    &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.value&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/li&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/ul&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, have a look at the share/http directory of the VLC source tree...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Help:Editing&amp;diff=22544</id>
		<title>Help:Editing</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Help:Editing&amp;diff=22544"/>
		<updated>2012-04-23T15:54:01Z</updated>

		<summary type="html">&lt;p&gt;Gth: Improved help reference added.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Help in editing the wiki and syntax reference can be found on [http://meta.wikimedia.org/wiki/Help:Editing wikimedia], which is the wiki software we use.&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Help_talk:Editing&amp;diff=22543</id>
		<title>Help talk:Editing</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Help_talk:Editing&amp;diff=22543"/>
		<updated>2012-04-23T15:53:38Z</updated>

		<summary type="html">&lt;p&gt;Gth: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Link to Wikimedia, not Wikipedia==&lt;br /&gt;
Shouldn&#039;t the Editing Help at the foot of an &#039;Editing&#039; Page, ie. the content of this page, link to a Wikimedia page, and not to a Wikipedia page? [[User:Stq|Stq]]&lt;br /&gt;
&lt;br /&gt;
:Agreed; it&#039;s a much better editing help reference, too.  The wikipedia one has various style guides for encyclopedic referencing, etc.  I&#039;ve updated the link.&lt;br /&gt;
&lt;br /&gt;
==External Link icon==&lt;br /&gt;
Anyone else see the videolan witch-hat obscuring the last few letters of any external link in their browser?&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22542</id>
		<title>Documentation:Building Pages for the HTTP Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Building_Pages_for_the_HTTP_Interface&amp;diff=22542"/>
		<updated>2012-04-23T15:46:00Z</updated>

		<summary type="html">&lt;p&gt;Gth: Formatted stack example into a table.  Also corrected text being mistaken for wiki code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation play howto toc}}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This appendix describes the language used for writing dynamic web pages for the HTTP interface.&lt;br /&gt;
&lt;br /&gt;
Pages must be placed in the share/http folder in either VLC&#039;s folder (Windows, Mac) or /usr/share/vlc/share/http or /usr/local/share/vlc/share/http (or wherever vlc&#039;s shared files are installed).&lt;br /&gt;
&lt;br /&gt;
Some files are handled a bit specially:&lt;br /&gt;
*Files beginning with &#039;.&#039; are not exported.&lt;br /&gt;
*A &#039;.access&#039; file will be opened and the http interface will expect to find at the first line a login/password (written as login:password). This login/password will be used to protect all files in this directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
* A &#039;.hosts&#039; file will be opened and the http interface will expect to find a list of network/mask pairs separated by new line, for instance 192.168.0.0/255.255.255.0. If this file is present, then the default behaviour is to deny access from hosts which don&#039;t match any of the network/mask pairs to all the files of the directory. If the file is not present, then any host has access to the files of the directory. Be careful that only files in this directory will be protected. (sub-directories won&#039;t be protected.)&lt;br /&gt;
*The file &amp;lt;dir&amp;gt;/index.html will be exported as &amp;lt;dir&amp;gt; and &amp;lt;dir&amp;gt;/ and not as index.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MIME type is set by looking at the file extension and cannot be specified nor modified for a specific file. Unknown extensions will have &amp;quot;application/octet-stream&amp;quot; as MIME type.&lt;br /&gt;
&lt;br /&gt;
You should avoid exporting big files. Each file is indeed first loaded into the memory before being sent to the client, so please be careful.&lt;br /&gt;
&lt;br /&gt;
==VLC macros==&lt;br /&gt;
&lt;br /&gt;
Each time a .html/.htm page is requested, it is parsed by VLC before being sent. The parser searches for the VLC macros, and executes or substitutes them. Moreover, URL arguments received by the GET method can be interpreted.&lt;br /&gt;
&lt;br /&gt;
A VLC macro looks like:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;macro-name&amp;quot; param1=&amp;quot;macro-parameters1&amp;quot; param2=&amp;quot;macro-parameters2&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;quot;id&amp;quot; is the only mandatory field, param1 and param2 may or may not be present and depend on the value of &amp;quot;id&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You should take care that you &#039;&#039;&#039;have to&#039;&#039;&#039; respect this syntax, VLC won&#039;t like invalid syntax. (It could easily leads to crashes).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Correct:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; /&amp;gt;&lt;br /&gt;
Incorrect:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;version&amp;quot; &amp;gt; (missing tag ending)&lt;br /&gt;
 &amp;lt;vlc id=value param1=&amp;quot;version&amp;quot; /&amp;gt; (missing &amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Valid macros are:&lt;br /&gt;
*&#039;&#039;&#039;control&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;include&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;get&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;set&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
*&#039;&#039;&#039;rpn&#039;&#039;&#039; (1 parameter)&lt;br /&gt;
*&#039;&#039;&#039;if&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;else&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;end&#039;&#039;&#039; (no parameter)&lt;br /&gt;
*&#039;&#039;&#039;value&#039;&#039;&#039; (1 optional parameter)&lt;br /&gt;
*&#039;&#039;&#039;foreach&#039;&#039;&#039; (2 parameters)&lt;br /&gt;
&lt;br /&gt;
For powerful macros, you may use these tools:&lt;br /&gt;
&lt;br /&gt;
*RPN Evaluator (see part 2)&lt;br /&gt;
*Stacks: The stack is a place where you can push numbers and strings, and then pop them backs. It&#039;s used with the little RPN evaluator.&lt;br /&gt;
*Local variables: You can dynamically create new variables and changes their values. Some local variables are predefined:&lt;br /&gt;
**&#039;&#039;&#039;url_value&#039;&#039;&#039;: parameter of the URL&lt;br /&gt;
**&#039;&#039;&#039;url_param&#039;&#039;&#039;: 1 if url_value isn&#039;t empty else 0&lt;br /&gt;
**&#039;&#039;&#039;version&#039;&#039;&#039;: the VLC version&lt;br /&gt;
**&#039;&#039;&#039;copyright&#039;&#039;&#039;: the VLC copyright&lt;br /&gt;
**&#039;&#039;&#039;vlc_compile_time, vlc_compile_by, vlc_compile_host, vlc_compile_domain, vlc_compiler, vlc_changeset&#039;&#039;&#039;: information on the VLC build&lt;br /&gt;
**&#039;&#039;&#039;stream_position, stream_time, stream_length, stream_state&#039;&#039;&#039;: information on the currently playing stream&lt;br /&gt;
**&#039;&#039;&#039;volume&#039;&#039;&#039;: current volume setting&lt;br /&gt;
&lt;br /&gt;
Remark: The stacks, and local variables context is reset before the page is executed.&lt;br /&gt;
&lt;br /&gt;
==The RPN evaluator==&lt;br /&gt;
&lt;br /&gt;
RPN means Reverse Polish Notation.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
RPN may look strange but it&#039;s a fast and easy way to write expressions. It also avoids the use of ( and ).&lt;br /&gt;
&lt;br /&gt;
Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *.&lt;br /&gt;
&lt;br /&gt;
The idea behind it is: if we have a number or a string (using &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;), push it on the stack. If it is an operator (like +),  pop the arguments from the stack, execute the operators and then push the result onto the stack. The result of the RPN sequence is the value on the top of the stack.  A step by step explanation of the sequence &#039;&#039;&#039;1 2 + 5 *&#039;&#039;&#039; is shown below, to illustrate this process:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Stack Contents&lt;br /&gt;
! Word&lt;br /&gt;
! Action taken on the stack&lt;br /&gt;
|-&lt;br /&gt;
| empty&lt;br /&gt;
| 1&lt;br /&gt;
| 1 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2 is pushed onto the stack, &#039;above&#039; 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 | 2&lt;br /&gt;
| +&lt;br /&gt;
| The plus operator results in removal of 1 and 2 from the stack, then write 3 onto the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 5&lt;br /&gt;
| 5 is pushed on the stack&lt;br /&gt;
|-&lt;br /&gt;
| 3 | 5&lt;br /&gt;
| *&lt;br /&gt;
| The multiplication operator removes 3 and 5 and writes 15 onto the stack.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
|&lt;br /&gt;
| Final result.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
&lt;br /&gt;
Notation: ST(1) means the first stack element, ST(2) the second one ... and op is the operator.&lt;br /&gt;
&lt;br /&gt;
You have access to :&lt;br /&gt;
&lt;br /&gt;
*Standard arithmetics operators: &#039;&#039;&#039;+, -, *, /, %&#039;&#039;&#039; these ones push the result of ST(1) op ST(2) onto the stack&lt;br /&gt;
&lt;br /&gt;
*Binary operators: &#039;&#039;&#039;!&#039;&#039;&#039; (push !ST(1)); &#039;&#039;&#039;^, &amp;amp;, |&#039;&#039;&#039;: push the result ST(1) op ST(2)&lt;br /&gt;
&lt;br /&gt;
*test: &#039;&#039;&#039;=, &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=&#039;&#039;&#039;: execute ST(1) op ST(2) and push -1 if true else 0&lt;br /&gt;
&lt;br /&gt;
*string functions:&lt;br /&gt;
**&#039;&#039;&#039;strcat&#039;&#039;&#039;: pushes the result of &#039;ST(1)ST(2)&lt;br /&gt;
**&#039;&#039;&#039;strcmp&#039;&#039;&#039;: compares ST(1) and ST(2) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strncmp&#039;&#039;&#039;: compares the first ST(1) characters of ST(2) and ST(3) (0 if equal)&lt;br /&gt;
**&#039;&#039;&#039;strsub&#039;&#039;&#039;: extracts characters ST(2) to ST(1) of string ST(3)&lt;br /&gt;
**&#039;&#039;&#039;strlen&#039;&#039;&#039;: pushes the length of ST(1)&lt;br /&gt;
**&#039;&#039;&#039;str_replace&#039;&#039;&#039;: replaces string ST(2) with ST(1) in ST(3)&lt;br /&gt;
**&#039;&#039;&#039;url_encode&#039;&#039;&#039;: encodes non-alphanumeric characters of ST(1) as %XX so that they can be safely passed as GET or POST variables&lt;br /&gt;
**&#039;&#039;&#039;url_extract&#039;&#039;&#039;: performs the reverse operation of url_encode&lt;br /&gt;
**&#039;&#039;&#039;addslashes&#039;&#039;&#039;: protects single quotes (&#039;) and double quotes (&amp;quot;) of ST(1) with backslashes (\) so that they can be safely passed to a VLC playlist function&lt;br /&gt;
**&#039;&#039;&#039;stripslashes&#039;&#039;&#039;: performs the reverse operation of addslashes&lt;br /&gt;
**&#039;&#039;&#039;htmlspecialchars&#039;&#039;&#039;: encodes &amp;amp;, &#039;, &amp;quot;, &amp;lt;, and &amp;gt; of ST(1) as their &amp;amp;stuff; HTML counterpart, so that they don&#039;t interact with HTML tags&lt;br /&gt;
**&#039;&#039;&#039;realpath&#039;&#039;&#039;: parses ST(1) as a filename path, and pushes an absolute path to that file, removing ~ and ../&lt;br /&gt;
&lt;br /&gt;
*stack manipulation:&lt;br /&gt;
**&#039;&#039;&#039;dup&#039;&#039;&#039;: pops ST(1) and pushes the same string twice&lt;br /&gt;
**&#039;&#039;&#039;drop&#039;&#039;&#039;: pops ST(1) and drops it&lt;br /&gt;
**&#039;&#039;&#039;swap&#039;&#039;&#039;: exchanges ST(1) and ST(2)&lt;br /&gt;
**&#039;&#039;&#039;flush&#039;&#039;&#039;: empties the stack&lt;br /&gt;
&lt;br /&gt;
*variables manipulation:&lt;br /&gt;
**&#039;&#039;&#039;store&#039;&#039;&#039;: stores ST(2) in a local variable named ST(1)&lt;br /&gt;
**&#039;&#039;&#039;value&#039;&#039;&#039;: pushes the value of the local variable named ST(1)&lt;br /&gt;
&lt;br /&gt;
*player control:&lt;br /&gt;
**&#039;&#039;&#039;vlc_play&#039;&#039;&#039;: plays the playlist item whose ID is ST(1), and pushes the return value of the play function (0 in case of success); see playlist functions below&lt;br /&gt;
**&#039;&#039;&#039;vlc_stop&#039;&#039;&#039;: stops the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_pause&#039;&#039;&#039;: pauses the playlist&lt;br /&gt;
**&#039;&#039;&#039;vlc_next&#039;&#039;&#039;: plays the next playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_previous&#039;&#039;&#039;: plays the previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;vlc_seek&#039;&#039;&#039;: seeks the current input to a location defined in ST(1), for instance+3m (minutes), -20s, 45%, 1:12, 1h12m25s&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_type&#039;&#039;&#039;: pushes the type of the variable ST(2) of object ST(1); the type is one of these strings &#039;&#039;&#039;VLC_VAR_BOOL, VLC_VAR_INTEGER, VLC_VAR_HOTKEY, VLC_VAR_STRING, VLC_VAR_MODULE, VLC_VAR_FILE, VLC_VAR_DIRECTORY, VLC_VAR_VARIABLE, VLC_VAR_FLOAT, UNDEFINED&#039;&#039;&#039; (no such variable) or &#039;&#039;&#039;INVALID&#039;&#039;&#039; (no input stream); the object is one of &#039;&#039;&#039;VLC_OBJECT_ROOT, VLC_OBJECT_VLC, VLC_OBJECT_INTF, VLC_OBJECT_PLAYLIST, VLC_OBJECT_INPUT, VLC_OBJECT_VOUT, VLC_OBJECT_AOUT&#039;&#039;&#039; or &#039;&#039;&#039;VLC_OBJECT_SOUT&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_set&#039;&#039;&#039;: sets variable ST(2) of object ST(1) to ST(3)&lt;br /&gt;
**&#039;&#039;&#039;vlc_var_get&#039;&#039;&#039;: pushes the value of the variable ST(2) of object ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_object_exists&#039;&#039;&#039;: checks if object ST(1) exists&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_type&#039;&#039;&#039;: pushes the type of the configuration variable ST(1); see &#039;&#039;&#039;vlc_var_type&#039;&#039;&#039; for a list of types&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_set&#039;&#039;&#039;:  sets configuration variable ST(1) to ST(2)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_get&#039;&#039;&#039;: pushes the value of the configuration variable ST(1)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_save&#039;&#039;&#039;: saves the modification made to the configuration variables of module ST(1) to the configuration file (ST(1) may be empty, in which case the whole configuration is saved) and pushes the return status (0 in case of success)&lt;br /&gt;
**&#039;&#039;&#039;vlc_config_reset&#039;&#039;&#039;: resets the configuration file to the default value (use with caution)&lt;br /&gt;
**&#039;&#039;&#039;vlc_volume_set&#039;&#039;&#039;: sets the volume value to ST(1) which can be a raw value between 0 and 1024, or a relative one between 0% and 400%, where 1% is equal to the maximum volume value divided by 400 (thus, the maximum volume value is equal to 400%, that is 1024). If ST(1) begins with a &#039;+&#039; (or &#039;-&#039;) operator, the volume is increased (or decreased) by the raw value which follows this operator&lt;br /&gt;
**&#039;&#039;&#039;vlc_get_meta&#039;&#039;&#039;: pushes the value of the meta information named by ST(1) from the stream being played. Available meta names are: &amp;quot;Title&amp;quot; (or &amp;quot;TITLE&amp;quot;), &amp;quot;Author&amp;quot;, &amp;quot;Artist&amp;quot; (or &amp;quot;ARTIST&amp;quot;), &amp;quot;Genre&amp;quot; (or &amp;quot;GENRE&amp;quot;), &amp;quot;Copyright&amp;quot;, &amp;quot;Album/movie/show title&amp;quot; (or &amp;quot;ALBUM&amp;quot;), &amp;quot;Track number/position in set&amp;quot;, &amp;quot;Description&amp;quot;, &amp;quot;Rating&amp;quot;, &amp;quot;Date&amp;quot;, &amp;quot;Setting&amp;quot;, &amp;quot;URL&amp;quot;, &amp;quot;Language&amp;quot;, &amp;quot;Now Playing&amp;quot;, &amp;quot;Publisher&amp;quot;&lt;br /&gt;
**&#039;&#039;&#039;vlm_command&#039;&#039;&#039; or &#039;&#039;&#039;vlm_cmd&#039;&#039;&#039;: sends the command that is on the stack to the VLM (VideoLan Manager). Since the command can contain more than one component on the stack, it must be ended by an &#039;;&#039; or an empty string pushed on the stack (e.g.: param1=&amp;quot;&#039;;&#039; &#039;command&#039; &#039;my&#039; &#039;this is&#039; vlm_command&amp;quot;). Once the VLM has executed the command, the return value is assigned to the local variable &#039;&#039;&#039;vlm_value&#039;&#039;&#039; and the error string (if available) is assigned to &#039;&#039;&#039;vlm_error&#039;&#039;&#039;&lt;br /&gt;
**&#039;&#039;&#039;snapshot&#039;&#039;&#039;: takes a snapshot&lt;br /&gt;
&lt;br /&gt;
*playlist functions:&lt;br /&gt;
**&#039;&#039;&#039;playlist_add&#039;&#039;&#039;: adds MRL ST(1) to the playlist, with name ST(2) and returns the playlist ID associated to this item; special characters must be escaped with addslashes first; it is very convenient to call &#039;toto.mpg&#039; playlist_add vlc_play&lt;br /&gt;
**&#039;&#039;&#039;playlist_empty&#039;&#039;&#039;: clears the playlist of all items&lt;br /&gt;
**&#039;&#039;&#039;playlist_move&#039;&#039;&#039;: moves playlist item at position ST(2) to position ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_delete&#039;&#039;&#039;: deletes playlist item ID ST(1)&lt;br /&gt;
**&#039;&#039;&#039;playlist_sort&#039;&#039;&#039;: sorts the playlist using the mode ST(2) and order ST(1). Available order values are 0 (normal order) and 1 (reverse order). Available mode values are 0 (sort by ID), 1 (sort by title), 2 (sort by title, nodes first), 3 (sort by author), 4 (sort by genre), 5 (sort randomly), 6 (sort by duration), 7 (numerically sort by title) and 8 (sort by album)&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_add&#039;&#039;&#039;: adds the service discovery ST(1) to the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_remove&#039;&#039;&#039;: removes the service discovery ST(1) from the playlist&lt;br /&gt;
**&#039;&#039;&#039;services_discovery_is_loaded&#039;&#039;&#039;: checks if the service discovery ST(1) is loaded in the playlist, and pushes the answer on the stack&lt;br /&gt;
&lt;br /&gt;
==The macros==&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;control&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The use of the control macro is now deprecated in favour of the RPN functions above. The documentation is provided here for the maintainance of HTML pages still using this old API. The main problem with this API is that there is no way to retrieve the playlist ID of the last added item.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When asking for a page, you can give arguments to it through the url. (e.g. using a &amp;lt;form&amp;gt;). Ex: http://host:port/page.html?var=value&amp;amp;var2=value2&amp;amp;... The &amp;quot;control&amp;quot; macro tells a page to parse these arguments and to execute the ones that are allowed. param1 of this macro says which commands are allowed. If empty, all commands will be permitted.&lt;br /&gt;
&lt;br /&gt;
Some commands require an argument that must be passed in the URL too.&lt;br /&gt;
*URL commands&lt;br /&gt;
**Name, Argument, Description&lt;br /&gt;
**&#039;&#039;&#039;play&#039;&#039;&#039;, item (integer), Play the specified playlist item&lt;br /&gt;
**&#039;&#039;&#039;stop&#039;&#039;&#039;, ,Stop&lt;br /&gt;
**&#039;&#039;&#039;pause&#039;&#039;&#039;, Pause&lt;br /&gt;
**&#039;&#039;&#039;next&#039;&#039;&#039;, , Go to next playlist item&lt;br /&gt;
**&#039;&#039;&#039;previous&#039;&#039;&#039;, , Go to previous playlist item&lt;br /&gt;
**&#039;&#039;&#039;add&#039;&#039;&#039;, mrl (string), Add a [[MRL]] to the playlist&lt;br /&gt;
**&#039;&#039;&#039;delete&#039;&#039;&#039;, item (integer), Delete the specified playlist item or list of playlist items&lt;br /&gt;
**&#039;&#039;&#039;empty&#039;&#039;&#039;, , Empty the playlist&lt;br /&gt;
**&#039;&#039;&#039;close&#039;&#039;&#039;, id (hexa), Close a specific connection&lt;br /&gt;
**&#039;&#039;&#039;shutdown&#039;&#039;&#039;, , Quit VLC&lt;br /&gt;
&lt;br /&gt;
For example, you can restrict execution of the &#039;&#039;&#039;shutdown&#039;&#039;&#039; command to protected page (through a &#039;&#039;.access&#039;&#039; file), using the control macro in all unprotected pages.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;include&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro is replaced by the contents of the file param1. If the file contains vlc macros, they are correctly parsed and replaced.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;get&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro will be replaced by the value of the configuration variable which name is stored in param1 and which type is given by param2.&lt;br /&gt;
&lt;br /&gt;
param1 must be the name of an existing configuration variable. param2 must be the right type of the variable. It can be one of &#039;&#039;int&#039;&#039;, &#039;&#039;float&#039;&#039;, or &#039;&#039;string&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;get&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt; will be replaced in the output page by the value of sout.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;set&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows to set the value of a configuration variable. The name is given by param1 and the type by param2 (like for get). The value is retrieved from the url using the name given in param1.&lt;br /&gt;
&lt;br /&gt;
For example, if player.html contains&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;set&amp;quot; param1=&amp;quot;sout&amp;quot; param2=&amp;quot;string&amp;quot; /&amp;gt;&lt;br /&gt;
and if you browse at &amp;lt;emphasis&amp;gt; http://host:ip/player.html?sout=sout_value&amp;lt;/emphasis&amp;gt;, the sout variable will be set to &amp;quot;sout_value&amp;quot;. If the URL doesn&#039;t contain sout, nothing will be done.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;rpn&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to interpret RPN commands. (See II).&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;if,else,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
This macro allows you to control the parsing of the HTML page.&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. If the first element from the stack is not 0, the test value is true, else false..&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;if&amp;quot; param1=&amp;quot;1 2 =&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;amp;lt;!-- Never reached --&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;else&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;amp;lt;p&amp;gt; Test succeed: 1 isn&#039;t equal to 2 &amp;amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also just use &amp;quot;if&amp;quot; and &amp;quot;end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;value&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
If param1 isn&#039;t empty, it is first executed with the RPN evaluator. The macro is replaced with the value of the first element of the stack.&lt;br /&gt;
&lt;br /&gt;
Note: If the element is the name of a local variable, its value will be displayed instead of its name.&lt;br /&gt;
&lt;br /&gt;
===The &#039;&#039;foreach,end&#039;&#039; macro===&lt;br /&gt;
&lt;br /&gt;
param1 is the name of the variable that will be used for the loop. param2 is the name of the set to be built:&lt;br /&gt;
*integer: take the first element from the stack to construct a set of integer. The stack element should be a string like: &#039;&#039;first:last[:step][,first2:last2[:step2][,...]&#039;&#039; (Ex:1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8)&lt;br /&gt;
*directory: take the first element of the stack as the base directory and construct a set of filename and directly in it. Each element has the following fields:&lt;br /&gt;
**basename: file/directory name&lt;br /&gt;
**name: complete file/directory name (including path)&lt;br /&gt;
**ext: file extension in lowercase&lt;br /&gt;
**type: &amp;quot;directory&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;unknown&amp;quot;&lt;br /&gt;
**size: size of the file&lt;br /&gt;
**date&lt;br /&gt;
*playlist: set based on the playlist with fields: current is 1 if item is currently selected, 0 else. index is the index value, that can be used by the play or delete control command. name is the&lt;br /&gt;
name of the item.&lt;br /&gt;
*&amp;quot;information&amp;quot;: Create information for the current playing stream. name is the name of the category, value is its value, info is a new set that can be parsed with a new foreach (subfields of info are name and value).&lt;br /&gt;
*input variables such as &amp;quot;program&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;chapter&amp;quot;, &amp;quot;audio-es&amp;quot;, &amp;quot;video-es&amp;quot; and &amp;quot;spu-es&amp;quot;: Create lists for the current playing stream. Every list has the following fields:&lt;br /&gt;
**name: item name (language for elementary streams, tracks, etc.) to display in places where a human-readable format is preferred&lt;br /&gt;
**id: item ID to pass to the RPN function vlc_var_set, and returned by vlc_var_get&lt;br /&gt;
**selected: 1 if the item is selected, 0 otherwise&lt;br /&gt;
*the name of a foreach variable if it&#039;s a set of set of value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;cat&amp;quot; param2=&amp;quot;informations&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;cat.name&amp;quot; /&amp;amp;gt;&lt;br /&gt;
     &amp;amp;lt;ul&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;vlc id=&amp;quot;foreach&amp;quot; param1=&amp;quot;info&amp;quot; param2=&amp;quot;cat.info&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;li&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.name&amp;quot; /&amp;amp;gt; :&lt;br /&gt;
                    &amp;amp;lt;vlc id=&amp;quot;value&amp;quot; param1=&amp;quot;info.value&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/li&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/ul&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;vlc id=&amp;quot;end&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, have a look at the share/http directory of the VLC source tree...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Gth</name></author>
	</entry>
</feed>