<HTML ><HEAD ><TITLE > Examples </TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="VideoLAN HOWTO" HREF="index.html"><LINK REL="UP" TITLE=" Advanced use of VLC's stream output (transcoding, multiple streaming, etc...) " HREF="usesout.html"><LINK REL="PREVIOUS" TITLE=" The syntax " HREF="x1091.html"><LINK REL="NEXT" TITLE=" Stream in IPv6 " HREF="ipv6.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >VideoLAN HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x1091.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 9. Advanced use of VLC's stream output (transcoding, multiple streaming, etc...)</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="ipv6.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="AEN1096" ></A >9.2. Examples</H1 ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1098" ></A >9.2.1. Transcoding</H2 ><P > Transcode the input stream and send it to a multicast IP address with the associated SAP announce :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#duplicate{dst=display,dst= "transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}"}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1112" ></A >9.2.2. Multiple streaming</H2 ><P > Send a stream to a multicast IP address and a unicast IP address :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#duplicate{dst= standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}, dst=standard{access=udp,mux=ts,url=192.168.1.2}}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Display the stream and send it to two unicast IP addresses :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#duplicate{dst=display,dst= standard{access=udp,mux=ts,url=192.168.1.12}, dst=standard{access=udp,mux=ts,url=192.168.1.42}}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1122" ></A >9.2.3. Transcoding and multiple streaming</H2 ><P > 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 :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.12.42,sap=TestStream}, dst=standard{access=udp,mux=ts,url=192.168.1.2}}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Display the input stream, transcode it and send it to two unicast IP addresses :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#duplicate{dst=display, dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: duplicate{dst=standard{access=udp,mux=ts,url=192.168.1.2}, dst=standard{access=udp,mux=ts,url=192.168.1.12}"}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Send the input stream to a multicast IP address and the transcoded stream to another multicast IP address with the associated SAP announces :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#duplicate{dst= standard{access=udp,mux=ts,url=239.255.1.2,sap=OriginalStream}, dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: standard{access=udp,mux=ts,url=239.255.1.3,sap=TranscodedStream}"}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1136" ></A >9.2.4. HTTP streaming</H2 ><P > Stream in HTTP :</P ><P ></P ><UL ><LI ><P > on the server, run :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#standard{access=http,mux=ogg,url=server.example.org:8080}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></LI ><LI ><P > on the client(s), run :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc http://server.example.org:8080</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></LI ></UL ><P > Transcode and stream in HTTP :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: standard{access=http,mux=ogg,url=server.example.org:8080}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > For example, if you want to stream an audio CD in Ogg/Vorbis over HTTP :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv cdda:/dev/cdrom --sout '#transcode{acodec=vorb,ab=128}: standard{access=http,mux=ogg,url=server.example.org:8080}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="AEN1158" ></A >9.2.5. Use the <EM >es</EM > module</H2 ><P > Separate audio and video in two PS files :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#es{access=file,mux=ps,url_audio=audio-%c.%m,url_video=video-%c.%m}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Extract the audio track of the input stream to a TS file :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#es{access_audio=file,mux_audio=ts,url_audio=audio-%c.%m}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > Stream in unicast the audio track on a port and the video track on another port :</P ><P ></P ><UL ><LI ><P > on the server side :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#es{access=rtp,mux=ts,url_audio=192.168.1.2:1212,url_video=192.168.1.2:1213}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></LI ><LI ><P > on the client side: to receive the audio :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc udp:@:1212</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><P > to receive the video :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc udp:@:1213</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ></LI ></UL ><P > Stream in multicast the video and dump the audio in a file :</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > <TT CLASS="prompt" >% </TT ><TT CLASS="userinput" ><B >vlc -vvv input_stream --sout '#es{access_video=udp,mux_video=ts,url_video=239.255.12.42, access_audio=file,mux_audio=ps,url_audio=audio-%c.%m}'</B ></TT > </PRE ></FONT ></TD ></TR ></TABLE ><DIV CLASS="note" ><P ></P ><TABLE CLASS="note" WIDTH="100%" BORDER="0" ><TR ><TD WIDTH="25" ALIGN="CENTER" VALIGN="TOP" ><IMG SRC="../images/note.gif" HSPACE="5" ALT="Note"></TD ><TD ALIGN="LEFT" VALIGN="TOP" ><P > You can also combine the <EM >es</EM > module with the other modules to set-up even more complex solution .</P ></TD ></TR ></TABLE ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x1091.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="ipv6.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >The syntax</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="usesout.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Stream in IPv6</TD ></TR ></TABLE ></DIV ></BODY ></HTML >