Difference between revisions of "Documentation:Streaming HowTo/Advanced Streaming Using the Command Line"

From VideoLAN Wiki
Jump to navigation Jump to search
(Put in the documentation category (this still needs to be wikified))
(started converting to wiki, man this is big! some one help)
Line 1: Line 1:
<?xml version="1.0" encoding="UTF-8"?>
+
==Advanced streaming using the command line==
<chapter id="cmdline"><title id="tcmdline">
 
Advanced streaming using the command line</title>
 
  
 
<!-- TODO :  
 
<!-- TODO :  
Line 15: Line 13:
 
-->
 
-->
  
<sect1><title>Structure of stream output</title>
+
===Structure of stream output===
  
<para>
+
Stream output is the name of the feature of VLC that allows to output any stream read by VLC to a file or as a network stream instead of displaying it. Different kind of processing can be applied to the stream during this process (transcoding, re-scaling, filters, re-muxing...). Stream output includes different modules, each of them having different capabilities. You can ''chain'' modules to enhance the possibilities.
  
Stream output is the name of the feature of VLC that allows to output
 
any stream read by VLC to a file or as a network stream instead of
 
displaying it. Different kind of processing can be applied to the stream
 
during this process (transcoding, re-scaling, filters, re-muxing...)
 
 
Stream output includes different modules, each of them having different
 
capabilities. You can <emphasis>chain</emphasis> modules to enhance the
 
possibilities. </para>
 
 
<para>
 
 
Here is the list of the modules currently available:
 
Here is the list of the modules currently available:
</para>
 
 
<itemizedlist>
 
  
<listitem><para><emphasis>standard</emphasis>
+
''standard'' allows to ''send'' the stream via an ''access output'' module: for example, UDP, file, HTTP, ... You will probably want to use this module at the end of your chains.
allows to <emphasis>send</emphasis> the stream via an <emphasis>access
 
output</emphasis> module: for example, UDP, file, HTTP, ... You will
 
probably want to use this module at the end of your chains.
 
  
</para></listitem>
+
''transcode'' is used to transcode (decode and re-encode the stream using a different codec and/or bitrate) the audio and the video of the input stream. If the input or output access method doesn't allow pace control (network, capture devices), this done "on the fly", in real time. This can require quite a lot of CPU power, depending on the parameters set. Other streams, such as files and disks are transcoded as fast as the system allows it.
  
<listitem><para><emphasis>transcode</emphasis> is used to transcode
+
''duplicate'' allows you to create a second chain, where the stream will be handled in an independent way.
(decode and re-encode the stream using a different codec and/or bitrate)
 
the audio and the video of the input stream. If the input or output
 
access method doesn't allow pace control (network, capture devices),
 
this done "on the fly", in real time. This can require quite a lot
 
of CPU power, depending on the parameters set. Other streams, such
 
as files and disks are transcoded as fast as the system allows it.
 
</para></listitem>
 
  
<listitem><para><emphasis>duplicate</emphasis>
+
''display'' allows you to display the input stream, as VLC would normally do. Used with the ''duplicate'' module, this allows you to monitor the stream while processing it.
allows you to create a second chain, where the
 
stream will be handled in an independent way.
 
</para></listitem>
 
  
<listitem><para><emphasis>display</emphasis>
+
''rtp'' streams over RTP (one UDP port for each elementary stream). This module also allows RTSP support.
allows you to display the input stream, as VLC
 
would normally do. Used with the <emphasis>duplicate</emphasis>
 
module, this allows you to monitor the stream while processing it.
 
</para></listitem>
 
  
<listitem><para><emphasis>rtp</emphasis> streams over RTP (one UDP port
+
''es'' allows you to make separate Elementary Streams (ES) out of an input stream. This can be used to save audio and video streams to separate files, for instance.
for each elementary stream). This module also allows RTSP support.
 
</para></listitem>
 
  
<listitem><para><emphasis>es</emphasis> allows you to make separate
 
Elementary Streams (ES) out of an input stream. This can be used
 
to save audio and video streams to separate files, for instance.
 
</para></listitem>
 
 
</itemizedlist>
 
 
<para>
 
 
Each of these modules may take options. Here is the
 
Each of these modules may take options. Here is the
 
syntax that you must use:
 
syntax that you must use:
</para>
 
  
<screen>
 
<prompt>% </prompt><userinput>vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option2=parameter2}:module2{option1=...,option2=...}:..."</userinput>
 
</screen>
 
  
<note><para>Some of the module options (option1 in the example) have to
+
<pre>% vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option2=parameter2}:module2{option1=...,option2=...}:..."
be set, others are optional. Option parameters (parameter-option1 in the
+
</pre>
example) are always optional. These option parameters are also often
+
 
very advanced settings. If you don't understand their description, this
+
'''NOTE:''' Some of the module options (option1 in the example) have to be set, others are optional. Option parameters (parameter-option1 in the example) are always optional. These option parameters are also often very advanced settings. If you don't understand their description, this certainly means that you don't need them.
certainly means that you don't need them.</para></note>
 
  
<para>
 
 
You may also use the following syntax :
 
You may also use the following syntax :
</para>
 
  
<screen>
+
<pre>% vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-module2-option1=... --sout-module2-option2=... ...
<prompt>% </prompt><userinput>vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-module2-option1=... --sout-module2-option2=... ...</userinput>
+
</pre>
</screen>
 
  
<para>
 
 
For example, to transcode a stream and send it, use:
 
For example, to transcode a stream and send it, use:
</para>
 
  
<screen>
+
<pre>
<prompt>% </prompt><userinput>vlc input_stream --sout '#transcode{options}:standard{options}'</userinput>
+
% vlc input_stream --sout '#transcode{options}:standard{options}'
</screen>
+
</pre>
  
</sect1>
+
===Description of the modules===
  
<sect1><title>Description of the modules</title>
+
===standard (alias std)===
  
<sect2><title>standard (alias std)</title>
+
This module saves the stream to a file or sends it over a network, after having muxed it.
  
<para>
+
The available options are:
This module saves the stream to a file or sends it over a network, after
 
having muxed it.
 
</para>
 
  
<para>The available options are:</para>
+
====access\=====
 
 
<sect3><title>access=</title>
 
  
<para>This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are:</para>
+
</pre>This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are:</pre>
  
 
<itemizedlist>
 
<itemizedlist>
<listitem><para>file: saves the stream to a file.</para>
+
<listitem></pre>file: saves the stream to a file.</pre>
<para>Use the <emphasis>append</emphasis> option to append the stream to an existing file instead of replacing it.</para></listitem>
+
</pre>Use the ''append'' option to append the stream to an existing file instead of replacing it.</pre></listitem>
  
<listitem><para>udp: streams to a UDP unicast or multicast
+
<listitem></pre>udp: streams to a UDP unicast or multicast
address.</para>
+
address.</pre>
<para>Item options are: <emphasis>caching=&lt;time in
+
</pre>Item options are: ''caching=&lt;time in
ms&gt;</emphasis> to set the time VLC should buffer data before sending
+
ms&gt;'' to set the time VLC should buffer data before sending
it, <emphasis>ttl=&lt;ttl&gt;</emphasis> to set the ttl of the sent udp
+
it, ''ttl=&lt;ttl&gt;'' to set the ttl of the sent udp
packets, <emphasis>group=&lt;amount of packets&gt;</emphasis> to sent
+
packets, ''group=&lt;amount of packets&gt;'' to sent
packets by burst instead of one by one, <emphasis>late=&lt;time in
+
packets by burst instead of one by one, ''late=&lt;time in
ms&gt;</emphasis> to drop packets that arrive too late at this stage of
+
ms&gt;'' to drop packets that arrive too late at this stage of
the chain, <emphasis>raw</emphasis> if you don't want to wait until the
+
the chain, ''raw'' if you don't want to wait until the
MTU is filled before sending the packet.</para> </listitem>
+
MTU is filled before sending the packet.</pre> </listitem>
  
<listitem><para>http: streams over HTTP.</para> <para>Item
+
<listitem></pre>http: streams over HTTP.</pre> </pre>Item
options are: <emphasis>user=&lt;user name&gt;</emphasis>
+
options are: ''user=&lt;user name&gt;''
 
to enable HTTP basic authentication and set the user,
 
to enable HTTP basic authentication and set the user,
<emphasis>pwd=&lt;password&gt;</emphasis> to set the basic
+
''pwd=&lt;password&gt;'' to set the basic
authentication password, <emphasis>mime=&lt;mime type&gt;</emphasis>
+
authentication password, ''mime=&lt;mime type&gt;''
to set the mime type returned by the server.</para></listitem>
+
to set the mime type returned by the server.</pre></listitem>
  
<listitem><para>https: streams over HTTP, using a secured SSL
+
<listitem></pre>https: streams over HTTP, using a secured SSL
connection.</para>
+
connection.</pre>
  
<para>Item options are the same as for http and: <emphasis>cert=&lt;path
+
</pre>Item options are the same as for http and: ''cert=&lt;path
to certificate&gt;</emphasis>to set the certificate to use,
+
to certificate&gt;''to set the certificate to use,
<emphasis>key=&lt;path to key&gt;</emphasis> to set the private key file
+
''key=&lt;path to key&gt;'' to set the private key file
the server should use for the SSL connection, <emphasis>ca=&lt;path
+
the server should use for the SSL connection, ''ca=&lt;path
to certificate&gt;</emphasis> to set the path to the root
+
to certificate&gt;'' to set the path to the root
CA certificates to use for SSL, <emphasis>crl=&lt;path to
+
CA certificates to use for SSL, ''crl=&lt;path to
certificate&gt;</emphasis> to set the revocation certificate to use for
+
certificate&gt;'' to set the revocation certificate to use for
the SSL connection.</para></listitem>
+
the SSL connection.</pre></listitem>
  
<listitem><para>mmsh: streams using the Microsoft MMS protocol. This
+
<listitem></pre>mmsh: streams using the Microsoft MMS protocol. This
 
protocol is used as transport method by many Microsoft's softwares.
 
protocol is used as transport method by many Microsoft's softwares.
 
Note that only a small part of the MMS protocol is supported (MMS
 
Note that only a small part of the MMS protocol is supported (MMS
encapsulated in HTTP).</para>
+
encapsulated in HTTP).</pre>
<para>Item options are the same as for the http module.</para></listitem>
+
</pre>Item options are the same as for the http module.</pre></listitem>
  
<listitem><para>rtp: streams over RTP. Please note that this is
+
<listitem></pre>rtp: streams over RTP. Please note that this is
 
a legacy module. It doesn't allow RTSP and can only be used to stream
 
a legacy module. It doesn't allow RTSP and can only be used to stream
TS streams. Please have a look at the <emphasis>rtp</emphasis> stream
+
TS streams. Please have a look at the ''rtp'' stream
output module for a more compliant and complete RTP streamer.</para>
+
output module for a more compliant and complete RTP streamer.</pre>
<para>Options are the same as for the <emphasis>udp</emphasis> setting.</para></listitem>
+
</pre>Options are the same as for the ''udp'' setting.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
 
</sect3>
 
</sect3>
 
<sect3><title>mux=</title>
 
<sect3><title>mux=</title>
<para> This option allows you to set the encapsulation method used for the resulting stream. This option has to be set.</para>
+
</pre> This option allows you to set the encapsulation method used for the resulting stream. This option has to be set.</pre>
  
<para>Available options are: </para>
+
</pre>Available options are: </pre>
  
 
<itemizedlist>
 
<itemizedlist>
<listitem><para><emphasis>ts:</emphasis> the MPEG2/TS muxer. This the
+
<listitem></pre>''ts:'' the MPEG2/TS muxer. This the
 
standard muxer used to stream MPEG 2. This muxer can be used with any
 
standard muxer used to stream MPEG 2. This muxer can be used with any
<emphasis>access</emphasis> method. Supported codecs are MPEG 1/2/4,
+
''access'' method. Supported codecs are MPEG 1/2/4,
 
MJPEG, H263, H264, I263, WMV 1/2 and theora for video, MPEG audio, AAC and
 
MJPEG, H263, H264, I263, WMV 1/2 and theora for video, MPEG audio, AAC and
a52 for the audio stream.</para>
+
a52 for the audio stream.</pre>
  
<para>Item options are: <emphasis>pid-video=&lt;pid&gt;</emphasis>
+
</pre>Item options are: ''pid-video=&lt;pid&gt;''
 
