<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gene+wood</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gene+wood"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Gene_wood/"/>
	<updated>2026-11-04T19:10:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Command_Line_Examples&amp;diff=16265</id>
		<title>Documentation:Streaming HowTo/Command Line Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Command_Line_Examples&amp;diff=16265"/>
		<updated>2010-06-10T20:14:42Z</updated>

		<summary type="html">&lt;p&gt;Gene wood: It looks like the &amp;quot;standard&amp;quot; module no longer uses &amp;quot;url&amp;quot; for access=file type outputs to assemble the full path to the output file  and instead uses &amp;quot;dst&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation streaming howto toc}}&lt;br /&gt;
&lt;br /&gt;
Examples for advanced use of VLC&#039;s stream output (transcoding, multiple streaming, etc...)&lt;br /&gt;
&lt;br /&gt;
==Transcoding==&lt;br /&gt;
&lt;br /&gt;
Transcode the input stream and send it to a multicast IP address with the associated SAP announce:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:rtp{mux=ts,dst=239.255.12.42,sdp=sap,name=&amp;quot;TestStream&amp;quot;}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#duplicate{dst=display,dst=&amp;quot;transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:rtp{mux=ts,dst=239.255.12.42,sdp=sap,name=&amp;quot;TestStream&amp;quot;}&amp;quot;}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name=&amp;quot;TestStream&amp;quot;}}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Multiple streaming==&lt;br /&gt;
&lt;br /&gt;
Send a stream to a multicast IP address and a unicast IP address:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#duplicate{dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name=&amp;quot;TestStream&amp;quot;},dst=rtp{mux=ts,dst=192.168.1.2}}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display the stream and send it to two unicast IP addresses:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#duplicate{dst=display,dst=rtp{mux=ts,dst=192.168.1.12},dst=rtp{mux=ts,dst=192.168.1.42}}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send parts of a multiple program input stream:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv multiple_program_input_stream --sout &#039;#duplicate{dst=rtp{mux=ts,dst=239.255.12.42},select=&amp;quot;program=12345&amp;quot;,dst=rtp{mux=ts,dst=239.255.12.43}, select=&amp;quot;video,program=1234-2345&amp;quot;}&#039; &#039;&#039;&#039;&lt;br /&gt;
This command sends the program of the input stream which id is 12345 to 239.255.12.42 and all video programs with id between 1234 and 2345 to 239.255.12.43.&lt;br /&gt;
&lt;br /&gt;
==Transcoding and multiple streaming==&lt;br /&gt;
&lt;br /&gt;
Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce and an unicast IP address:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:duplicate{dst=display,dst=rtp{mux=ts,dst=239.255.12.42,sdp=sap,name=&amp;quot;TestStream&amp;quot;},dst=rtp{mux=ts,dst=192.168.1.2}}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Display the input stream, transcode it and send it to two unicast IP addresses:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#duplicate{dst=display,dst=&amp;quot;transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:duplicate{dst=rtp{mux=ts,dst=192.168.1.2},dst=rtp{mux=ts,dst=192.168.1.12}&amp;quot;}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Send the input stream to a multicast IP address and the transcoded stream to another multicast IP address with the associated SAP announces:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#duplicate{dst=rtp{mux=ts,dst=239.255.1.2,sdp=sap,name=&amp;quot;OriginalStream&amp;quot;},dst=&amp;quot;transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.1.3,sdp=sap,name=&amp;quot;TranscodedStream&amp;quot;}&amp;quot;}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==HTTP streaming==&lt;br /&gt;
&lt;br /&gt;
Stream in HTTP:&lt;br /&gt;
*on the server, run:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#standard{access=http,mux=ogg,dst=server.example.org:8080}&#039; &#039;&#039;&#039;&lt;br /&gt;
*on the client(s), run:&lt;br /&gt;
 % &#039;&#039;&#039;vlc http://server.example.org:8080&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Transcode and stream in HTTP:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:standard{access=http,mux=ogg,dst=server.example.org:8080}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Recording a live video stream:&lt;br /&gt;
 % &#039;&#039;&#039;vlc http://example.com/live.asf --sout=&amp;quot;#duplicate{dst=std{access=file,mux=asf,dst=&#039;C:\test\test.asf&#039;},dst=nodisplay}&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, if you want to stream an audio CD in Ogg/Vorbis over HTTP:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv cdda:/dev/cdrom --sout &#039;#transcode{acodec=vorb,ab=128}:standard{access=http,mux=ogg,dst=server.example.org:8080}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==RTSP live streaming==&lt;br /&gt;
