<?xml version="1.0" encoding="UTF-8"?>
<chapter id="receive"><title id="treceive">
Receive and save a stream
</title>

<sect1><title>
Receive a stream with VLC
</title>

<sect2><title>
Receive an unicast stream
</title>

<screen>
<prompt>% </prompt><userinput>vlc -vvv rtp://@:5004</userinput>
</screen>

</sect2>

<sect2><title>
Receive a multicast stream

</title>

<screen>
<prompt>% </prompt><userinput>vlc -vvv rtp://@239.255.12.42:5004</userinput>
</screen>

<para>
 where <emphasis>239.255.12.42</emphasis> is the
multicast IP address you want to join,
and <emphasis>5004</emphasis> UDP port number.
</para>

</sect2>

<sect2><title>
Receive an HTTP/FTP/MMS stream

</title>

<para>
Use one of the following command lines:</para>

<itemizedlist>

<listitem>

<screen>
<prompt>% </prompt><userinput>vlc -vvv http://example/stream.xyz</userinput>
</screen>

<para>
where <emphasis>http://example/stream.xyz</emphasis>
is the HTTP address of the stream;</para>

</listitem>

<listitem>

<screen>
<prompt>% </prompt><userinput>vlc -vvv ftp://example/stream.xyz</userinput>
</screen>

<para>
where <emphasis>ftp://example/stream.xyz</emphasis>
is the FTP address of the stream;</para>
</listitem>

<listitem>

<screen>
<prompt>% </prompt><userinput>vlc -vvv mms://viptvr.yacast.fr/encoderfranceinfo</userinput>
</screen>

<para>
where
<emphasis>mms://viptvr.yacast.fr/encoderfranceinfo</emphasis> is the MMS
address of the stream.

</para>

</listitem>
</itemizedlist>

</sect2>

<sect2><title>
Receive a RTP stream available through RTSP

</title>

<screen>
<prompt>% </prompt><userinput>vlc -vvv rtsp://www.hardradio.com/tonbeme.mov</userinput>
</screen>

<para>
 where <emphasis>rtsp://www.hardradio.com/tonbeme.mov</emphasis> is the address of the stream.

</para>

</sect2>

<sect2><title>
Receive a stream described by an SDP file

</title>

<screen>
<prompt>% </prompt><userinput>vlc -vvv http://server.example.org/stream.sdp</userinput>
</screen>

</sect2>
</sect1>

<sect1><title>
Save a stream with VLC

</title>

<para>
VLC can save the stream to the disk. In order
to do this, use the Stream Output of VLC : you can do it via the
graphical interface, or you can add to the command line the following
argument:</para>

<screen>
<userinput>--sout file/muxer:stream.xyz</userinput>
</screen>

<para>
where:

</para>

<itemizedlist>

<listitem><para><emphasis>muxer</emphasis> 
is one of the formats supported by VLC's stream
output, i.e. :

</para>

<itemizedlist>

<listitem><para><emphasis>ogg</emphasis>
  for OGG format,</para></listitem>

<listitem><para><emphasis>ps</emphasis> 
  for MPEG2-PS format,</para></listitem>

<listitem><para><emphasis>ts</emphasis>
  for MPEG2-PS format.</para></listitem>

</itemizedlist>

</listitem>

<listitem><para>
and <filename>stream.xyz</filename> is the name of
the file you want to save the stream to, with the right extension.

</para></listitem>

</itemizedlist>

</sect1>

<sect1><title>
Receive a stream with a set-top-box

</title>

<para>
Some set-top-boxes with Ethernet cards can receive
MPEG2-TS streams over UDP and support multicast.
</para>

<para>
Set-top-boxes known to work with VLC are :
</para>

<itemizedlist>
<listitem><para><ulink url="http://www.pace.co.uk">Pace</ulink> set top boxes. (Pace Micro DSL 4000)</para></listitem>
<listitem><para><ulink url="http://www.aminocom.com">Aminocom</ulink> set top boxes. (all the models with mpeg2)</para></listitem>
<listitem><para>tuxia / gct-allwell (mpeg4 and mpeg2) sigma designs8174 chipset</para></listitem>
<listitem><para>i3micro mood200 (mpeg4 and mpeg2 in transport streams)</para></listitem>
</itemizedlist>

</sect1>
</chapter>