to set the PID of the video track,
 
to set the PID of the video track,
<emphasis>pid-audio=&lt;pid&gt;</emphasis> to set the PID of the audio
+
''pid-audio=&lt;pid&gt;'' to set the PID of the audio
track, <emphasis>pid-spu=&lt;pid&gt;</emphasis> to set the PID of the
+
track, ''pid-spu=&lt;pid&gt;'' to set the PID of the
subtitle track, <emphasis>pid-pmt=&lt;pid&gt;</emphasis> to set the PID
+
subtitle track, ''pid-pmt=&lt;pid&gt;'' to set the PID
of the PMT (Program Map Table), <emphasis>tsid=&lt;id&gt;</emphasis> to
+
of the PMT (Program Map Table), ''tsid=&lt;id&gt;'' to
set the ID of the resulting TS stream, <emphasis>shaping=&lt;shaping
+
set the ID of the resulting TS stream, ''shaping=&lt;shaping
delay in ms&gt;</emphasis> to set the minimum interval during
+
delay in ms&gt;'' to set the minimum interval during
 
which the bitrate of the stream will remain constant, for variable
 
which the bitrate of the stream will remain constant, for variable
bitrate streams, <emphasis>use-key-frames</emphasis> uses I frames
+
bitrate streams, ''use-key-frames'' uses I frames
as limits for the shaping intervals, <emphasis>pcr=&lt;PCR interval
+
as limits for the shaping intervals, ''pcr=&lt;PCR interval
in ms&gt;</emphasis> allows to set at which interval Program
+
in ms&gt;'' allows to set at which interval Program
Clock References will be sent, <emphasis>dts-delay=&lt;delay
+
Clock References will be sent, ''dts-delay=&lt;delay
in ms&gt;</emphasis> allows to delay PTS (Presentation Time
+
in ms&gt;'' allows to delay PTS (Presentation Time
 
Stamps) from the DTS (Decoding Time Stamp) from the given time,
 
Stamps) from the DTS (Decoding Time Stamp) from the given time,
<emphasis>crypt-audio</emphasis> allows to enable encryption of the
+
''crypt-audio'' allows to enable encryption of the
audio track using the CSA algorithm, <emphasis>csa-ck=&lt;key as a
+
audio track using the CSA algorithm, ''csa-ck=&lt;key as a
16 character word&gt;</emphasis> allows to set the key used for CSA
+
16 character word&gt;'' allows to set the key used for CSA
encryption.</para></listitem>
+
encryption.</pre></listitem>
  
<listitem><para><emphasis>ps:</emphasis> the MPEG2/PS muxer. This the standard muxer for MPEG
+
<listitem></pre>''ps:'' the MPEG2/PS muxer. This the standard muxer for MPEG
 
2 files(.mpg). It can be used with the file and http output methods.
 
2 files(.mpg). It can be used with the file and http output methods.
 
Supported codecs are MPEG 1/2 and MJPEG for video, MPEG audio and a52 for
 
Supported codecs are MPEG 1/2 and MJPEG for video, MPEG audio and a52 for
audio streams.</para>
+
audio streams.</pre>
  
<para>The only available item option is <emphasis>dst-delay=&lt;delay
+
</pre>The only available item option is ''dst-delay=&lt;delay
in ms&gt;</emphasis>. It allows to delay PTS (Presentation
+
in ms&gt;''. It allows to delay PTS (Presentation
 
Time Stamps) from the DTS (Decoding Time Stamp) from the given
 
Time Stamps) from the DTS (Decoding Time Stamp) from the given
time.</para></listitem>
+
time.</pre></listitem>
  
<listitem><para><emphasis>mpeg1:</emphasis> the standard MPEG 1 muxer. This muxer should be
+
<listitem></pre>''mpeg1:'' the standard MPEG 1 muxer. This muxer should be
 
used instead of ps with MPEG 1 video streams, when saved to a file or
 
used instead of ps with MPEG 1 video streams, when saved to a file or
streamed over HTTP. Supported codecs are MPEG 1 and MPEG audio.</para>
+
streamed over HTTP. Supported codecs are MPEG 1 and MPEG audio.</pre>
<para>Items options are the same as for the PS muxer.</para></listitem>
+
</pre>Items options are the same as for the PS muxer.</pre></listitem>
  
<listitem><para><emphasis>ogg:</emphasis> the ogg muxer. This is the muxer from the Xiph
+
<listitem></pre>''ogg:'' the ogg muxer. This is the muxer from the Xiph
 
project. It can be used with the HTTP and file output methods. Supported
 
project. It can be used with the HTTP and file output methods. Supported
 
codecs are MPEG 1/2/4, MJPEG WMV 1/2 and Theora, audio streams can be vorbis,
 
codecs are MPEG 1/2/4, MJPEG WMV 1/2 and Theora, audio streams can be vorbis,
flac, speex, a52 or MPEG audio.</para>
+
flac, speex, a52 or MPEG audio.</pre>
<para>There is no item option for this muxer.</para></listitem>
+
</pre>There is no item option for this muxer.</pre></listitem>
  
<listitem><para><emphasis>asf:</emphasis> the Microsoft ASF muxer. This is the standard muxer
+
<listitem></pre>''asf:'' the Microsoft ASF muxer. This is the standard muxer
 
used for streaming by Microsoft's softwares. Is also used as container
 
used for streaming by Microsoft's softwares. Is also used as container
 
for WMA audio files. This muxer can be used with the file and HTTP
 
for WMA audio files. This muxer can be used with the file and HTTP
 
output methods. Supported codecs are MPEG 4, MJPEG, WMV 1/2 for video,
 
output methods. Supported codecs are MPEG 4, MJPEG, WMV 1/2 for video,
MPEG audio, a52 for audio streams.</para>
+
MPEG audio, a52 for audio streams.</pre>
  
<para>Item options are:  
+
</pre>Item options are:  
<emphasis>title=&lt;title&gt;</emphasis>,
+
''title=&lt;title&gt;'',
<emphasis>autor=&lt;author&gt;</emphasis>,
+
''autor=&lt;author&gt;'',
<emphasis>copyright=&lt;copyright message&gt;</emphasis>,
+
''copyright=&lt;copyright message&gt;'',
<emphasis>comment=&lt;comments&gt;</emphasis>,
+
''comment=&lt;comments&gt;'',
<emphasis>rating=&lt;rating&gt;</emphasis> allow you to set what will be displayed in the according field of the stream comments.</para></listitem>
+
''rating=&lt;rating&gt;'' allow you to set what will be displayed in the according field of the stream comments.</pre></listitem>
  
<listitem><para><emphasis>asfh:</emphasis> this is a special version of the ASF muxer, that
+
<listitem></pre>''asfh:'' this is a special version of the ASF muxer, that
 
should be used for MMSH streaming. MMSH is the only supported output
 
should be used for MMSH streaming. MMSH is the only supported output
method. Supported codecs are the same as for ASF.</para>
+
method. Supported codecs are the same as for ASF.</pre>
<para>Item options are the same as for ASF.</para></listitem>
+
</pre>Item options are the same as for ASF.</pre></listitem>
  
<listitem><para><emphasis>avi:</emphasis> the Microsoft AVI muxer. This is very common
+
<listitem></pre>''avi:'' the Microsoft AVI muxer. This is very common
 
encapsulation format for MPEG 4 files. The only supported output method
 
encapsulation format for MPEG 4 files. The only supported output method
 
is file. Supported codecs are MPEG 1/2/4, H263, H264 and I263 for video,
 
is file. Supported codecs are MPEG 1/2/4, H263, H264 and I263 for video,
MPEG audio and a52 for audio streams.</para>
+
MPEG audio and a52 for audio streams.</pre>
<para>There is not item option for this muxer.</para></listitem>
+
</pre>There is not item option for this muxer.</pre></listitem>
  
<listitem><para><emphasis>mpjpeg:</emphasis> the multipart jpeg muxer.
+
<listitem></pre>''mpjpeg:'' the multipart jpeg muxer.
 
This encapsulation format is mostly used on surveillance video cameras
 
This encapsulation format is mostly used on surveillance video cameras
 
with an integrated web-server. Such streams are usually embedded in
 
with an integrated web-server. Such streams are usually embedded in
Line 251: Line 194:
 
as a succession of jpeg images. The only supported output method is
 
as a succession of jpeg images. The only supported output method is
 
HTTP. The only usable codec is MJPEG. No sound track can be muxed
 
HTTP. The only usable codec is MJPEG. No sound track can be muxed
in such streams.</para> <para>No item option is available for this
+
in such streams.</pre> </pre>No item option is available for this
muxer.</para></listitem>
+
muxer.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
Line 259: Line 202:
 
<sect3><title>dst=</title>
 
<sect3><title>dst=</title>
  
<para>This option allows to give informations about the location
+
</pre>This option allows to give informations about the location
where the stream should actually be saved or sent.</para>
+
where the stream should actually be saved or sent.</pre>
  
<para>Here is the meaning of the <emphasis>dst</emphasis> option
+
</pre>Here is the meaning of the ''dst'' option
depending on the parameter used for the <emphasis>access</emphasis>
+
depending on the parameter used for the ''access''
option.</para>
+
option.</pre>
  
 
<itemizedlist>
 
<itemizedlist>
<listitem><para>If the <emphasis>file</emphasis> output method is used, dst is
+
<listitem></pre>If the ''file'' output method is used, dst is
the complete path where the file should be saved.</para></listitem>
+
the complete path where the file should be saved.</pre></listitem>
  
<listitem><para>If the <emphasis>udp</emphasis> or <emphasis>rtp</emphasis>
+
<listitem></pre>If the ''udp'' or ''rtp''
 
output method is used, dst is the unicast or multicast
 
output method is used, dst is the unicast or multicast
 
destination address and, optionally, UDP port, in the form
 
destination address and, optionally, UDP port, in the form
<emphasis>address:port</emphasis>.</para></listitem>
+
''address:port''.</pre></listitem>
  
<listitem><para>If the <emphasis>http</emphasis>,
+
<listitem></pre>If the ''http'',
<emphasis>https</emphasis> or <emphasis>mmsh</emphasis> output method is
+
''https'' or ''mmsh'' output method is
 
chosen, dst is the address, port and path of the local network interface
 
chosen, dst is the address, port and path of the local network interface
 
on which the server should listen for requests. If no address is given,
 
on which the server should listen for requests. If no address is given,
 
VLC will listen on all the network interfaces. These information
 
VLC will listen on all the network interfaces. These information
have to be supplied using the <emphasis>address:port/path</emphasis>
+
have to be supplied using the ''address:port/path''
syntax.</para></listitem>
+
syntax.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
Line 289: Line 232:
 
<sect3><title>sap</title>
 
<sect3><title>sap</title>
  
<para>Use this option if you want VLC to send SAP (Session Announcement
+
</pre>Use this option if you want VLC to send SAP (Session Announcement
 
Protocol) announces. SAP is a service discovery protocol, that uses
 
Protocol) announces. SAP is a service discovery protocol, that uses
 
a special multicast address to send a list of available streams on a
 
a special multicast address to send a list of available streams on a
server.</para>
+
server.</pre>
  
<note><para>This option can only be enabled with the <emphasis>udp</emphasis>
+
<note></pre>This option can only be enabled with the ''udp''
output method.</para></note>
+
output method.</pre></note>
  
 
</sect3>
 
</sect3>
Line 301: Line 244:
 
<sect3><title>group=</title>
 
<sect3><title>group=</title>
  
<para>This option allows to specify the name of an optional <emphasis>group</emphasis> of streams. A VLC used as a client will use this field to classify the stream.</para>
+
</pre>This option allows to specify the name of an optional ''group'' of streams. A VLC used as a client will use this field to classify the stream.</pre>
  
<note><para>This option uses a private extension of the SAP protocol.
+
<note></pre>This option uses a private extension of the SAP protocol.
VLC will be the only client able to read this field.</para>
+
VLC will be the only client able to read this field.</pre>
  
<para>This option can only be used it the <emphasis>sap</emphasis>
+
</pre>This option can only be used it the ''sap''
option has been enabled.</para></note>
+
option has been enabled.</pre></note>
  
 
</sect3>
 
</sect3>
Line 313: Line 256:
 