&lt;br /&gt;
Stream with RTSP and RTP:&lt;br /&gt;
*on the server, run:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#rtp{dst=192.168.0.12,port=1234,sdp=rtsp://server.example.org:8080/test.sdp}&#039; &#039;&#039;&#039;&lt;br /&gt;
*on the client(s), run:&lt;br /&gt;
 % &#039;&#039;&#039;vlc rtsp://server.example.org:8080/test.sdp&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==RTSP on-demand streaming==&lt;br /&gt;
&lt;br /&gt;
See [[Documentation:Streaming HowTo/VLM]].&lt;br /&gt;
&lt;br /&gt;
==MMS / MMSH streaming to Windows Media Player==&lt;br /&gt;
&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#transcode{vcodec=DIV3,vb=256,scale=1,acodec=mp3,ab=32,channels=2}:std{access=mmsh,mux=asfh,dst=:8080}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
VLC media player can connect to this by using the following url: &#039;&#039;&#039;mmsh://server_ip_address:8080&#039;&#039;&#039;.&lt;br /&gt;
Windows Media Player can connect to this by using the following url: &#039;&#039;&#039;mms://server_ip_address:8080&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Use the &#039;&#039;es&#039;&#039; module==&lt;br /&gt;
&lt;br /&gt;
Separate audio and video in two PS files:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#es{access=file,mux=ps,url_audio=audio-%c.%m,url_video=video-%c.%m}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Extract the audio track of the input stream to a TS file:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#es{access_audio=file,mux_audio=ts,url_audio=audio-%c.%m}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Stream in unicast the audio track on a port and the video track on another port (NOTE: This will not only work with VLC 0.8.6 or older - FIXME?):&lt;br /&gt;
*on the server side:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#es{access=rtp,mux=ts,url_audio=192.168.1.2:1212,url_video=192.168.1.2:1213}&#039; &#039;&#039;&#039;&lt;br /&gt;
*on the client side:&lt;br /&gt;
**to receive the audio:&lt;br /&gt;
 % &#039;&#039;&#039;vlc udp://@:1212&#039;&#039;&#039;&lt;br /&gt;
**to receive the video:&lt;br /&gt;
 % &#039;&#039;&#039;vlc udp://@:1213&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Stream in multicast the video and dump the audio in a file:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -vvv input_stream --sout &#039;#es{access-video=udp,mux-video=ts,dst-video=239.255.12.42,access-audio=file,mux-audio=ps,dst-audio=audio-%c.%m}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note: You can also combine the &#039;&#039;es&#039;&#039; module with the other modules to set-up even more complex solution.&lt;br /&gt;
&lt;br /&gt;
==Keeping the stream open==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 % &#039;&#039;&#039;% vlc -vvv input_stream -sout-keep -sout=#transcode{acodec=mp3}:duplicate{dst=display{delay=6000},dst=gather:std{mux=mpeg1,dst=:8080/stream.mp3,access=http},select=&amp;quot;novideo&amp;quot;} &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The basic transcoding is an mp3 stream from the file you select (if it is a video file, then the video is ignored). It is streamed via http to localhost:8080/stream.mp3&lt;br /&gt;
&lt;br /&gt;
The combination of :sout-keep and dst=gather:std mean that the stream is kept open and subsequent items are played through the same stream.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Gene wood</name></author>
	</entry>
</feed>