Difference between revisions of "Documentation:Streaming HowTo/Advanced Streaming Using the Command Line"
(Format) |
|||
Line 14: | Line 14: | ||
==Structure of stream output== | ==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. | 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: | 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. | + | * '''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 will be 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. | * '''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 will be 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. | * '''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. | * '''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. | * '''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. | * '''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. | ||
− | |||
* '''bridge-out''' TODO | * '''bridge-out''' TODO | ||
* '''bridge-in''' TODO | * '''bridge-in''' TODO | ||
* '''mosaic-bridge''' TODO | * '''mosaic-bridge''' TODO | ||
− | Each of these modules may take options. Here is the syntax that you must use: | + | 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=...}:..."''' | {{%}} '''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 : | You may also use the following syntax : | ||
Line 47: | Line 39: | ||
{{%}} '''vlc input_stream --sout-module1-option1=... --sout-module1-option2=... --sout-module2-option1=... --sout-module2-option2=... ...''' | {{%}} '''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: | + | For example, to transcode a stream and send it, use : |
{{%}} '''vlc input_stream --sout '#transcode{options}:standard{options}' ''' | {{%}} '''vlc input_stream --sout '#transcode{options}:standard{options}' ''' | ||
==Description of the modules== | ==Description of the modules== | ||
− | |||
===standard (alias std)=== | ===standard (alias std)=== | ||
− | |||
This module saves the stream to a file or sends it over a network, after having muxed it. | This module saves the stream to a file or sends it over a network, after having muxed it. | ||
− | The available options are: | + | The available options are : |
====access==== | ====access==== | ||
− | |||
This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are: | This option allows to set the medium used to save or send the stream. This is a compulsory option. Available options are: | ||
* '''file''': saves the stream to a file. | * '''file''': saves the stream to a file. | ||
− | Use the ''append'' option to append the stream to an existing file instead of replacing it: | + | Use the ''append'' option to append the stream to an existing file instead of replacing it : |
standard{ ... ,'''access=file{append}''', ... } | standard{ ... ,'''access=file{append}''', ... } | ||
− | |||
− | |||
* '''udp''': streams to a [[UDP]] unicast or multicast address. | * '''udp''': streams to a [[UDP]] unicast or multicast address. | ||
− | Item options are: | + | Item options are : |
:* '''caching=<time in ms>''' to set the time VLC should buffer data before sending it; | :* '''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; | :* '''ttl=<ttl>''' to set the [[TTL]] of the sent UDP packets; | ||
Line 77: | Line 64: | ||
:* '''late=<time in ms>''' to drop packets that arrive too late at this stage of the chain; | :* '''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. | :* '''raw''' if you don't want to wait until the [[MTU]] is filled before sending the packet. | ||
− | |||
* '''http''': streams over [[HTTP]]. | * '''http''': streams over [[HTTP]]. | ||
− | Item options are: | + | Item options are : |
:* '''user=<user name>''' to enable HTTP basic authentication and set the user; | :* '''user=<user name>''' to enable HTTP basic authentication and set the user; | ||
:* '''pwd=<password>''' to set the basic authentication password; | :* '''pwd=<password>''' to set the basic authentication password; | ||
:* '''mime=<mime type>''' to set the mime type returned by the server. | :* '''mime=<mime type>''' to set the mime type returned by the server. | ||
− | |||
* '''https''': streams over HTTP, using a secured SSL/TLS connection. | * '''https''': streams over HTTP, using a secured SSL/TLS connection. | ||
− | Item options are the same as for http and: | + | Item options are the same as for http and : |
:* '''cert=<path to certificate>'''to set the certificate to use; | :* '''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; | :* '''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; | :* '''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. | :* '''crl=<path to certificate>''' to set the revocation certificate to use for the SSL connection. | ||
− | |||
* '''mmsh''': streams using the Microsoft [[MMS]] protocol. This protocol is used as transport method by many Microsoft's softwares. | * '''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). | 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. | Item options are the same as for the http module. | ||
− | |||
* '''rtp''': streams over [[RTP]]. This can only be used to stream [[MPEG-TS]] over plain RTP. | * '''rtp''': streams over [[RTP]]. This can only be used to stream [[MPEG-TS]] over plain RTP. | ||
Support for this option has been removed in VLC 0.9.0 and later. | Support for this option has been removed in VLC 0.9.0 and later. | ||
Line 103: | Line 86: | ||
This option allows you to set the encapsulation method used for the resulting stream. This option has to be set. | This option allows you to set the encapsulation method used for the resulting stream. This option has to be set. | ||
− | Available options are: | + | Available options are : |
* '''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. | * '''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: | + | Item options are : |
:* '''pid-video=<pid>''' to set the PID of the video track; | :* '''pid-video=<pid>''' to set the PID of the video track; | ||
:* '''pid-audio=<pid>''' to set the PID of the audio track; | :* '''pid-audio=<pid>''' to set the PID of the audio track; | ||
Line 118: | Line 101: | ||
:* '''crypt-audio''' allows to enable encryption of the audio track using the CSA algorithm; | :* '''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. | :* '''csa-ck=<key as a 16 character word>''' allows to set the key used for CSA encryption. | ||
− | |||
* '''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. | * '''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: | + | 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. | :* '''dst-delay=<delay in ms>''': It allows to delay PTS (Presentation Time Stamps) from the DTS (Decoding Time Stamp) from the given time. | ||
− | |||
* '''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. | * '''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. | Items options are the same as for the PS muxer. | ||
− | |||
* '''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. | * '''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. | There is no item option for this muxer. | ||
− | |||
* '''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, and a52 for audio streams. | * '''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, and a52 for audio streams. | ||
− | Item options are: | + | Item options are : |
:* '''title=<title>'''; | :* '''title=<title>'''; | ||
:* '''autor=<author>'''; | :* '''autor=<author>'''; | ||
Line 136: | Line 115: | ||
:* '''comment=<comments>'''; | :* '''comment=<comments>'''; | ||
:* '''rating=<rating>''' allow you to set what will be displayed in the according field of the stream comments. | :* '''rating=<rating>''' allow you to set what will be displayed in the according field of the stream comments. | ||
− | |||
* '''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. | * '''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. | Item options are the same as for ASF. | ||
− | |||
* '''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. | * '''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 no item option for this muxer. | There is no item option for this muxer. | ||
− | + | {{Note|The avi muxer in VLC is known to produce corrupt files.}} | |
* '''mpjpeg''': the multipart jpeg muxer. | * '''mpjpeg''': the multipart jpeg muxer. | ||
Line 149: | Line 126: | ||
====dst==== | ====dst==== | ||
− | |||
This option allows to give various information about the location where the stream should actually be saved or sent. | This option allows to give various information about the location where the stream should actually be saved or sent. | ||
Line 159: | Line 135: | ||
====sap==== | ====sap==== | ||
− | |||
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. | 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. | ||
Line 165: | Line 140: | ||
====group==== | ====group==== | ||
− | |||
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. | 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. | ||
Line 173: | Line 147: | ||
====sap-ipv6==== | ====sap-ipv6==== | ||
− | |||
Use this option if you want the SAP announces to be sent using the '''IPv6''' protocol instead of '''IPv4'''. | Use this option if you want the SAP announces to be sent using the '''IPv6''' protocol instead of '''IPv4'''. | ||
Line 179: | Line 152: | ||
====slp==== | ====slp==== | ||
− | |||
SLP stands for ''Service Location Protocol''. It is an alternative to SAP for session announcement. Use this option if you want to send such announcements. | SLP stands for ''Service Location Protocol''. It is an alternative to SAP for session announcement. Use this option if you want to send such announcements. | ||
====name==== | ====name==== | ||
− | |||
Use this option to specify the name of the stream that will be sent in SAP and SLP announcements. | Use this option to specify the name of the stream that will be sent in SAP and SLP announcements. | ||
This option can only be used if the '''sap''' or '''slp''' option has been enabled. | This option can only be used if the '''sap''' or '''slp''' option has been enabled. | ||
− | |||
− | |||
===display=== | ===display=== | ||
− | |||
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. | 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: | + | Available options are : |
====novideo==== | ====novideo==== | ||
− | |||
You can use this option to disable video in the displayed stream. | You can use this option to disable video in the displayed stream. | ||
====noaudio==== | ====noaudio==== | ||
− | |||
You can use this option to disable audio in the displayed stream. | You can use this option to disable audio in the displayed stream. | ||
====delay==== | ====delay==== | ||
− | |||
You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms (milliseconds). | You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms (milliseconds). | ||
− | |||
− | |||
===rtp=== | ===rtp=== | ||
− | |||
This module can be used to send a stream using the ''[[RTP]] (Real Time Protocol)'' protocol (see RFC 3550). | This module can be used to send a stream using the ''[[RTP]] (Real Time Protocol)'' protocol (see RFC 3550). | ||
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. | 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. | ||
− | The different available options are: | + | The different available options are : |
====dst==== | ====dst==== | ||
− | |||
This option allows the destination UDP address to be given. 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. | This option allows the destination UDP address to be given. 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. | ||
====port==== | ====port==== | ||
− | |||
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. | 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. | ||
====port-video==== | ====port-video==== | ||
− | |||
This option allows to set the UDP port used to send the first video ''elementary stream''. This port has to be even. | This option allows to set the UDP port used to send the first video ''elementary stream''. This port has to be even. | ||
====port-audio==== | ====port-audio==== | ||
− | |||
This option allows to set the UDP port used to send the first audio ''elementary stream''. This port has to be even. | This option allows to set the UDP port used to send the first audio ''elementary stream''. This port has to be even. | ||
====sdp==== | ====sdp==== | ||
− | |||
This option allows to set the way the [[SDP]] (Session Description Protocol) file corresponding the the stream should be made available. | This option allows to set the way the [[SDP]] (Session Description Protocol) file corresponding the the stream should be made available. | ||
− | Options are: | + | Options are : |
* '''file://<path to the file>''', to export the SDP as a local file. | * '''file://<path to the file>''', to export the SDP as a local file. | ||
* '''<nowiki>http://<local interface IP:port/path></nowiki>''', to make the file available using the integrated HTTP server of VLC. | * '''<nowiki>http://<local interface IP:port/path></nowiki>''', 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.}} | |
* '''rtsp://<local interface IP:port/path>''', to make the SDP file available using the ''RTSP'' protocol (see RFC 2326). | * '''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.}} | |
* '''sap''', to export the SDP using the SAP (Session Announcement Protocol, see RFC 2974). | * '''sap''', to export the SDP using the SAP (Session Announcement Protocol, see RFC 2974). | ||
====ttl==== | ====ttl==== | ||
− | |||
This option can be used to set the ''TTL'' (Time to Live) of the sent UDP packets. | This option can be used to set the ''TTL'' (Time to Live) of the sent UDP packets. | ||
====mux==== | ====mux==== | ||
− | |||
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. | 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. | ||
Line 257: | Line 212: | ||
====rtcp-mux==== | ====rtcp-mux==== | ||
− | |||
This option enables RTP/RTCP multiplexing (see draft-ietf-avt-rtp-and-rtcp-mux), i.e. sends and receives RTCP packets on the same port numbers as RTP packets. | This option enables RTP/RTCP multiplexing (see draft-ietf-avt-rtp-and-rtcp-mux), i.e. sends and receives RTCP packets on the same port numbers as RTP packets. | ||
Line 263: | Line 217: | ||
====proto===== | ====proto===== | ||
− | |||
This selects the transport protocol to carry [[RTP]] packets. | This selects the transport protocol to carry [[RTP]] packets. | ||
− | Possible values include: | + | Possible values include : |
* '''dccp''', accept incoming [[DCCP]] connections at the specified IP address (dst=), | * '''dccp''', accept incoming [[DCCP]] connections at the specified IP address (dst=), | ||
* '''sctp''', accept [[SCTP]] connections at the specified IP address (dst=), ''not implemented yet'', | * '''sctp''', accept [[SCTP]] connections at the specified IP address (dst=), ''not implemented yet'', | ||
Line 276: | Line 229: | ||
====name==== | ====name==== | ||
− | |||
This option can be used to set the name that will be displayed on the client receiving the stream. | This option can be used to set the name that will be displayed on the client receiving the stream. | ||
====description==== | ====description==== | ||
− | |||
This option can be used to give an additional description of the stream. | This option can be used to give an additional description of the stream. | ||
====url==== | ====url==== | ||
− | |||
This option allows to give the address of a website with additional informations about the stream. | This option allows to give the address of a website with additional informations about the stream. | ||
====email==== | ====email==== | ||
− | |||
This option allows to give a contact e-mail address. | This option allows to give a contact e-mail address. | ||
===es=== | ===es=== | ||
− | |||
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 '''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: | + | The available parameters are : |
====access-video==== | ====access-video==== | ||
− | |||
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). | 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). | ||
====access-audio==== | ====access-audio==== | ||
− | |||
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). | 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). | ||
====access==== | ====access==== | ||
− | |||
This option can be used instead of both '''access-video''' and '''access-audio''' options, when they share the same setting. | This option can be used instead of both '''access-video''' and '''access-audio''' options, when they share the same setting. | ||
====mux-video==== | ====mux-video==== | ||
− | |||
Use this option to set the encapsulation method used for the video ''elementary streams''. Possible values and item | 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). | options are the same as for the '''mux''' option of the '''standard''' module (see above). | ||
====mux-audio==== | ====mux-audio==== | ||
− | |||
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). | 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). | ||
====mux==== | ====mux==== | ||
− | |||
This option can be used instead of both '''mux-video''' and '''mux-audio''' options, when they share the same setting. | This option can be used instead of both '''mux-video''' and '''mux-audio''' options, when they share the same setting. | ||
====dst-video==== | ====dst-video==== | ||
− | |||
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). | 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 ''%n'' 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. ''%a'' prints the access output used and ''%m'' the muxer used. | + | considered. The ''%c'' string will be replaced by the name (FOURCC) of the codec of the track. ''%a'' prints the access output used and ''%m'' the muxer used.}} |
====dst-audio==== | ====dst-audio==== | ||
− | |||
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). | 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 ''%n'' 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. ''%a'' prints the access output used and ''%m'' the muxer used.}} | |
====dst==== | ====dst==== | ||
− | |||
This option can be used instead of both '''dst-video''' and '''dst-audio''' options, when they share the same setting. | This option can be used instead of both '''dst-video''' and '''dst-audio''' options, when they share the same setting. | ||
− | |||
− | |||
===transcode=== | ===transcode=== | ||
− | |||
You can use this module to transcode a stream, e.g., to change its codecs or the encoding bitrates. Some additional processing can be done during this process, such as re-scaling, deinterlacing, resampling, etc. | You can use this module to transcode a stream, e.g., 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.}} | |
− | Available options are: | + | Available options are : |
====vcodec==== | ====vcodec==== | ||
− | |||
This option allows to specify the codec the video tracks of the input stream should be transcoded to. | This option 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 [ | + | List of available codecs can be found on the [https://www.videolan.org/streaming/features.html streaming features page]. |
====vb==== | ====vb==== | ||
− | |||
This option allows to set the bitrate of the transcoded video stream, in kbit/s. | This option allows to set the bitrate of the transcoded video stream, in kbit/s. | ||
====venc==== | ====venc==== | ||
− | |||
This allows to set the encoder to use to encode the videos stream. Available options are: | This allows to set the encoder to use to encode the videos stream. Available options are: | ||
− | * '''ffmpeg''': this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the [ | + | * '''ffmpeg''': this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the [https://www.videolan.org/streaming/features.html streaming features page]. |
− | Item options are: | + | Item options are : |
:* '''keyint=<number of frames>''' allows to set the maximal amount of frames between 2 key frames; | :* '''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; | :* '''hurry-up''' allows the encoder to decrease the quality of the stream if the CPU can't keep up with the encoding rate; | ||
Line 378: | Line 311: | ||
:* '''strict-rc''' enables a strict rate control algorithm; | :* '''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-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= | + | :* '''rc-buffer-aggressivity={{tag|float representing the aggressiveness}}''' allows to set the rate control buffer aggressiveness *FIXME*; |
:* '''pre-me''' allows to enable pre motion estimation; | :* '''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; | :* '''mpeg4-matrix''' enable use of the MPEG4 quantization matrix with MPEG2 streams, improving quality while keeping compatibility with MPEG2 decoders; | ||
:* '''trellis''' enables trellis quantization (better quality, but slower processing). | :* '''trellis''' enables trellis quantization (better quality, but slower processing). | ||
− | |||
* '''theora''': The Xiph.org theora encoder. The module is used to produce theora streams. Theora is a free patent and royalties-free video codec. | * '''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: | + | 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. | :* '''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. | ||
− | |||
* '''x264'''. x264 is a free open-source [[h264]] encoder. h264 (or MPEG4-AVC) is a quite recent high-quality video codec. | * '''x264'''. x264 is a free open-source [[h264]] encoder. h264 (or MPEG4-AVC) is a quite recent high-quality video codec. | ||
− | Item options are: | + | Item options are : |
:* '''keyint=<number of frames>''' allows to set the maximal amount of frames between 2 key frames; | :* '''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; | :* '''idrint=<number of frames>''' allows to set the maximal amount of frames between 2 IDR frames; | ||
Line 405: | Line 336: | ||
====deinterlace==== | ====deinterlace==== | ||
− | |||
This option allows to enable [[deinterlacing]] of interlaced video streams before encoding. | This option allows to enable [[deinterlacing]] of interlaced video streams before encoding. | ||
====croptop==== | ====croptop==== | ||
− | |||
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. | 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. | ||
====cropbottom==== | ====cropbottom==== | ||
− | |||
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. | 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. | ||
====cropleft==== | ====cropleft==== | ||
− | |||
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. | 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. | ||
====cropright==== | ====cropright==== | ||
− | |||
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. | 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. | ||
====scale==== | ====scale==== | ||
− | |||
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. | 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. | ||
====width==== | ====width==== | ||
− | |||
This option allows you to give the width of the transcoded video, in pixels. | This option allows you to give the width of the transcoded video, in pixels. | ||
====height==== | ====height==== | ||
− | |||
This option allows you to give the height of the transcoded video, in pixels. | This option allows you to give the height of the transcoded video, in pixels. | ||
====acodec==== | ====acodec==== | ||
− | |||
This option allows you to specify the codec the audio tracks of the input stream should be transcoded to. | This option allows you to specify the codec the audio tracks of the input stream should be transcoded to. | ||
− | List of available codecs can be found on the [ | + | List of available codecs can be found on the [https://www.videolan.org/streaming/features.html streaming features page]. |
====ab==== | ====ab==== | ||
− | |||
This option allows to set the bitrate of the transcoded audio stream, in kbit/s. | This option allows to set the bitrate of the transcoded audio stream, in kbit/s. | ||
====aenc==== | ====aenc==== | ||
− | |||
This allows to set the encoder to use to encode the audio stream. | This allows to set the encoder to use to encode the audio stream. | ||
− | Available options are: | + | Available options are : |
− | * '''ffmpeg''': this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the [ | + | * '''ffmpeg''': this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the [https://www.videolan.org/streaming/features.html streaming features page]). |
* '''vorbis'''. This module uses the vorbis encoder from the Xiph.org project. Vorbis is a free, open, license-free lossy audio codec. | * '''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: | + | Item options are : |
:* '''quality=<quality level>''' allows to use VBR (variable bitrate) encoding instead of the default CBR (constant bitrate), and<br />to set the quality level (between 1 and 10, higher is better); | :* '''quality=<quality level>''' allows to use VBR (variable bitrate) encoding instead of the default CBR (constant bitrate), and<br />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; | :* '''max-bitrate=<bitrate in kbit/s>''' allows to set the maximum bitrate, for vbr encoding; | ||
Line 461: | Line 381: | ||
====samplerate==== | ====samplerate==== | ||
− | |||
This option allows to set the [[sample rate]] of the transcoded audio stream, in Hz. Reducing the sample rate is a way to lower the bitrate of the resulting audio stream. | This option allows to set the [[sample rate]] of the transcoded audio stream, in Hz. Reducing the sample rate is a way to lower the bitrate of the resulting audio stream. | ||
====channels==== | ====channels==== | ||
− | |||
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, or to lower the bitrate of an audio stream. | 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, or to lower the bitrate of an audio stream. | ||
====scodec==== | ====scodec==== | ||
− | |||
This option allows to specify subtitle format the subtitles tracks of the input stream should be converted to. | This option 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 [ | + | List of available codecs can be found on the [https://www.videolan.org/streaming/features.html streaming features page]. |
====senc==== | ====senc==== | ||
− | |||
This allows to set the converter to use to encode the subtitle stream. | This allows to set the converter to use to encode the subtitle stream. | ||
Line 481: | Line 397: | ||
====soverlay==== | ====soverlay==== | ||
− | |||
This option allows rendering subtitles directly on the video, while transcoding it.<br /> | This option allows rendering subtitles directly on the video, while transcoding it.<br /> | ||
Do not confuse this option with senc/scodec that transcode the subtitles and stream them. | Do not confuse this option with senc/scodec that transcode the subtitles and stream them. | ||
====sfilter==== | ====sfilter==== | ||
− | |||
This option allows to render some images generated by a so-called ''subpicture filter'' (e.g. a logo, a text string, | 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. | etc.) on top of the video. | ||
− | The list of available ''subpicture filters'' can be found on the [ | + | The list of available ''subpicture filters'' can be found on the [https://www.videolan.org/streaming/features.html streaming features page]. The Item options of this modules can be found using the following command line : |
{{%}} '''vlc -p --advanced <module name>''' | {{%}} '''vlc -p --advanced <module name>''' | ||
====threads==== | ====threads==== | ||
− | |||
This option allows to set the number of computer processing 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. | This option allows to set the number of computer processing 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. | ||
====audio-sync==== | ====audio-sync==== | ||
− | |||
When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track with the audio track. | When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track with the audio track. | ||
====vfilter==== | ====vfilter==== | ||
− | |||
Uses video filter during transcode process. Parameters of vfilter can be found on the [[Documentation:Play HowTo/Advanced Use of VLC#Filters|Advanced Use of VLC Filters]]. | Uses video filter during transcode process. Parameters of vfilter can be found on the [[Documentation:Play HowTo/Advanced Use of VLC#Filters|Advanced Use of VLC Filters]]. | ||
Line 511: | Line 422: | ||
===duplicate=== | ===duplicate=== | ||
− | |||
This module can be used to duplicate the stream, and so process it through several different chains. | This module can be used to duplicate the stream, and so process it through several different chains. | ||
− | Available options are: | + | Available options are : |
====dst==== | ====dst==== | ||
− | |||
This option allows to give the chain through which the duplicated stream should be processed. | This option allows to give the chain through which the duplicated stream should be processed. | ||
− | + | {{Note|'''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. | + | Any of the stream output module described earlier can be used as parameter of this option.}} |
====select==== | ====select==== | ||
− | |||
This options can be used to duplicate only a part ''elementary streams'' of a complete stream. | 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. | 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'''. | 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: | + | Available parameters are : |
* '''program=''': duplicate only ''elementary streams'' belonging to the selected program (or SID). This option only works with MPEG2/TS streams. | * '''program=''': duplicate only ''elementary streams'' belonging to the selected program (or SID). This option only works with MPEG2/TS streams. | ||
Line 542: | Line 450: | ||
* '''nospu''': do not duplicate subtitle ''elementary streams''. | * '''nospu''': do not duplicate subtitle ''elementary streams''. | ||
− | Example: | + | Example : |
#duplicate{dst=std{...},select="program=100-200,novideo"} | #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. | This ''duplicate'' chain will only output the non video ''elementary streams'' belonging to the programs which PID are between 100 and 200. | ||
− | |||
− | |||
=== Miscellaneous === | === Miscellaneous === | ||
− | Here are a few additional global options: | + | Here are a few additional global options : |
* '''--sout-all''', '''--no-sout-all''': 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. | * '''--sout-all''', '''--no-sout-all''': 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. | ||
Line 559: | Line 465: | ||
=== Simplified Syntax === | === Simplified Syntax === | ||
− | The stream output also offers a simplified syntax, with which you can only you use the '''standard''' module's main options: | + | The stream output also offers a simplified syntax, with which you can only you use the '''standard''' module's main options : |
{{%}} '''vlc input_stream --sout access/mux://url''' | {{%}} '''vlc input_stream --sout access/mux://url''' | ||
where '''access''', '''mux''' and '''url''' are as defined in the options of the '''standard''' module. | where '''access''', '''mux''' and '''url''' are as defined in the options of the '''standard''' module. | ||
== Examples == | == Examples == | ||
− | |||
To fully understand the complex syntax of VLC's stream output, please look at the examples in the next section. | To fully understand the complex syntax of VLC's stream output, please look at the examples in the next section. | ||
{{Documentation}} | {{Documentation}} |
Revision as of 06:45, 16 May 2019
Contents
- 1 Structure of stream output
- 2 Description of the modules
- 2.1 standard (alias std)
- 2.2 display
- 2.3 rtp
- 2.4 es
- 2.5 transcode
- 2.5.1 vcodec
- 2.5.2 vb
- 2.5.3 venc
- 2.5.4 fps
- 2.5.5 deinterlace
- 2.5.6 croptop
- 2.5.7 cropbottom
- 2.5.8 cropleft
- 2.5.9 cropright
- 2.5.10 scale
- 2.5.11 width
- 2.5.12 height
- 2.5.13 acodec
- 2.5.14 ab
- 2.5.15 aenc
- 2.5.16 samplerate
- 2.5.17 channels
- 2.5.18 scodec
- 2.5.19 senc
- 2.5.20 soverlay
- 2.5.21 sfilter
- 2.5.22 threads
- 2.5.23 audio-sync
- 2.5.24 vfilter
- 2.6 duplicate
- 2.7 Miscellaneous
- 2.8 Simplified Syntax
- 3 Examples
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 will be 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.
- bridge-out TODO
- bridge-in TODO
- mosaic-bridge TODO
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=...}:..."
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:
- file: saves the stream to a file.
Use the append option to append the stream to an existing file instead of replacing it :
standard{ ... ,access=file{append}, ... }
- udp: streams to a UDP unicast or multicast address.
Item options are :
- caching= 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= 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.
- 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.
- https: streams over HTTP, using a secured SSL/TLS 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.
- 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.
Support for this option has been removed in VLC 0.9.0 and later. You should use the rtp stream output module instead. Options are the same as for the udp setting.
mux
This option allows you to set the encapsulation method used for the resulting stream. This option has to be set.
Available options are :
- 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.
- 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.
- 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.
- 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.
- 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, and 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.
- 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.
- 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 no item option for this muxer.
The avi muxer in VLC is known to produce corrupt files. |
- 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.
dst
This option allows to give various information 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.
- If the file output method is used, dst is the path where the file should be saved.
- 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.
- 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 bits of information have to be supplied using the address:port/path syntax.
sap
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.
This option can only be enabled with the udp output method.
group
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.
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 if the sap option has been enabled.
sap-ipv6
Use this option if you want the SAP announces to be sent using the IPv6 protocol instead of IPv4.
This option can only be used if the sap option has been enabled.
slp
SLP stands for Service Location Protocol. It is an alternative to SAP for session announcement. Use this option if you want to send such announcements.
name
Use this option to specify the name of the stream that will be sent in SAP and SLP announcements.
This option can only be used if the sap or slp option has been enabled.
display
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 :
novideo
You can use this option to disable video in the displayed stream.
noaudio
You can use this option to disable audio in the displayed stream.
delay
You can use this option to introduce a delay in the display of the stream. Delay has to be given in ms (milliseconds).
rtp
This module can be used to send a stream using the RTP (Real Time Protocol) protocol (see RFC 3550).
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.
The different available options are :
dst
This option allows the destination UDP address to be given. 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.
port
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.
port-video
This option allows to set the UDP port used to send the first video elementary stream. This port has to be even.
port-audio
This option allows to set the UDP port used to send the first audio elementary stream. This port has to be even.
sdp
This option allows to set the way the SDP (Session Description Protocol) file corresponding the the stream should be made available. Options are :
- file://<path to the file>, to export the SDP as a local file.
- http://<local interface IP:port/path>, to make the file available using the integrated HTTP server of VLC.
The local interface IP argument is optional. If not given, VLC will listen on all available interfaces. |
- rtsp://<local interface IP:port/path>, to make the SDP file available using the RTSP protocol (see RFC 2326).
The local interface IP argument is optional. If not given, VLC will listen on all available interfaces. |
- sap, to export the SDP using the SAP (Session Announcement Protocol, see RFC 2974).
ttl
This option can be used to set the TTL (Time to Live) of the sent UDP packets.
mux
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 is possible for RTP streams. By default, each elementary stream is sent as a separate RTP medium, i.e. no encapsulation is done.
rtcp-mux
This option enables RTP/RTCP multiplexing (see draft-ietf-avt-rtp-and-rtcp-mux), i.e. sends and receives RTCP packets on the same port numbers as RTP packets.
By default, RTCP packets are sent and received on the next port.
proto=
This selects the transport protocol to carry RTP packets.
Possible values include :
- dccp, accept incoming DCCP connections at the specified IP address (dst=),
- sctp, accept SCTP connections at the specified IP address (dst=), not implemented yet,
- tcp, accept TCP connections at the specified IP address (dst=) and use RFC 4571 RTP framing, not implemented yet,
- udp, send UDP packets to the specified destination (either unicast or multicast); this is the default value,
- udplite, send UDP-Lite packets to the specified destination (either unicast or multicast).
This options uses UDP-Lite instead of UDP as the transport protocol for RTP and RTCP packets.
name
This option can be used to set the name that will be displayed on the client receiving the stream.
description
This option can be used to give an additional description of the stream.
url
This option allows to give the address of a website with additional informations about the stream.
This option allows to give a contact e-mail address.
es
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 :
access-video
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).
access-audio
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).
access
This option can be used instead of both access-video and access-audio options, when they share the same setting.
mux-video
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).
mux-audio
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).
mux
This option can be used instead of both mux-video and mux-audio options, when they share the same setting.
dst-video
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).
If you use the %n 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. %a prints the access output used and %m the muxer used. |
dst-audio
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).
If you use the %n 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. %a prints the access output used and %m the muxer used. |
dst
This option can be used instead of both dst-video and dst-audio options, when they share the same setting.
transcode
You can use this module to transcode a stream, e.g., to change its codecs or the encoding bitrates. Some additional processing can be done during this process, such as re-scaling, deinterlacing, resampling, etc.
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. |
Available options are :
vcodec
This option 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 streaming features page.
vb
This option allows to set the bitrate of the transcoded video stream, in kbit/s.
venc
This allows to set the encoder to use to encode the videos stream. Available options are:
- ffmpeg: this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the streaming features page.
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 output 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 trellis quantization (better quality, but slower processing).
- 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.
- 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 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.
fps
This option allows to set the framerate of the transcoded video, in frames per second; reducing the framerate of a video can help decrease its bitrate.
deinterlace
This option allows to enable deinterlacing of interlaced video streams before encoding.
croptop
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.
cropbottom
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.
cropleft
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.
cropright
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.
scale
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.
width
This option allows you to give the width of the transcoded video, in pixels.
height
This option allows you to give the height of the transcoded video, in pixels.
acodec
This option allows you to specify the codec the audio tracks of the input stream should be transcoded to.
List of available codecs can be found on the streaming features page.
ab
This option allows to set the bitrate of the transcoded audio stream, in kbit/s.
aenc
This allows to set the encoder to use to encode the audio stream. Available options are :
- ffmpeg: this is the libavcodec encoding module. It handles a large variety of different codecs (the list can be found on the streaming features page).
- 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.
- quality=<quality level> allows to use VBR (variable bitrate) encoding instead of the default CBR (constant bitrate), and
- 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 conferences.
samplerate
This option allows to set the sample rate of the transcoded audio stream, in Hz. Reducing the sample rate is a way to lower the bitrate of the resulting audio stream.
channels
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, or to lower the bitrate of an audio stream.
scodec
This option 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 streaming features page.
senc
This allows to set the converter to use to encode the subtitle stream.
The only subtitle encoder we have at this time is dvbsub.
soverlay
This option allows rendering subtitles directly on the video, while transcoding it.
Do not confuse this option with senc/scodec that transcode the subtitles and stream them.
sfilter
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.
The list of available subpicture filters can be found on the streaming features page. The Item options of this modules can be found using the following command line :
% vlc -p --advanced <module name>
threads
This option allows to set the number of computer processing 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.
audio-sync
When this option is enabled, VLC will drop/duplicate video frames to synchronize the video track with the audio track.
vfilter
Uses video filter during transcode process. Parameters of vfilter can be found on the Advanced Use of VLC Filters.
The example
vlc input_file --sout="#transcode{vfilter=adjust{gamma=1.5},vcodec=theo,vb=2000,scale=0.67,acodec=vorb,ab=128,channels=2}:standard{access=file,mux=ogg,dst="output_file.ogg"}"
will adjust input_file gamma to 1.5, resize the video size (resolution) by 0.67 (e.g. 1080x720 to 720x480), convert video using the Theora codec with bitrate @ 2000 kb/s and audio using the Vorbis codec with bitrate @ 128 kb/s, encapsulate the video and audio to an Ogg container and save it to output_file.ogg.
duplicate
This module can be used to duplicate the stream, and so process it through several different chains.
Available options are :
dst
This option allows to give the chain through which the duplicated stream should be processed.
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. |
select
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 :
- program=: duplicate only elementary streams belonging to the selected program (or SID). This option only works with MPEG2/TS streams.
- noprogram=: do not duplicate elementary streams belonging to the selected program (or PID). This option only works with MPEG2/TS streams.
- es=: duplicate only the elementary stream with the selected id.
- noes=: do not duplicate the elementary stream with the selected id.
- video: duplicate only video elementary streams.
- novideo: do not duplicate video elementary streams.
- audio: duplicate only audio elementary streams.
- noaudio: do not duplicate audio elementary streams.
- spu: duplicate only subtitle elementary streams.
- nospu: do not duplicate subtitle elementary streams.
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.
Miscellaneous
Here are a few additional global options :
- --sout-all, --no-sout-all: 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.
- --sout-keep, --no-sout-keep: Keep sout open (default disabled) : use the same sout instance across the various playlist items, if possible.
- --no-sout-audio: This option allows to disable audio in the outputted stream.
- --no-sout-video: This option allows to disable video in the outputted stream.
Simplified Syntax
The stream output also offers a simplified syntax, with which you can only you use the standard module's main options :
% vlc input_stream --sout access/mux://url
where access, mux and url are as defined in the options of the standard module.
Examples
To fully understand the complex syntax of VLC's stream output, please look at the examples in the next section.
Please read the Documentation Editing Guidelines before you edit the documentation