<sect3><title>sap-ipv6</title>
 
<sect3><title>sap-ipv6</title>
  
<para>Use this option if you want the SAP announces to be sent using the
+
</pre>Use this option if you want the SAP announces to be sent using the
<emphasis>IPv6</emphasis> protocol instead of <emphasis>IPv4</emphasis>.</para>
+
''IPv6'' protocol instead of ''IPv4''.</pre>
  
<note><para>This option can only be used it the <emphasis>sap</emphasis>
+
<note></pre>This option can only be used it the ''sap''
option has been enabled.</para></note>
+
option has been enabled.</pre></note>
  
 
</sect3>
 
</sect3>
Line 323: Line 266:
 
<sect3><title>slp</title>
 
<sect3><title>slp</title>
  
<para>SLP stands for <emphasis>Service Location Protocol</emphasis>. It is an alternative to SAP for session announcement. Use this option if you want to send such announces.</para>
+
</pre>SLP stands for ''Service Location Protocol''. It is an alternative to SAP for session announcement. Use this option if you want to send such announces.</pre>
  
 
</sect3>
 
</sect3>
Line 329: Line 272:
 
<sect3><title>name=</title>
 
<sect3><title>name=</title>
  
<para>Use this option to specify the name of the stream that will be sent in SAP and SLP announces.</para>
+
</pre>Use this option to specify the name of the stream that will be sent in SAP and SLP announces.</pre>
  
<note><para>This option can only be used it the <emphasis>sap</emphasis>
+
<note></pre>This option can only be used it the ''sap''
or <emphasis>slp</emphasis> option has been enabled.</para></note>
+
or ''slp'' option has been enabled.</pre></note>
  
 
</sect3>
 
</sect3>
Line 340: Line 283:
 
<sect2><title>display</title>
 
<sect2><title>display</title>
  
<para> This module can be used to display the stream. This is
+
</pre> This module can be used to display the stream. This is
particularly useful in a <emphasis>duplicate</emphasis> chain, in order
+
particularly useful in a ''duplicate'' chain, in order
to monitor a stream while it is being saved or streamed. </para>
+
to monitor a stream while it is being saved or streamed. </pre>
  
<para>available options are:</para>
+
</pre>available options are:</pre>
  
 
<sect3><title>novideo</title>
 
<sect3><title>novideo</title>
  
<para>You can use this option to disable video in the displayed stream.</para>
+
</pre>You can use this option to disable video in the displayed stream.</pre>
  
 
</sect3>
 
</sect3>
Line 354: Line 297:
 
<sect3><title>noaudio</title>
 
<sect3><title>noaudio</title>
  
<para>You can use this option to disable audio in the displayed stream.</para>
+
</pre>You can use this option to disable audio in the displayed stream.</pre>
  
 
</sect3>
 
</sect3>
Line 360: Line 303:
 
<sect3><title>delay=</title>
 
<sect3><title>delay=</title>
  
<para>You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms.</para>
+
</pre>You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms.</pre>
  
 
</sect3>
 
</sect3>
Line 368: Line 311:
 
<sect2><title>rtp</title>
 
<sect2><title>rtp</title>
  
<para>This module can be used to send a stream using the <emphasis>RTP
+
</pre>This module can be used to send a stream using the ''RTP
(Real Time Protocol)</emphasis> protocol (see RFC 3550).</para>
+
(Real Time Protocol)'' protocol (see RFC 3550).</pre>
  
<note><para>Although use of <emphasis>RTSP</emphasis> is possible using
+
<note></pre>Although use of ''RTSP'' is possible using
 
this module, it won't allow you to make Video On demand. Please have a
 
this module, it won't allow you to make Video On demand. Please have a
look at the description of the VLM module for that.</para></note>
+
look at the description of the VLM module for that.</pre></note>
  
<para>The different available options are:</para>
+
</pre>The different available options are:</pre>
  
 
<sect3><title>dst=</title>
 
<sect3><title>dst=</title>
  
<para>This option allow to give the destination UDP address. This can
+
</pre>This option allow to give the destination UDP address. This can
 
be the address of a host or a multicast group. This option has to be
 
be the address of a host or a multicast group. This option has to be
given, unless the <emphasis>sdp=rtsp://</emphasis>option is given (see
+
given, unless the ''sdp=rtsp://''option is given (see
 
below). In the latter case, the stream will be sent to the host doing the
 
below). In the latter case, the stream will be sent to the host doing the
<emphasis>RTSP</emphasis> request.</para>
+
''RTSP'' request.</pre>
  
 
</sect3>
 
</sect3>
Line 389: Line 332:
 
<sect3><title>port=</title>
 
<sect3><title>port=</title>
  
<para>This option allows to set the UDP port used to send the first <emphasis>elementary stream</emphasis>. This port has to be even. Other streams will be streamed using even ports directly above this one.</para>
+
</pre>This option allows to set the UDP port used to send the first ''elementary stream''. This port has to be even. Other streams will be streamed using even ports directly above this one.</pre>
  
 
</sect3>
 
</sect3>
Line 395: Line 338:
 
<sect3><title>port-video=</title>
 
<sect3><title>port-video=</title>
  
<para>This option allows to set the UDP port used to send the first
+
</pre>This option allows to set the UDP port used to send the first
video <emphasis>elementary stream</emphasis>. This port has to be
+
video ''elementary stream''. This port has to be
even.</para>
+
even.</pre>
  
 
</sect3>
 
</sect3>
Line 403: Line 346:
 
<sect3><title>port-audio=</title>
 
<sect3><title>port-audio=</title>
  
<para>This option allows to set the UDP port used to send the first
+
</pre>This option allows to set the UDP port used to send the first
audio <emphasis>elementary stream</emphasis>. This port has to be
+
audio ''elementary stream''. This port has to be
even.</para>
+
even.</pre>
  
 
</sect3>
 
</sect3>
Line 411: Line 354:
 
<sect3><title>sdp=</title>
 
<sect3><title>sdp=</title>
  
<para>This option allows to set the way the SDP (Session Description Protocol) file corresponding the the stream should be made available.</para>
+
</pre>This option allows to set the way the SDP (Session Description Protocol) file corresponding the the stream should be made available.</pre>
  
<para>Options are:</para>
+
</pre>Options are:</pre>
  
 
<itemizedlist>
 
<itemizedlist>
  
<listitem><para><emphasis>file://&lt;path to the file&gt;</emphasis>, to
+
<listitem></pre>''file://&lt;path to the file&gt;'', to
export the SDP as a local file</para></listitem>
+
export the SDP as a local file</pre></listitem>
  
<listitem><para><emphasis>http://&lt;local interface
+
<listitem></pre>''http://&lt;local interface
IP:port/path&gt;</emphasis>, to make the file available using the
+
IP:port/path&gt;'', to make the file available using the
integrated HTTP server of VLC.</para>
+
integrated HTTP server of VLC.</pre>
  
<note><para>The <emphasis>local interface IP</emphasis> argument
+
<note></pre>The ''local interface IP'' argument
 
is optional. If not given, VLC will listen on all available
 
is optional. If not given, VLC will listen on all available
interfaces.</para></note></listitem>
+
interfaces.</pre></note></listitem>
  
<listitem><para><emphasis>rtsp://&lt;local interface
+
<listitem></pre>''rtsp://&lt;local interface
IP:port/path&gt;</emphasis>, to make the SDP file available using the
+
IP:port/path&gt;'', to make the SDP file available using the
<emphasis>RTSP</emphasis> protocol (see RFC 2326).</para>
+
''RTSP'' protocol (see RFC 2326).</pre>
  
<note><para>The <emphasis>local interface IP</emphasis> argument
+
<note></pre>The ''local interface IP'' argument
 
is optional. If not given, VLC will listen on all available
 
is optional. If not given, VLC will listen on all available
interfaces.</para></note></listitem>
+
interfaces.</pre></note></listitem>
  
<listitem><para><emphasis>sap</emphasis>, to export the SDP using the
+
<listitem></pre>''sap'', to export the SDP using the
SAP (Session Announcement Protocol, see RFC 2974).</para></listitem>
+
SAP (Session Announcement Protocol, see RFC 2974).</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
Line 445: Line 388:
 
<sect3><title>ttl=</title>
 
<sect3><title>ttl=</title>
  
<para>This option can be used to set the <emphasis>TTL</emphasis> (Time
+
</pre>This option can be used to set the ''TTL'' (Time
to Live) of the sent UDP packets.</para>
+
to Live) of the sent UDP packets.</pre>
  
 
</sect3>
 
</sect3>
Line 452: Line 395:
 
<sect3><title>mux=</title>
 
<sect3><title>mux=</title>
  
<para>This option allows to set the encapsulation method used to
+
</pre>This option allows to set the encapsulation method used to
send the stream. See <emphasis>mux=</emphasis> options of the
+
send the stream. See ''mux='' options of the
<emphasis>standard</emphasis> module for a description of the available
+
''standard'' module for a description of the available
method. Only <emphasis>ts</emphasis> and <emphasis>raw</emphasis>
+
method. Only ''ts'' and ''raw''
(no encpasulation) are possible values for <emphasis>RTP</emphasis>
+
(no encpasulation) are possible values for ''RTP''
streams. Default is RAW.</para>
+
streams. Default is RAW.</pre>
  
 
</sect3>
 
</sect3>
Line 463: Line 406:
 
<sect3><title>name=</title>
 
<sect3><title>name=</title>
  
<para>This option can be used to set the name that will be displayed on
+
</pre>This option can be used to set the name that will be displayed on
the client receiving the stream.</para>
+
the client receiving the stream.</pre>
  
 
</sect3>
 
</sect3>
Line 470: Line 413:
 
<sect3><title>description=</title>
 
<sect3><title>description=</title>
  
<para>This option can be used to give an additional description of the
+
</pre>This option can be used to give an additional description of the
stream.</para>
+
stream.</pre>
  
 
</sect3>
 
</sect3>
Line 477: Line 420:
 
<sect3><title>url=</title>
 
<sect3><title>url=</title>
  
<para>This option allows to give the address of a website with
+
</pre>This option allows to give the address of a website with
additional informations about the stream.</para>
+
additional informations about the stream.</pre>
  
 
</sect3>
 
</sect3>
Line 484: Line 427:
 
<sect3><title>email=</title>
 
<sect3><title>email=</title>
  
<para>This options allows to give a contact e-mail address</para>
+
</pre>This options allows to give a contact e-mail address</pre>
  
 
</sect3>
 
</sect3>
Line 492: Line 435:
 
<sect2><title>es</title>
 
<sect2><title>es</title>
  
<para>The <emphasis>es</emphasis> module can be used to separate the
+
</pre>The ''es'' module can be used to separate the
different <emphasis>elementary streams</emphasis> from a stream,
+
different ''elementary streams'' from a stream,
 
and save each of them in a different file or send it to a separate
 
and save each of them in a different file or send it to a separate
destination.</para>
+
destination.</pre>
  
<para>The available parameters are:</para>
+
</pre>The available parameters are:</pre>
  
 
<sect3><title>access-video=</title>
 
<sect3><title>access-video=</title>
  
<para>Use this option to set the medium used to save or send the video
+
</pre>Use this option to set the medium used to save or send the video
<emphasis>elementary streams</emphasis>. Possible values and item
+
''elementary streams''. Possible values and item
options are the same as for the <emphasis>access</emphasis> option of
+
options are the same as for the ''access'' option of
the <emphasis>standard</emphasis> module (see above).</para>
+
the ''standard'' module (see above).</pre>
  
 
</sect3>
 
</sect3>
Line 510: Line 453:
 
<sect3><title>access-audio=</title>
 
<sect3><title>access-audio=</title>
  
<para>Use this option to set the medium used to save or send the audio
+
</pre>Use this option to set the medium used to save or send the audio
<emphasis>elementary streams</emphasis>. Possible values and item
+
''elementary streams''. Possible values and item
options are the same than for the <emphasis>access</emphasis> option of
+
options are the same than for the ''access'' option of
the <emphasis>standard</emphasis> module (see above).</para>
+
the ''standard'' module (see above).</pre>
  
 
</sect3>
 
</sect3>
Line 519: Line 462:
 
<sect3><title>access=</title>
 
<sect3><title>access=</title>
  
