4.4. Stream Output

4.4.1. Description of the stream output

VLC's stream output allows VLC to be used as a streaming server instead of a client ! It has very extended capabilities :

To know about the full possibilities of VLC's stream output, see the streaming features page .

4.4.2. Architecture and syntax

the stream output has a powerful architecture that uses modules. Each module has capabilities, and you can chain the modules to enhance the possibilities .

Here is the list of the modules currently available :

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


% vlc input_stream --sout '#module1{option1=...,option2=...}:#module2{option1=...,option2=...}:...'

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


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

4.4.3. Description of the modules

4.4.3.1. standard (alias std)

Sends a stream .

Options:

  • access: how to send : file, udp, rtp, http.

  • mux: which muxer (ie, which format) will be used. It can be one of avi (for AVI format) , ogg (for OGG format) , ps (for MPEG2-PS format) , ts (for MPEG2-TS format) .

  • url: if you use the file access, it will be the location where to store the stream; if you use another access, it will be the unicast or multicast IP address where you want to stream .

  • sap: if you use the udp or rtp accesses, use this option to announce your stream, using SAP/SDP. This option contains the name under which you want to announce the program .

  • slp: like sap, but use the SLP protocol. You need to have libslp on your system .

  • sap_ipv: if you use the sap option, use this option to specify if you want to send the SAP announces in IPv4 or IPv6. The value of this option is 4 or 6 si vous utilisez sap, utilisez ceci pour sp�cifier si vous d�sirez envoyer les annonces SAP en IPv4 -d�faut- ou IPv6. La valeur � utiliser est 4 ou 6 .

Note

If you are streaming in multicast, you may want to use the global option --ttl 12 to set the TTL to a value superior to 1.

4.4.3.2. display

Displays the stream .

Options:

  • noaudio: Ignore audio .

  • novideo: Ignore video .

4.4.3.3. duplicate

Duplicates the stream to a new stream output chain .

Options:

  • dst: A new stream output chain of modules, as described earlier .

4.4.3.4. transcode

Changes the codec and/or bitrates for a stream .

Options:

  • acodec: the new audio codec. It can be one of mpga (MPEG audio layer 2), a52 or ac3 (AC3 sound) or vorb (Vorbis)

  • ab: audio bitrate in Kbps .

  • vcodec: the new video codec. It can be one of mp4v (MPEG4), mpgv (MPEG1), DIV1, DIV2, DIV3 (DivX 1,2,3), H263 (H263), I263 (H263I), WMV1 or WMV2 (Windows Media Video 1 or 2), MJPG (MJPEG), MJPB (MJPEGB) .

  • width: video width .

  • height: video height .

  • vb: video bitrate in kbps .

  • vt: video bitrate tolerance in bps .

  • deinterlace: deinterlace the stream .

  • croptop: number of pixels removed from the top of the video .

  • cropbottom: number of pixel removed from the bottom of the video .

  • cropleft: number of pixels removed from the left of the video .

  • cropright: number of pixels removed from the right of the video .

  • hq: high quality transcoding (uses more CPU) .

  • qmin: minimum video quantiser scale (VBR)

  • qmax: maximum video quantiser scale (VBR) .

4.4.3.5. es

Make separate Elementary Streams .

Options:

  • access_audio: how to send the audio track: file, udp, rtp or http .

  • access_video: how to send the vid�o track: file, udp, rtp or http .

  • access: if you want the audio and the video tracks to use the same access, use this option instead of the two above .

  • mux_audio: which muxer (ie, which format) will be used for the audio track. It can be one of avi (for AVI format), ogg (for OGG format), ps (for MPEG2-PS format), ts (for MPEG2-TS format) .

  • mux_video: which muxer (ie, which format) will be used for the video track. It can be one of avi (for AVI format), ogg (for OGG format), ps (for MPEG2-PS format), ts (for MPEG2-TS format) .

  • mux: if you want the audio and the video tracks to use the same muxer, use this option instead of the two above .

  • url_audio: if you use the file access, it will be the location where to store the audio track; if you use another access, it will be the unicast or multicast IP address where you want to stream .

  • url_video: if you use the file access, it will be the location where to store the vid�o track; if you use another access, it will be the unicast or multicast IP address where you want to stream .

  • url: if you want the audio and the video tracks to use the same url, use this option instead of the two above .

Note

In the url options, if you use the file access, you can use the following macros in the filename:

  • %n = stream number ;

  • %c = FOURCC ;

  • %m = muxer ;

  • %a = access.

4.4.3.6. Miscellaneous

Here are a few additional global options

  • --no-sout-audio disables audio stream output .

  • --no-sout-video disables video stream output .

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


% vlc input_stream --sout access/mux:url

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

4.4.4. Examples

To understand fully the complex syntax of VLC's stream output, please look at the use cases of the VideoLAN HOWTO .