VLC's stream output allows VLC to be used as a streaming server instead of a client ! It has very extended capabilities :
stream in unicast and multicast on an IPv4 or IPv6 network everything that VLC is able to read, via UDP, RTP or HTTP ;
save the input stream to a file in AVI, PS, TS or OGG format ;
transcode an input stream, and then, send it, to the network or to a file .
To know about the full possibilities of VLC's stream output, see the streaming features page .
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 :
standard "sends" 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 allows you to transcode the audio and the video of the input stream "on the fly" (if your computer is powerful enough) .
duplicate allows you to create a second chain, where the stream will be handled in an independant way .
display allows you to display the input stream, as VLC would normally do. Used with the duplicate module, this allows you to view the stream as you send it .
es allows you to make separate Elementary Etreams (ES) out of an input stream .
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}' |
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 .
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. |
Duplicates the stream to a new stream output chain .
Options:
dst: A new stream output chain of modules, as described earlier .
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) .
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 .
In the url options, if you use the file access, you can use the following macros in the filename:
|
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 .