<para>This option can be used instead of both
+
</pre>This option can be used instead of both
<emphasis>access-video</emphasis> and <emphasis>access-audio</emphasis>
+
''access-video'' and ''access-audio''
options, when they share the same setting.</para>
+
options, when they share the same setting.</pre>
  
 
</sect3>
 
</sect3>
Line 527: Line 470:
 
<sect3><title>mux-video=</title>
 
<sect3><title>mux-video=</title>
  
<para>Use this option to set the encapsulation method used for the
+
</pre>Use this option to set the encapsulation method used for the
video <emphasis>elementary streams</emphasis>. Possible values and item
+
video ''elementary streams''. Possible values and item
options are the same as for the <emphasis>mux</emphasis> option of
+
options are the same as for the ''mux'' option of
the <emphasis>standard</emphasis> module (see above).</para>
+
the ''standard'' module (see above).</pre>
  
 
</sect3>
 
</sect3>
Line 536: Line 479:
 
<sect3><title>mux-audio=</title>
 
<sect3><title>mux-audio=</title>
  
<para>Use this option to set the encapsulation method used for the
+
</pre>Use this option to set the encapsulation method used for the
audio <emphasis>elementary streams</emphasis>. Possible values and item
+
audio ''elementary streams''. Possible values and item
options are the same than for the <emphasis>mux</emphasis> option of the
+
options are the same than for the ''mux'' option of the
<emphasis>standard</emphasis> module (see above).</para>
+
''standard'' module (see above).</pre>
  
 
</sect3>
 
</sect3>
Line 545: Line 488:
 
<sect3><title>mux=</title>
 
<sect3><title>mux=</title>
  
<para>This option can be used instead of both
+
</pre>This option can be used instead of both
<emphasis>mux-video</emphasis> and <emphasis>mux-audio</emphasis>
+
''mux-video'' and ''mux-audio''
options, when they share the same setting.</para>
+
options, when they share the same setting.</pre>
  
 
</sect3>
 
</sect3>
Line 553: Line 496:
 
<sect3><title>dst-video=</title>
 
<sect3><title>dst-video=</title>
  
<para>Use this option to set the location where the video
+
</pre>Use this option to set the location where the video
<emphasis>elementary streams</emphasis> should be saved, sent, or made
+
''elementary streams'' should be saved, sent, or made
 
available. The exact meaning of this option depends on the value of the
 
available. The exact meaning of this option depends on the value of the
<emphasis>access-video</emphasis> option and is the same as for the
+
''access-video'' option and is the same as for the
<emphasis>url</emphasis> option of the <emphasis>standard</emphasis>
+
''url'' option of the ''standard''
module (see above).</para>
+
module (see above).</pre>
  
<note><para>If you use the <emphasis>%d</emphasis> string in the url
+
<note></pre>If you use the ''%d'' string in the url
 
field, VLC will replace it by the number of the audio or video track
 
field, VLC will replace it by the number of the audio or video track
considered. The <emphasis>%c</emphasis> string will be replaced by the
+
considered. The ''%c'' string will be replaced by the
name (FOURCC) of the codec of the track.</para></note>
+
name (FOURCC) of the codec of the track.</pre></note>
  
 
</sect3>
 
</sect3>
Line 569: Line 512:
 
<sect3><title>dst-audio=</title>
 
<sect3><title>dst-audio=</title>
  
<para>Use this option to set the location where the audio
+
</pre>Use this option to set the location where the audio
<emphasis>elementary streams</emphasis> should be saved, sent, or made
+
''elementary streams'' should be saved, sent, or made
 
available. The exact meaning of this option depends on the value of the
 
available. The exact meaning of this option depends on the value of the
<emphasis>access-audio</emphasis> option and is the same as for the
+
''access-audio'' option and is the same as for the
<emphasis>url</emphasis> option of the <emphasis>standard</emphasis>
+
''url'' option of the ''standard''
module (see above).</para>
+
module (see above).</pre>
  
<note><para>If you use the <emphasis>%d</emphasis> string in the url
+
<note></pre>If you use the ''%d'' string in the url
 
field, VLC will replace it by the number of the audio or video track
 
field, VLC will replace it by the number of the audio or video track
considered. The <emphasis>%c</emphasis> string will be replaced by the
+
considered. The ''%c'' string will be replaced by the
name (FOURCC) of the codec of the track.</para></note>
+
name (FOURCC) of the codec of the track.</pre></note>
  
  
Line 586: Line 529:
 
<sect3><title>dst=</title>
 
<sect3><title>dst=</title>
  
<para>This option can be used instead of both
+
</pre>This option can be used instead of both
<emphasis>dst-video</emphasis> and <emphasis>dst-audio</emphasis>
+
''dst-video'' and ''dst-audio''
options, when they share the same setting.</para>
+
options, when they share the same setting.</pre>
  
 
</sect3>
 
</sect3>
Line 596: Line 539:
 
<sect2><title>transcode</title>
 
<sect2><title>transcode</title>
  
<para>You can use this module to transcode a stream, i.e. to change its
+
</pre>You can use this module to transcode a stream, i.e. to change its
 
codecs or the encoding bitrates. Some additional processing can be done
 
codecs or the encoding bitrates. Some additional processing can be done
 
during this process, such as re-scaling, deinterlacing, resampling,
 
during this process, such as re-scaling, deinterlacing, resampling,
etc.</para>
+
etc.</pre>
  
<note><para>Depending on the bitrate of the original stream and of
+
<note></pre>Depending on the bitrate of the original stream and of
 
the options chosen, transcoding can be a very CPU intensive task. As
 
the options chosen, transcoding can be a very CPU intensive task. As
 
a consequence, streaming of a real time transcoded stream can lead to
 
a consequence, streaming of a real time transcoded stream can lead to
 
dropped frames or a jerky image and sound in some cases, when running
 
dropped frames or a jerky image and sound in some cases, when running
out of resources.</para></note>
+
out of resources.</pre></note>
  
<para>Available options are:</para>
+
</pre>Available options are:</pre>
  
 
<sect3><title>vcodec=</title>
 
<sect3><title>vcodec=</title>
  
<para>This options allows to specify the codec the video tracks of the
+
</pre>This options allows to specify the codec the video tracks of the
input stream should be transcoded to.</para>
+
input stream should be transcoded to.</pre>
  
<para>List of available codecs can be found on the  
+
</pre>List of available codecs can be found on the  
<ulink url="/streaming/features.html">streaming features page</ulink>.</para>
+
<ulink url="/streaming/features.html">streaming features page</ulink>.</pre>
  
 
</sect3>
 
</sect3>
Line 621: Line 564:
 
<sect3><title>vb=</title>
 
<sect3><title>vb=</title>
  
<para>This option allows to set the bitrate of the transcoded video
+
</pre>This option allows to set the bitrate of the transcoded video
stream, in kbit/s</para>
+
stream, in kbit/s</pre>
  
 
</sect3>
 
</sect3>
Line 628: Line 571:
 
<sect3><title>venc=</title>
 
<sect3><title>venc=</title>
  
<para>This allows to set the encoder to use to encode the videos stream. Available options are:</para>
+
</pre>This allows to set the encoder to use to encode the videos stream. Available options are:</pre>
 
<itemizedlist>
 
<itemizedlist>
  
<listitem><para><emphasis>ffmpeg</emphasis>: this is the libavcodec encoding
+
<listitem></pre>''ffmpeg'': this is the libavcodec encoding
 
module. It handles a large variety of different codecs (the list can be
 
module. It handles a large variety of different codecs (the list can be
 
found on the <ulink url="/streaming/features.html">streaming features
 
found on the <ulink url="/streaming/features.html">streaming features
page</ulink>.</para>
+
page</ulink>.</pre>
  
<para>Item options are: <emphasis>keyint=&lt;number of
+
</pre>Item options are: ''keyint=&lt;number of
frames&gt;</emphasis> allows to set the maximal amount of frames
+
frames&gt;'' allows to set the maximal amount of frames
between 2 key frames, <emphasis>hurry-up</emphasis> allows the
+
between 2 key frames, ''hurry-up'' allows the
 
encoder to decrease the quality of the stream if the CPU can't keep
 
encoder to decrease the quality of the stream if the CPU can't keep
up with the encoding rate, <emphasis>interlace</emphasis> allows
+
up with the encoding rate, ''interlace'' allows
 
to improve the quality of the encoding of interlaced streams,
 
to improve the quality of the encoding of interlaced streams,
<emphasis>noise-reduction=&lt;noise reduction factor&gt;</emphasis>
+
''noise-reduction=&lt;noise reduction factor&gt;''
 
enables a noise reduction algorithm (will decrease required bitrate at
 
enables a noise reduction algorithm (will decrease required bitrate at
the cost of details in the image), <emphasis>vt=&lt;bitrate tolerance
+
the cost of details in the image), ''vt=&lt;bitrate tolerance
in kbit/s&gt;</emphasis> allows to set a tolerance for the bitrate of
+
in kbit/s&gt;'' allows to set a tolerance for the bitrate of
the outputted video stream, <emphasis>bframes=&lt;amount of frames&gt;
+
the outputted video stream, ''bframes=&lt;amount of frames&gt;
</emphasis> allows to set the amount of B frames between 2 key frames,
+
'' allows to set the amount of B frames between 2 key frames,
<emphasis>qmin=&lt;quantizer&gt;</emphasis> allows to set the minimum
+
''qmin=&lt;quantizer&gt;'' allows to set the minimum
quantizer scale, <emphasis>qmax=&lt;quantizer&gt;</emphasis> allows
+
quantizer scale, ''qmax=&lt;quantizer&gt;'' allows
to set the maximum quantizer scale, <emphasis>qscale=&lt;quantizer
+
to set the maximum quantizer scale, ''qscale=&lt;quantizer
scale&gt;</emphasis> allows to specify a fixed quantizer scale
+
scale&gt;'' allows to specify a fixed quantizer scale
for VBR encodings, <emphasis>i-quant-factor=&lt;quantization
+
for VBR encodings, ''i-quant-factor=&lt;quantization
factor&gt;</emphasis> allows to set the quantization factor of I
+
factor&gt;'' allows to set the quantization factor of I
frames, compared to P frames, <emphasis>hq=&lt;quality&gt;</emphasis>
+
frames, compared to P frames, ''hq=&lt;quality&gt;''
 
allows to choose the quality level for the encoding of the motion
 
allows to choose the quality level for the encoding of the motion
 
vectors (arguments are simple, rd or bits, default is simple
 
vectors (arguments are simple, rd or bits, default is simple
*FIXME*), <emphasis>strict=&lt;level of compliance&gt;</emphasis>
+
*FIXME*), ''strict=&lt;level of compliance&gt;''
 
allows to force a stricter standard compliance (possible values are
 
allows to force a stricter standard compliance (possible values are
-1, 0 and 1, default is 0), <emphasis>strict-rc</emphasis> enables
+
-1, 0 and 1, default is 0), ''strict-rc'' enables
a strict rate control algorithm, <emphasis>rc-buffer-size=&lt;size
+
a strict rate control algorithm, ''rc-buffer-size=&lt;size
of the buffer in bits&gt;</emphasis> allows to choose the size of
+
of the buffer in bits&gt;'' allows to choose the size of
 
the buffer used for rate control (bigger means more efficient rate
 
the buffer used for rate control (bigger means more efficient rate
control), <emphasis>rc-buffer-aggressivity=&lt;float representing the
+
control), ''rc-buffer-aggressivity=&lt;float representing the
aggressiveness&gt;</emphasis> allows to set the rate control buffer
+
aggressiveness&gt;'' allows to set the rate control buffer
aggressiveness *FIXME*, <emphasis>pre-me</emphasis> allows to enable pre
+
aggressiveness *FIXME*, ''pre-me'' allows to enable pre
motion estimation, <emphasis>mpeg4-matrix</emphasis> enable use of the
+
motion estimation, ''mpeg4-matrix'' enable use of the
 
MPEG4 quantization matrix with MPEG2 streams, improving quality while
 
MPEG4 quantization matrix with MPEG2 streams, improving quality while
keeping compatibility with MPEG2 decoders, <emphasis>trellis</emphasis>
+
keeping compatibility with MPEG2 decoders, ''trellis''
 
enables trelli quantization (better quality, but slower
 
enables trelli quantization (better quality, but slower
processing).</para></listitem>
+
processing).</pre></listitem>
  
<listitem><para><emphasis>theora</emphasis>: The Xiph.org theora encoder.
+
<listitem></pre>''theora'': The Xiph.org theora encoder.
 
The module is used to produce theora streams. Theora is a free patent
 
The module is used to produce theora streams. Theora is a free patent
and royalties free video codec.</para>
+
and royalties free video codec.</pre>
  
<para>The only available item option is <emphasis>quality=&lt;quality
+
</pre>The only available item option is ''quality=&lt;quality
level&gt;</emphasis>. This option allows to create a VBR stream,
+
level&gt;''. This option allows to create a VBR stream,
overriding <emphasis>vb</emphasis> setting. the quality level must be an
+
overriding ''vb'' setting. the quality level must be an
integer between 1 and 10. Higher is better.</para></listitem>
+
integer between 1 and 10. Higher is better.</pre></listitem>
  
<listitem><para><emphasis>x264</emphasis>. x264 is a free open-source h264 encoder. h264 (or MPEG4-AVC) is a quite recent high quality video codec.</para>
+
<listitem></pre>''x264''. x264 is a free open-source h264 encoder. h264 (or MPEG4-AVC) is a quite recent high quality video codec.</pre>
  
<para>Item options are: <emphasis>keyint=&lt;number of
+
</pre>Item options are: ''keyint=&lt;number of
frames&gt;</emphasis> allows to set the maximal amount of
+
frames&gt;'' allows to set the maximal amount of
frames between 2 key frames, <emphasis>idrint=&lt;number of
+
frames between 2 key frames, ''idrint=&lt;number of
frames&gt;</emphasis> allows to set the maximal amount of frames
+
frames&gt;'' allows to set the maximal amount of frames
between 2 IDR frames, <emphasis>bframes=&lt;amount of frames&gt;
+
between 2 IDR frames, ''bframes=&lt;amount of frames&gt;
</emphasis> allows to set the amount of B frames between an I and
+
'' allows to set the amount of B frames between an I and
a P frame, <emphasis>qp=&lt;quantizer parameter&gt;</emphasis>
+
a P frame, ''qp=&lt;quantizer parameter&gt;''
 
allows to specify a fixed quantizer (between 1 and 51),
 
allows to specify a fixed quantizer (between 1 and 51),
<emphasis>qp-max=&lt;quantizer parameter&gt;</emphasis> allows to set
+
''qp-max=&lt;quantizer parameter&gt;'' allows to set
the maximum value for the quantizer, <emphasis>qp-min=&lt;quantizer
+
the maximum value for the quantizer, ''qp-min=&lt;quantizer
parameter&gt;</emphasis> allows to set the minimum value for
+
parameter&gt;'' allows to set the minimum value for
the quantizer, <emphasis>cabac</emphasis> enables the CABAC
+
the quantizer, ''cabac'' enables the CABAC
 
(Context-Adaptive Binary Arithmetic Coding) algorithm (slower,
 
(Context-Adaptive Binary Arithmetic Coding) algorithm (slower,
but enhances quality), <emphasis>loopfilter</emphasis> enables
+
but enhances quality), ''loopfilter'' enables
deblocking loop filter, <emphasis>analyse</emphasis> enables the
+
deblocking loop filter, ''analyse'' enables the
analyze mode, <emphasis>frameref=&lt;amount of frames&gt;</emphasis>
+
analyze mode, ''frameref=&lt;amount of frames&gt;''
 
allows to set the number of previous frames used as predictors,
 
allows to set the number of previous frames used as predictors,
<emphasis>scenecut=&lt;sensibility&lt;</emphasis> allows to control
+
''scenecut=&lt;sensibility&lt;'' allows to control
 
how aggressively the encoder should insert extra I-frame, on scene
 
how aggressively the encoder should insert extra I-frame, on scene
change.</para></listitem>
+
change.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
Line 710: Line 653:
 
<sect3><title>fps=</title>
 
<sect3><title>fps=</title>
  
<para>This options allows to set the framerate of the transcoded
+
</pre>This options allows to set the framerate of the transcoded
 
video, in frame per second. reducing the framerate of a video can help
 
video, in frame per second. reducing the framerate of a video can help
decreasing its bitrate.</para>
+
decreasing its bitrate.</pre>
  
 
</sect3>
 
</sect3>
Line 718: Line 661:
 
<sect3><title>deinterlace</title>
 
<sect3><title>deinterlace</title>
  
<para>This option allows to enable deinterlacing of interlaced video
+
</pre>This option allows to enable deinterlacing of interlaced video
streams before encoding.</para>
+
streams before encoding.</pre>
  
 
</sect3>
 
</sect3>
Line 725: Line 668:
 
<sect3><title>croptop=</title>
 
<sect3><title>croptop=</title>
  
<para>This option allows to crop the upper part of the source video while
+
</pre>This option allows to crop the upper part of the source video while
 
transcoding. The argument is the number of lines the video should be
 
transcoding. The argument is the number of lines the video should be
cropped.</para>
+
cropped.</pre>
  
 
</sect3>
 
</sect3>
Line 733: Line 676:
 
<sect3><title>cropbottom=</title>
 
<sect3><title>cropbottom=</title>
  
<para>This option allows to crop the lower part of the source video. The
+
</pre>This option allows to crop the lower part of the source video. The
argument is the Y coordinate of the first line to be cropped.</para>
+
argument is the Y coordinate of the first line to be cropped.</pre>
  
 
</sect3>
 
</sect3>
Line 740: Line 683:
 
<sect3><title>cropleft</title>
 
<sect3><title>cropleft</title>
  
<para>This option allows to crop the left part of the source video while
+
</pre>This option allows to crop the left part of the source video while
 
transcoding. The argument is the number of columns the video should be
 
transcoding. The argument is the number of columns the video should be
cropped.</para>
+
cropped.</pre>
  
 
</sect3>
 
</sect3>
Line 748: Line 691:
 
<sect3><title>cropright=</title>
 
<sect3><title>cropright=</title>
  
<para>This option allows to crop the right part of the source video. The
+
</pre>This option allows to crop the right part of the source video. The
argument is the X coordinate of the first column to be cropped.</para>
+
argument is the X coordinate of the first column to be cropped.</pre>
  
 
</sect3>
 
</sect3>
Line 755: Line 698:
 
<sect3><title>scale=</title>
 
<sect3><title>scale=</title>
  
<para>This option allows the give the ratio from which the video should
+
</pre>This option allows the give the ratio from which the video should
 
be rescaled while being transcoded. This option can be particularly
 
be rescaled while being transcoded. This option can be particularly
useful to help reduce the bitrate of a stream.</para>
+
useful to help reduce the bitrate of a stream.</pre>
  
 
</sect3>
 
</sect3>
Line 763: Line 706:
 
<sect3><title>width=</title>
 
<sect3><title>width=</title>
  
<para>This options allows to give the width of the transcoded video in
+
</pre>This options allows to give the width of the transcoded video in
pixels.</para>
+
pixels.</pre>
  
 
</sect3>
 
</sect3>
Line 770: Line 713:
 
<sect3><title>height</title>
 
<sect3><title>height</title>
  
<para>This options allows to give the height of the transcoded video,
+
</pre>This options allows to give the height of the transcoded video,
in pixels.</para>
+
in pixels.</pre>
  
 
</sect3>
 
</sect3>
Line 777: Line 720:
 
<sect3><title>acodec=</title>
 
<sect3><title>acodec=</title>
  
<para>This options allows to specify the codec the audio tracks of the
+
</pre>This options allows to specify the codec the audio tracks of the
input stream should be transcoded to.</para>
+
input stream should be transcoded to.</pre>
  
<para>List of available codecs can be found on the
+
</pre>List of available codecs can be found on the
<ulink url="/streaming/features.html">streaming features page</ulink>.</para>
+
<ulink url="/streaming/features.html">streaming features page</ulink>.</pre>
  
 
</sect3>
 
</sect3>
Line 787: Line 730:
 
<sect3><title>ab=</title>
 
<sect3><title>ab=</title>
  
<para>This option allows to set the bitrate of the transcoded audio
+
</pre>This option allows to set the bitrate of the transcoded audio
stream, in kbit/s</para>
+
stream, in kbit/s</pre>
  
 
</sect3>
 
</sect3>
Line 794: Line 737:
 
<sect3><title>aenc=</title>
 
<sect3><title>aenc=</title>
  
<para>This allows to set the encoder to use to encode the audio stream.
+
</pre>This allows to set the encoder to use to encode the audio stream.
Available options are:</para>
+
Available options are:</pre>
  
 
<itemizedlist>
 
<itemizedlist>
  
<listitem><para><emphasis>ffmpeg</emphasis>: this is the libavcodec encoding
+
<listitem></pre>''ffmpeg'': this is the libavcodec encoding
 
module. It handles a large variety of different codecs (the list can be
 
module. It handles a large variety of different codecs (the list can be
 
found on the <ulink url="/streaming/features.html">streaming features
 
found on the <ulink url="/streaming/features.html">streaming features
page</ulink>.</para></listitem>
+
page</ulink>.</pre></listitem>
  
<listitem><para><emphasis>vorbis</emphasis>. This module uses the vorbis
+
<listitem></pre>''vorbis''. This module uses the vorbis
 
encoder from the Xiph.org project. Vorbis is a free, open, license-free
 
encoder from the Xiph.org project. Vorbis is a free, open, license-free
lossy audio codec.</para>
+
lossy audio codec.</pre>
  
<para>Item options are: <emphasis>quality=&lt;quality
+
</pre>Item options are: ''quality=&lt;quality
level&gt;</emphasis> allows to use VBR (variable bitrate)
+
level&gt;'' allows to use VBR (variable bitrate)
 
encoding instead of the default CBR (constant bitrate), and
 
encoding instead of the default CBR (constant bitrate), and
 
to set the quality level (between 1 and 10, higher is better),
 
to set the quality level (between 1 and 10, higher is better),
<emphasis>max-bitrate=&lt;bitrate in kbit/s&gt;</emphasis> allows to set
+
''max-bitrate=&lt;bitrate in kbit/s&gt;'' allows to set
the maximum bitrate, for vbr encoding, <emphasis>min-bitrate=&lt;bitrate
+
the maximum bitrate, for vbr encoding, ''min-bitrate=&lt;bitrate
in kbit/s&gt;</emphasis> allows to set the minimum bitrate,
+
in kbit/s&gt;'' allows to set the minimum bitrate,
for vbr encoding, <emphasis>cbr</emphasis> allows to force cbr
+
for vbr encoding, ''cbr'' allows to force cbr
encoding.</para></listitem>
+
encoding.</pre></listitem>
  
<listitem><para><emphasis>speex</emphasis>. This module uses the speex
+
<listitem></pre>''speex''. This module uses the speex
 
encoder from the Xiph.org project. Speex is a lossy audio codec, best
 
encoder from the Xiph.org project. Speex is a lossy audio codec, best
 
fit for very low bitrates (around 10 kbit/s) and particularly video
 
fit for very low bitrates (around 10 kbit/s) and particularly video
conference.</para></listitem>
+
conference.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
Line 829: Line 772:
 
<sect3><title>samplerate=</title>
 
<sect3><title>samplerate=</title>
  
<para>This option allows to set the samplerate of the transcoded audio
+
</pre>This option allows to set the samplerate of the transcoded audio
 
stream, in Hz. Reducing the samplerate is be a way to lower the bitrate
 
stream, in Hz. Reducing the samplerate is be a way to lower the bitrate
of the resulting audio stream.</para>
+
of the resulting audio stream.</pre>
  
 
</sect3>
 
</sect3>
Line 837: Line 780:
 
<sect3><title>channels=</title>
 
<sect3><title>channels=</title>
  
<para>This option allows to set the number of channels of the resulting
+
</pre>This option allows to set the number of channels of the resulting
 
audio stream. This is useful for codecs that don't have support for more
 
audio stream. This is useful for codecs that don't have support for more
than 2 channels, of to lower the bitrate of an audio stream.</para>
+
than 2 channels, of to lower the bitrate of an audio stream.</pre>
  
 
</sect3>
 
</sect3>
Line 845: Line 788:
 
<sect3><title>scodec=</title>
 
<sect3><title>scodec=</title>
  
<para>This options allows to specify subtitle format the subtitles
+
This options allows to specify subtitle format the subtitles tracks of the input stream should be converted to.
tracks of the input stream should be converted to.</para>
 
  
<para>List of available codecs can be found on the
+
List of available codecs can be found on the
<ulink url="/streaming/features.html">streaming features page</ulink>.</para>
+
<ulink url="/streaming/features.html">streaming features page</ulink>.
  
 
</sect3>
 
</sect3>
Line 855: Line 797:
 
<sect3><title>senc=</title>
 
<sect3><title>senc=</title>
  
<para>This allows to set the converter to use to encode the subtitle
+
This allows to set the converter to use to encode the subtitle
stream.</para>
+
stream.
  
<para>The only subtitle encoder we have at this time is
+
</pre>The only subtitle encoder we have at this time is
<emphasis>dvbsub</emphasis>.</para>
+
''dvbsub''.</pre>
  
 
</sect3>
 
</sect3>
Line 865: Line 807:
 
<sect3><title>soverlay</title>
 
<sect3><title>soverlay</title>
  
<para>This option allow to render subtitles directly on the video,
+
</pre>This option allow to render subtitles directly on the video,
 
while transcoding it. Do not confuse this option with senc/scodec that
 
while transcoding it. Do not confuse this option with senc/scodec that
transcode the subtitles and streams them</para>
+
transcode the subtitles and streams them</pre>
  
 
</sect3>
 
</sect3>
Line 873: Line 815:
 
<sect3><title>sfilter=</title>
 
<sect3><title>sfilter=</title>
  
<para>This option allows to render some images generated by a so called
+
</pre>This option allows to render some images generated by a so called
<emphasis>subpicture filter</emphasis> (e.g. a logo, a text string,
+
''subpicture filter'' (e.g. a logo, a text string,
etc) on top of the video.</para>
+
etc) on top of the video.</pre>
  
<para>List of available <emphasis>subpicture filters</emphasis> can be
+
</pre>List of available ''subpicture filters'' can be
 
found on the <ulink url="http://www.videolan.org/streaming/features.html">streaming features
 
found on the <ulink url="http://www.videolan.org/streaming/features.html">streaming features
page</ulink>. The Item options of this modules can be found using the following command line:</para>
+
page</ulink>. The Item options of this modules can be found using the following command line:</pre>
  
<screen>
+
<pre>
 
<prompt>% </prompt><userinput>vlc -p --advanced &lt;module name&gt;</userinput>
 
<prompt>% </prompt><userinput>vlc -p --advanced &lt;module name&gt;</userinput>
</screen>
+
</pre>
  
 
</sect3>
 
</sect3>
Line 889: Line 831:
 
<sect3><title>threads=</title>
 
<sect3><title>threads=</title>
  
<para>This options allows to set the amount of threads that should
+
</pre>This options allows to set the amount of threads that should
 
be used to encode the streams. Increasing this number to the amount
 
be used to encode the streams. Increasing this number to the amount
 
of processors on the computer, (or twice this number on Intel P4 HT
 
of processors on the computer, (or twice this number on Intel P4 HT
processors) should improve transcoding performance.</para>
+
processors) should improve transcoding performance.</pre>
  
 
</sect3>
 
</sect3>
Line 898: Line 840:
 
<sect3><title>audio-sync</title>
 
<sect3><title>audio-sync</title>
  
<para>When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track on the audio track.</para>
+
</pre>When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track on the audio track.</pre>
  
 
</sect3>
 
</sect3>
Line 906: Line 848:
 
<sect2><title>duplicate</title>
 
<sect2><title>duplicate</title>
  
<para>This module can be used to duplicate the stream, and so process it
+
</pre>This module can be used to duplicate the stream, and so process it
through several different chains.</para>
+
through several different chains.</pre>
  
<para>Available options are:</para>
+
</pre>Available options are:</pre>
  
  
 
<sect3><title>dst=</title>
 
<sect3><title>dst=</title>
  
<para>This options allows to give the chain through which the duplicated stream should be processed.</para>
+
</pre>This options allows to give the chain through which the duplicated stream should be processed.</pre>
  
<note><para>Several <emphasis>dst=</emphasis> options have to be used in the same duplicate block to actually duplicate the stream.</para>
+
<note></pre>Several ''dst='' options have to be used in the same duplicate block to actually duplicate the stream.</pre>
<para>Any of the stream output module described earlier can be used as parameter of this option.</para></note>
+
</pre>Any of the stream output module described earlier can be used as parameter of this option.</pre></note>
  
 
</sect3>
 
</sect3>
Line 923: Line 865:
 
<sect3><title>select=</title>
 
<sect3><title>select=</title>
  
<para>This options can be used to duplicate only a part
+
</pre>This options can be used to duplicate only a part
<emphasis>elementary streams</emphasis> of a complete stream.</para>
+
''elementary streams'' of a complete stream.</pre>
  
<para>Several criteria can be given, by separating each of them with a
+
</pre>Several criteria can be given, by separating each of them with a
comma.</para>
+
comma.</pre>
  
<para>For criteria that need a parameter, such as
+
</pre>For criteria that need a parameter, such as
<emphasis>es</emphasis> and <emphasis>program</emphasis>,
+
''es'' and ''program'',
 
you can also specify a range, using the syntax
 
you can also specify a range, using the syntax
<emphasis>criteria=num_start-num_end</emphasis>.</para>
+
''criteria=num_start-num_end''.</pre>
  
<para>Available parameters are:</para>
+
</pre>Available parameters are:</pre>
  
 
<itemizedlist>
 
<itemizedlist>
  
<listitem><para><emphasis>program=</emphasis>: duplicate only
+
<listitem></pre>''program='': duplicate only
<emphasis>elementary streams</emphasis> belonging to the
+
''elementary streams'' belonging to the
 
selected program (or SID). This option only works with MPEG2/TS
 
selected program (or SID). This option only works with MPEG2/TS
streams.</para></listitem>
+
streams.</pre></listitem>
  
<listitem><para><emphasis>noprogram=</emphasis>: do not duplicate
+
<listitem></pre>''noprogram='': do not duplicate
<emphasis>elementary streams</emphasis> belonging to the
+
''elementary streams'' belonging to the
 
selected program (or PID). This option only works with MPEG2/TS
 
selected program (or PID). This option only works with MPEG2/TS
streams.</para></listitem>
+
streams.</pre></listitem>
  
<listitem><para><emphasis>es=</emphasis>: duplicate only the
+
<listitem></pre>''es='': duplicate only the
<emphasis>elementary stream</emphasis> with the selected
+
''elementary stream'' with the selected
id.</para></listitem>
+
id.</pre></listitem>
  
<listitem><para><emphasis>noes=</emphasis>: do not duplicate
+
<listitem></pre>''noes='': do not duplicate
the <emphasis>elementary stream</emphasis> with the selected
+
the ''elementary stream'' with the selected
id.</para></listitem>
+
id.</pre></listitem>
  
<listitem><para><emphasis>video</emphasis>: duplicate only video
+
<listitem></pre>''video'': duplicate only video
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
<listitem><para><emphasis>novideo</emphasis>: do not duplicate video
+
<listitem></pre>''novideo'': do not duplicate video
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
<listitem><para><emphasis>audio</emphasis>: duplicate only audio
+
<listitem></pre>''audio'': duplicate only audio
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
<listitem><para><emphasis>noaudio</emphasis>: do not duplicate audio
+
<listitem></pre>''noaudio'': do not duplicate audio
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
<listitem><para><emphasis>spu</emphasis>: duplicate only subtitle
+
<listitem></pre>''spu'': duplicate only subtitle
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
<listitem><para><emphasis>nospu</emphasis>: do not duplicate subtitle
+
<listitem></pre>''nospu'': do not duplicate subtitle
<emphasis>elementary streams</emphasis>.</para></listitem>
+
''elementary streams''.</pre></listitem>
  
 
</itemizedlist>
 
</itemizedlist>
  
<para>Example:</para>
+
Example:
<screen>#duplicate{dst=std{...},select="program=100-200,novideo"}</screen>
+
<pre>#duplicate{dst=std{...},select="program=100-200,novideo"}</pre>
  
<para>This <emphasis>duplicate</emphasis> chain will only output the non
+
</pre>This ''duplicate'' chain will only output the non
video <emphasis>elementary streams</emphasis> belonging to the programs
+
video ''elementary streams'' belonging to the programs
which PID are between 100 and 200.</para>
+
which PID are between 100 and 200.</pre>
  
 
</sect3>
 
</sect3>
Line 991: Line 933:
 
</title>
 
</title>
  
<para>
+
</pre>
 
Here are a few additional global options:
 
Here are a few additional global options:
</para>
+
</pre>
  
 
<sect3><title>--sout-all, --no-sout-all</title>
 
<sect3><title>--sout-all, --no-sout-all</title>
  
<para>Enable streaming of all ES (default disabled). By default VLC will
+
</pre>Enable streaming of all ES (default disabled). By default VLC will
 
only stream one audio ES and one video ES (the first ones). If you
 
only stream one audio ES and one video ES (the first ones). If you
enable sout-all, all ES (audio, video and SPU) will be streamed.</para>
+
enable sout-all, all ES (audio, video and SPU) will be streamed.</pre>
  
 
</sect3>
 
</sect3>
Line 1,005: Line 947:
 
<sect3><title>--sout-keep, --no-sout-keep</title>
 
<sect3><title>--sout-keep, --no-sout-keep</title>
  
<para>Keep sout open (default disabled) : use the same sout instance
+
</pre>Keep sout open (default disabled) : use the same sout instance
across the various playlist items, if possible.</para>
+
across the various playlist items, if possible.</pre>
  
 
</sect3>
 
</sect3>
  
 
<sect3><title>--no-sout-audio</title>
 
<sect3><title>--no-sout-audio</title>
<para>This options allows to disable audio in the outputted stream.
+
</pre>This options allows to disable audio in the outputted stream.
</para>
+
</pre>
  
 
</sect3>
 
</sect3>
  
 
<sect3><title>--no-sout-video</title>
 
<sect3><title>--no-sout-video</title>
<para>This options allows to disable video in the outputted stream.
+
</pre>This options allows to disable video in the outputted stream.
</para>
+
</pre>
  
 
</sect3>
 
</sect3>
Line 1,026: Line 968:
 
<sect2><title>Simplified Syntax</title>
 
<sect2><title>Simplified Syntax</title>
  
<para>
+
</pre>
 
The stream output also offers a simplified syntax,
 
The stream output also offers a simplified syntax,
with which you can only you use the <emphasis>standard</emphasis> module
+
with which you can only you use the ''standard'' module
 
main options:
 
main options:
</para>
+
</pre>
  
<screen>
+
<pre>
 
<prompt>% </prompt><userinput>vlc input_stream --sout access/mux:url</userinput>
 
<prompt>% </prompt><userinput>vlc input_stream --sout access/mux:url</userinput>
</screen>
+
</pre>
  
<para>
+
</pre>
  where <emphasis>access</emphasis>,
+
  where ''access'',
<emphasis>mux</emphasis> and <emphasis>url</emphasis> are as defined in
+
''mux'' and ''url'' are as defined in
 
the options of the standard module.
 
the options of the standard module.
</para>
+
</pre>
  
 
</sect2>
 
</sect2>
Line 1,050: Line 992:
 
</title>
 
</title>
  
<para>
+
</pre>
 
To understand fully the complex syntax of VLC's
 
To understand fully the complex syntax of VLC's
 
stream output, please look at the examples in the next section.
 
stream output, please look at the examples in the next section.
</para>
+
</pre>
  
 
</sect1>
 
</sect1>

Revision as of 21:38, 3 April 2007

Advanced streaming using the command line

Structure of stream output

Stream output is the name of the feature of VLC that allows to output any stream read by VLC to a file or as a network stream instead of displaying it. Different kind of processing can be applied to the stream during this process (transcoding, re-scaling, filters, re-muxing...). Stream output includes different modules, each of them having different capabilities. You can chain modules to enhance the possibilities.

Here is the list of the modules currently available:

standard allows to send the stream via an access output module: for example, UDP, file, HTTP, ... You will probably want to use this module at the end of your chains.

transcode is used to transcode (decode and re-encode the stream using a different codec and/or bitrate) the audio and the video of the input stream. If the input or output access method doesn't allow pace control (network, capture devices), this done "on the fly", in real time. This can require quite a lot of CPU power, depending on the parameters set. Other streams, such as files and disks are transcoded as fast as the system allows it.

duplicate allows you to create a second chain, where the stream will be handled in an independent way.

display allows you to display the input stream, as VLC would normally do. Used with the duplicate module, this allows you to monitor the stream while processing it.

rtp streams over RTP (one UDP port for each elementary stream). This module also allows RTSP support.

es allows you to make separate Elementary Streams (ES) out of an input stream. This can be used to save audio and video streams to separate files, for instance.

Each of these modules may take options. Here is the syntax that you must use:


% vlc input_stream --sout "#module1{option1=parameter1{parameter-option1},option2=parameter2}:module2{option1=...,option2=...}:..."

NOTE: Some of the module options (option1 in the example) have to be set, others are optional. Option parameters (parameter-option1 in the example) are always optional. These option parameters are also often very advanced settings. If you don't understand their description, this certainly means that you don't need them.

You may also use the following syntax :

% vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-module2-option1=... --sout-module2-option2=... ...

For example, to transcode a stream and send it, use:

% vlc input_stream --sout '#transcode{options}:standard{options}'

Description of the modules

standard (alias std)

This module saves the stream to a file or sends it over a network, after having muxed it.

The available options are:

access\=

This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are:

<itemizedlist>

<listitem>file: saves the stream to a file. Use the append option to append the stream to an existing file instead of replacing it.</listitem> <listitem>udp: streams to a UDP unicast or multicast address. Item options are: caching=<time in

ms> to set the time VLC should buffer data before sending it, ttl=<ttl> to set the ttl of the sent udp packets, group=<amount of packets> to sent packets by burst instead of one by one, late=<time in ms> to drop packets that arrive too late at this stage of the chain, raw if you don't want to wait until the

MTU is filled before sending the packet. </listitem> <listitem>http: streams over HTTP. Item

options are: user=<user name> to enable HTTP basic authentication and set the user, pwd=<password> to set the basic authentication password, mime=<mime type>

to set the mime type returned by the server.</listitem> <listitem>https: streams over HTTP, using a secured SSL connection. Item options are the same as for http and: cert=<path

to certificate>to set the certificate to use, key=<path to key> to set the private key file the server should use for the SSL connection, ca=<path to certificate> to set the path to the root CA certificates to use for SSL, crl=<path to certificate> to set the revocation certificate to use for

the SSL connection.</listitem> <listitem>mmsh: streams using the Microsoft MMS protocol. This

protocol is used as transport method by many Microsoft's softwares. Note that only a small part of the MMS protocol is supported (MMS

encapsulated in HTTP). Item options are the same as for the http module.</listitem> <listitem>rtp: streams over RTP. Please note that this is

a legacy module. It doesn't allow RTSP and can only be used to stream TS streams. Please have a look at the rtp stream

output module for a more compliant and complete RTP streamer. Options are the same as for the udp setting.</listitem>

</itemizedlist> </sect3> <sect3><title>mux=</title>

This option allows you to set the encapsulation method used for the resulting stream. This option has to be set. Available options are:

<itemizedlist>

<listitem>ts: the MPEG2/TS muxer. This the

standard muxer used to stream MPEG 2. This muxer can be used with any access method. Supported codecs are MPEG 1/2/4, MJPEG, H263, H264, I263, WMV 1/2 and theora for video, MPEG audio, AAC and

a52 for the audio stream. Item options are: pid-video=<pid>

to set the PID of the video track, pid-audio=<pid> to set the PID of the audio track, pid-spu=<pid> to set the PID of the subtitle track, pid-pmt=<pid> to set the PID of the PMT (Program Map Table), tsid=<id> to set the ID of the resulting TS stream, shaping=<shaping delay in ms> to set the minimum interval during which the bitrate of the stream will remain constant, for variable bitrate streams, use-key-frames uses I frames as limits for the shaping intervals, pcr=<PCR interval in ms> allows to set at which interval Program Clock References will be sent, dts-delay=<delay in ms> allows to delay PTS (Presentation Time Stamps) from the DTS (Decoding Time Stamp) from the given time, crypt-audio allows to enable encryption of the audio track using the CSA algorithm, csa-ck=<key as a 16 character word> allows to set the key used for CSA

encryption.</listitem> <listitem>ps: the MPEG2/PS muxer. This the standard muxer for MPEG

2 files(.mpg). It can be used with the file and http output methods. Supported codecs are MPEG 1/2 and MJPEG for video, MPEG audio and a52 for

audio streams. The only available item option is dst-delay=<delay

in ms>. It allows to delay PTS (Presentation Time Stamps) from the DTS (Decoding Time Stamp) from the given

time.</listitem> <listitem>mpeg1: the standard MPEG 1 muxer. This muxer should be

used instead of ps with MPEG 1 video streams, when saved to a file or

streamed over HTTP. Supported codecs are MPEG 1 and MPEG audio. Items options are the same as for the PS muxer.</listitem> <listitem>ogg: the ogg muxer. This is the muxer from the Xiph

project. It can be used with the HTTP and file output methods. Supported codecs are MPEG 1/2/4, MJPEG WMV 1/2 and Theora, audio streams can be vorbis,

flac, speex, a52 or MPEG audio. There is no item option for this muxer.</listitem> <listitem>asf: the Microsoft ASF muxer. This is the standard muxer

used for streaming by Microsoft's softwares. Is also used as container for WMA audio files. This muxer can be used with the file and HTTP output methods. Supported codecs are MPEG 4, MJPEG, WMV 1/2 for video,

MPEG audio, a52 for audio streams. Item options are:

title=<title>, autor=<author>, copyright=<copyright message>, comment=<comments>,

rating=<rating> allow you to set what will be displayed in the according field of the stream comments.</listitem> <listitem>asfh: this is a special version of the ASF muxer, that

should be used for MMSH streaming. MMSH is the only supported output

method. Supported codecs are the same as for ASF. Item options are the same as for ASF.</listitem> <listitem>avi: the Microsoft AVI muxer. This is very common

encapsulation format for MPEG 4 files. The only supported output method is file. Supported codecs are MPEG 1/2/4, H263, H264 and I263 for video,

MPEG audio and a52 for audio streams. There is not item option for this muxer.</listitem> <listitem>mpjpeg: the multipart jpeg muxer.

This encapsulation format is mostly used on surveillance video cameras with an integrated web-server. Such streams are usually embedded in web-pages and seen with standard Internet browsers, as they are seen as a succession of jpeg images. The only supported output method is HTTP. The only usable codec is MJPEG. No sound track can be muxed

in such streams. No item option is available for this muxer.</listitem>

</itemizedlist> </sect3>

<sect3><title>dst=</title>

This option allows to give informations about the location where the stream should actually be saved or sent. Here is the meaning of the dst option

depending on the parameter used for the access

option.

<itemizedlist>

<listitem>If the file output method is used, dst is the complete path where the file should be saved.</listitem> <listitem>If the udp or rtp

output method is used, dst is the unicast or multicast destination address and, optionally, UDP port, in the form

address:port.</listitem> <listitem>If the http,

https or mmsh output method is chosen, dst is the address, port and path of the local network interface on which the server should listen for requests. If no address is given, VLC will listen on all the network interfaces. These information have to be supplied using the address:port/path

syntax.</listitem>

</itemizedlist>

</sect3>

<sect3><title>sap</title>

Use this option if you want VLC to send SAP (Session Announcement

Protocol) announces. SAP is a service discovery protocol, that uses a special multicast address to send a list of available streams on a

server. <note>This option can only be enabled with the udp output method.</note>

</sect3>

<sect3><title>group=</title>

This option allows to specify the name of an optional group of streams. A VLC used as a client will use this field to classify the stream. <note>This option uses a private extension of the SAP protocol. VLC will be the only client able to read this field. This option can only be used it the sap option has been enabled.</note>

</sect3>

<sect3><title>sap-ipv6</title>

Use this option if you want the SAP announces to be sent using the IPv6 protocol instead of IPv4. <note>This option can only be used it the sap option has been enabled.</note>

</sect3>

<sect3><title>slp</title>

SLP stands for Service Location Protocol. It is an alternative to SAP for session announcement. Use this option if you want to send such announces.

</sect3>

<sect3><title>name=</title>

Use this option to specify the name of the stream that will be sent in SAP and SLP announces. <note>This option can only be used it the sap or slp option has been enabled.</note>

</sect3>

</sect2>

<sect2><title>display</title>

This module can be used to display the stream. This is

particularly useful in a duplicate chain, in order

to monitor a stream while it is being saved or streamed. available options are:

<sect3><title>novideo</title>

You can use this option to disable video in the displayed stream.

</sect3>

<sect3><title>noaudio</title>

You can use this option to disable audio in the displayed stream.

</sect3>

<sect3><title>delay=</title>

You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms.

</sect3>

</sect2>

<sect2><title>rtp</title>

This module can be used to send a stream using the RTP (Real Time Protocol) protocol (see RFC 3550). <note>Although use of RTSP is possible using

this module, it won't allow you to make Video On demand. Please have a

look at the description of the VLM module for that.</note> The different available options are:

<sect3><title>dst=</title>

This option allow to give the destination UDP address. This can

be the address of a host or a multicast group. This option has to be given, unless the sdp=rtsp://option is given (see below). In the latter case, the stream will be sent to the host doing the

RTSP request.

</sect3>

<sect3><title>port=</title>

This option allows to set the UDP port used to send the first elementary stream. This port has to be even. Other streams will be streamed using even ports directly above this one.

</sect3>

<sect3><title>port-video=</title>

This option allows to set the UDP port used to send the first

video elementary stream. This port has to be

even.

</sect3>

<sect3><title>port-audio=</title>

This option allows to set the UDP port used to send the first

audio elementary stream. This port has to be

even.

</sect3>

<sect3><title>sdp=</title>

This option allows to set the way the SDP (Session Description Protocol) file corresponding the the stream should be made available. Options are:

<itemizedlist>

<listitem>file://<path to the file>, to export the SDP as a local file</listitem> <listitem>http://<local interface

IP:port/path>, to make the file available using the

integrated HTTP server of VLC. <note>The local interface IP argument

is optional. If not given, VLC will listen on all available

interfaces.</note></listitem> <listitem>rtsp://<local interface

IP:port/path>, to make the SDP file available using the

RTSP protocol (see RFC 2326). <note>The local interface IP argument

is optional. If not given, VLC will listen on all available

interfaces.</note></listitem> <listitem>sap, to export the SDP using the SAP (Session Announcement Protocol, see RFC 2974).</listitem>

</itemizedlist>

</sect3>

<sect3><title>ttl=</title>

This option can be used to set the TTL (Time to Live) of the sent UDP packets.

</sect3>

<sect3><title>mux=</title>

This option allows to set the encapsulation method used to

send the stream. See mux= options of the standard module for a description of the available method. Only ts and raw (no encpasulation) are possible values for RTP

streams. Default is RAW.

</sect3>

<sect3><title>name=</title>

This option can be used to set the name that will be displayed on the client receiving the stream.

</sect3>

<sect3><title>description=</title>

This option can be used to give an additional description of the stream.

</sect3>

<sect3><title>url=</title>

This option allows to give the address of a website with additional informations about the stream.

</sect3>

<sect3><title>email=</title>

This options allows to give a contact e-mail address

</sect3>

</sect2>

<sect2><title>es</title>

The es module can be used to separate the

different elementary streams from a stream, and save each of them in a different file or send it to a separate

destination. The available parameters are:

<sect3><title>access-video=</title>

Use this option to set the medium used to save or send the video

elementary streams. Possible values and item options are the same as for the access option of

the standard module (see above).

</sect3>

<sect3><title>access-audio=</title>

Use this option to set the medium used to save or send the audio

elementary streams. Possible values and item options are the same than for the access option of

the standard module (see above).

</sect3>

<sect3><title>access=</title>

This option can be used instead of both

access-video and access-audio

options, when they share the same setting.

</sect3>

<sect3><title>mux-video=</title>

Use this option to set the encapsulation method used for the

video elementary streams. Possible values and item options are the same as for the mux option of

the standard module (see above).

</sect3>

<sect3><title>mux-audio=</title>

Use this option to set the encapsulation method used for the

audio elementary streams. Possible values and item options are the same than for the mux option of the

standard module (see above).

</sect3>

<sect3><title>mux=</title>

This option can be used instead of both

mux-video and mux-audio

options, when they share the same setting.

</sect3>

<sect3><title>dst-video=</title>

Use this option to set the location where the video

elementary streams should be saved, sent, or made available. The exact meaning of this option depends on the value of the access-video option and is the same as for the url option of the standard

module (see above). <note>If you use the %d string in the url

field, VLC will replace it by the number of the audio or video track considered. The %c string will be replaced by the

name (FOURCC) of the codec of the track.</note>

</sect3>

<sect3><title>dst-audio=</title>

Use this option to set the location where the audio

elementary streams should be saved, sent, or made available. The exact meaning of this option depends on the value of the access-audio option and is the same as for the url option of the standard

module (see above). <note>If you use the %d string in the url

field, VLC will replace it by the number of the audio or video track considered. The %c string will be replaced by the

name (FOURCC) of the codec of the track.</note>


</sect3>

<sect3><title>dst=</title>

This option can be used instead of both

dst-video and dst-audio

options, when they share the same setting.

</sect3>

</sect2>

<sect2><title>transcode</title>

You can use this module to transcode a stream, i.e. to change its

codecs or the encoding bitrates. Some additional processing can be done during this process, such as re-scaling, deinterlacing, resampling,

etc. <note>Depending on the bitrate of the original stream and of

the options chosen, transcoding can be a very CPU intensive task. As a consequence, streaming of a real time transcoded stream can lead to dropped frames or a jerky image and sound in some cases, when running

out of resources.</note> Available options are:

<sect3><title>vcodec=</title>

This options allows to specify the codec the video tracks of the input stream should be transcoded to. List of available codecs can be found on the <ulink url="/streaming/features.html">streaming features page</ulink>.

</sect3>

<sect3><title>vb=</title>

This option allows to set the bitrate of the transcoded video stream, in kbit/s

</sect3>

<sect3><title>venc=</title>

This allows to set the encoder to use to encode the videos stream. Available options are:

<itemizedlist>

<listitem>ffmpeg: this is the libavcodec encoding

module. It handles a large variety of different codecs (the list can be found on the <ulink url="/streaming/features.html">streaming features

page</ulink>. Item options are: keyint=<number of

frames> allows to set the maximal amount of frames between 2 key frames, hurry-up allows the encoder to decrease the quality of the stream if the CPU can't keep up with the encoding rate, interlace allows to improve the quality of the encoding of interlaced streams, noise-reduction=<noise reduction factor> enables a noise reduction algorithm (will decrease required bitrate at the cost of details in the image), vt=<bitrate tolerance in kbit/s> allows to set a tolerance for the bitrate of the outputted video stream, bframes=<amount of frames> allows to set the amount of B frames between 2 key frames, qmin=<quantizer> allows to set the minimum quantizer scale, qmax=<quantizer> allows to set the maximum quantizer scale, qscale=<quantizer scale> allows to specify a fixed quantizer scale for VBR encodings, i-quant-factor=<quantization factor> allows to set the quantization factor of I frames, compared to P frames, hq=<quality> allows to choose the quality level for the encoding of the motion vectors (arguments are simple, rd or bits, default is simple

  • FIXME*), strict=<level of compliance>

allows to force a stricter standard compliance (possible values are -1, 0 and 1, default is 0), strict-rc enables a strict rate control algorithm, rc-buffer-size=<size of the buffer in bits> allows to choose the size of the buffer used for rate control (bigger means more efficient rate control), rc-buffer-aggressivity=<float representing the aggressiveness> allows to set the rate control buffer aggressiveness *FIXME*, pre-me allows to enable pre motion estimation, mpeg4-matrix enable use of the MPEG4 quantization matrix with MPEG2 streams, improving quality while keeping compatibility with MPEG2 decoders, trellis enables trelli quantization (better quality, but slower

processing).</listitem> <listitem>theora: The Xiph.org theora encoder.

The module is used to produce theora streams. Theora is a free patent

and royalties free video codec. The only available item option is quality=<quality

level>. This option allows to create a VBR stream, overriding vb setting. the quality level must be an

integer between 1 and 10. Higher is better.</listitem> <listitem>x264. x264 is a free open-source h264 encoder. h264 (or MPEG4-AVC) is a quite recent high quality video codec. Item options are: keyint=<number of

frames> allows to set the maximal amount of frames between 2 key frames, idrint=<number of frames> allows to set the maximal amount of frames between 2 IDR frames, bframes=<amount of frames> allows to set the amount of B frames between an I and a P frame, qp=<quantizer parameter> allows to specify a fixed quantizer (between 1 and 51), qp-max=<quantizer parameter> allows to set the maximum value for the quantizer, qp-min=<quantizer parameter> allows to set the minimum value for the quantizer, cabac enables the CABAC (Context-Adaptive Binary Arithmetic Coding) algorithm (slower, but enhances quality), loopfilter enables deblocking loop filter, analyse enables the analyze mode, frameref=<amount of frames> allows to set the number of previous frames used as predictors, scenecut=<sensibility< allows to control how aggressively the encoder should insert extra I-frame, on scene

change.</listitem>

</itemizedlist>

</sect3>

<sect3><title>fps=</title>

This options allows to set the framerate of the transcoded

video, in frame per second. reducing the framerate of a video can help

decreasing its bitrate.

</sect3>

<sect3><title>deinterlace</title>

This option allows to enable deinterlacing of interlaced video streams before encoding.

</sect3>

<sect3><title>croptop=</title>

This option allows to crop the upper part of the source video while

transcoding. The argument is the number of lines the video should be

cropped.

</sect3>

<sect3><title>cropbottom=</title>

This option allows to crop the lower part of the source video. The argument is the Y coordinate of the first line to be cropped.

</sect3>

<sect3><title>cropleft</title>

This option allows to crop the left part of the source video while

transcoding. The argument is the number of columns the video should be

cropped.

</sect3>

<sect3><title>cropright=</title>

This option allows to crop the right part of the source video. The argument is the X coordinate of the first column to be cropped.

</sect3>

<sect3><title>scale=</title>

This option allows the give the ratio from which the video should

be rescaled while being transcoded. This option can be particularly

useful to help reduce the bitrate of a stream.

</sect3>

<sect3><title>width=</title>

This options allows to give the width of the transcoded video in pixels.

</sect3>

<sect3><title>height</title>

This options allows to give the height of the transcoded video, in pixels.

</sect3>

<sect3><title>acodec=</title>

This options allows to specify the codec the audio tracks of the input stream should be transcoded to. List of available codecs can be found on the <ulink url="/streaming/features.html">streaming features page</ulink>.

</sect3>

<sect3><title>ab=</title>

This option allows to set the bitrate of the transcoded audio stream, in kbit/s

</sect3>

<sect3><title>aenc=</title>

This allows to set the encoder to use to encode the audio stream. Available options are:

<itemizedlist>

<listitem>ffmpeg: this is the libavcodec encoding

module. It handles a large variety of different codecs (the list can be found on the <ulink url="/streaming/features.html">streaming features

page</ulink>.</listitem> <listitem>vorbis. This module uses the vorbis

encoder from the Xiph.org project. Vorbis is a free, open, license-free

lossy audio codec. Item options are: quality=<quality

level> allows to use VBR (variable bitrate) encoding instead of the default CBR (constant bitrate), and to set the quality level (between 1 and 10, higher is better), max-bitrate=<bitrate in kbit/s> allows to set the maximum bitrate, for vbr encoding, min-bitrate=<bitrate in kbit/s> allows to set the minimum bitrate, for vbr encoding, cbr allows to force cbr

encoding.</listitem> <listitem>speex. This module uses the speex

encoder from the Xiph.org project. Speex is a lossy audio codec, best fit for very low bitrates (around 10 kbit/s) and particularly video

conference.</listitem>

</itemizedlist>

</sect3>

<sect3><title>samplerate=</title>

This option allows to set the samplerate of the transcoded audio

stream, in Hz. Reducing the samplerate is be a way to lower the bitrate

of the resulting audio stream.

</sect3>

<sect3><title>channels=</title>

This option allows to set the number of channels of the resulting

audio stream. This is useful for codecs that don't have support for more

than 2 channels, of to lower the bitrate of an audio stream.

</sect3>

<sect3><title>scodec=</title>

This options allows to specify subtitle format the subtitles tracks of the input stream should be converted to.

List of available codecs can be found on the <ulink url="/streaming/features.html">streaming features page</ulink>.

</sect3>

<sect3><title>senc=</title>

This allows to set the converter to use to encode the subtitle stream.

The only subtitle encoder we have at this time is dvbsub.

</sect3>

<sect3><title>soverlay</title>

This option allow to render subtitles directly on the video,

while transcoding it. Do not confuse this option with senc/scodec that

transcode the subtitles and streams them

</sect3>

<sect3><title>sfilter=</title>

This option allows to render some images generated by a so called

subpicture filter (e.g. a logo, a text string,

etc) on top of the video. List of available subpicture filters can be

found on the <ulink url="http://www.videolan.org/streaming/features.html">streaming features

page</ulink>. The Item options of this modules can be found using the following command line:

<prompt>% </prompt><userinput>vlc -p --advanced <module name></userinput>

</sect3>

<sect3><title>threads=</title>

This options allows to set the amount of threads that should

be used to encode the streams. Increasing this number to the amount of processors on the computer, (or twice this number on Intel P4 HT

processors) should improve transcoding performance.

</sect3>

<sect3><title>audio-sync</title>

When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track on the audio track.

</sect3>

</sect2>

<sect2><title>duplicate</title>

This module can be used to duplicate the stream, and so process it through several different chains. Available options are:


<sect3><title>dst=</title>

This options allows to give the chain through which the duplicated stream should be processed. <note>Several dst= options have to be used in the same duplicate block to actually duplicate the stream. Any of the stream output module described earlier can be used as parameter of this option.</note>

</sect3>

<sect3><title>select=</title>

This options can be used to duplicate only a part elementary streams of a complete stream. Several criteria can be given, by separating each of them with a comma. For criteria that need a parameter, such as

es and program, you can also specify a range, using the syntax

criteria=num_start-num_end. Available parameters are:

<itemizedlist>

<listitem>program=: duplicate only

elementary streams belonging to the selected program (or SID). This option only works with MPEG2/TS

streams.</listitem> <listitem>noprogram=: do not duplicate

elementary streams belonging to the selected program (or PID). This option only works with MPEG2/TS

streams.</listitem> <listitem>es=: duplicate only the

elementary stream with the selected

id.</listitem> <listitem>noes=: do not duplicate

the elementary stream with the selected

id.</listitem> <listitem>video: duplicate only video elementary streams.</listitem> <listitem>novideo: do not duplicate video elementary streams.</listitem> <listitem>audio: duplicate only audio elementary streams.</listitem> <listitem>noaudio: do not duplicate audio elementary streams.</listitem> <listitem>spu: duplicate only subtitle elementary streams.</listitem> <listitem>nospu: do not duplicate subtitle elementary streams.</listitem>

</itemizedlist>

Example:

#duplicate{dst=std{...},select="program=100-200,novideo"}

This duplicate chain will only output the non

video elementary streams belonging to the programs

which PID are between 100 and 200.

</sect3>

</sect2>

<sect2><title> Miscellaneous </title>

Here are a few additional global options:

<sect3><title>--sout-all, --no-sout-all</title>

Enable streaming of all ES (default disabled). By default VLC will

only stream one audio ES and one video ES (the first ones). If you

enable sout-all, all ES (audio, video and SPU) will be streamed.

</sect3>

<sect3><title>--sout-keep, --no-sout-keep</title>

Keep sout open (default disabled) : use the same sout instance across the various playlist items, if possible.

</sect3>

<sect3><title>--no-sout-audio</title>

This options allows to disable audio in the outputted stream.

</sect3>

<sect3><title>--no-sout-video</title>

This options allows to disable video in the outputted stream.

</sect3>

</sect2>

<sect2><title>Simplified Syntax</title>

The stream output also offers a simplified syntax, with which you can only you use the standard module main options:

<prompt>% </prompt><userinput>vlc input_stream --sout access/mux:url</userinput>
where access,

mux and url are as defined in the options of the standard module.

</sect2>

</sect1>

<sect1><title> Examples </title>

To understand fully the complex syntax of VLC's stream output, please look at the examples in the next section.

</sect1>

</chapter>


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