old-www/HOWTO/VideoLAN-HOWTO/x646.html

427 lines
5.1 KiB
HTML

<HTML
><HEAD
><TITLE
>&#13;Stream a file with VLS
</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="
Stream a file
"
HREF="file.html"><LINK
REL="PREVIOUS"
TITLE="
Stream a file with VLC
"
HREF="x621.html"><LINK
REL="NEXT"
TITLE="
Stream a DVD
"
HREF="dvd.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="x621.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Stream a file</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="dvd.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN646"
></A
>4.2. Stream a file with VLS</H1
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;<TT
CLASS="prompt"
>% </TT
><TT
CLASS="userinput"
><B
>vls -vv -d udp:192.168.0.42 file:video1.xyz --ttl 12</B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
><P
>where
:</P
><P
></P
><UL
><LI
><P
><TT
CLASS="filename"
>video1.xyz</TT
>
is the file you want to stream
,</P
></LI
><LI
><P
><EM
>192.168.0.42</EM
>
is either
:</P
><P
></P
><UL
><LI
><P
>&#13;the IP address of the machine you want to unicast
to
;</P
></LI
><LI
><P
>&#13;or the DNS name the machine you want to unicast
to
;</P
></LI
><LI
><P
>&#13;or a multicast IP address
.</P
></LI
></UL
></LI
><LI
><P
><EM
>12</EM
>
is the value of the TTL (Time To
Live) of your IP packets (which means that the stream will be
able to cross 11 routers)
.</P
></LI
></UL
><P
>&#13;
When you want to stop VLS, use the key combination
<B
CLASS="keycap"
>Ctrl</B
>-<B
CLASS="keycap"
>c</B
>.</P
><P
>&#13;If you want to stream the file continuously, add the
<EM
>--loop</EM
> option
.</P
><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
>&#13;VLS can stream MPEG files that meet two critera
:</P
><P
></P
><UL
><LI
><P
>&#13;the file must be MPEG <EM
>PS</EM
>
(Program Stream) or MPEG <EM
>TS</EM
> (Transport Stream),
that contain video and audio multiplexed. VLS cannot stream MPEG
<EM
>ES</EM
> (Elementary Stream), i.e. a file with only audio
or video
.</P
><P
>&#13;In order to know if an MPEG file is MPEG
<EM
>PS</EM
>, MPEG <EM
>TS</EM
> or MPEG
<EM
>ES</EM
>, read the file with VLC and look at the messages
(select in the menu <EM
>View / Messages</EM
>, or use the
command line <B
CLASS="command"
>vlc -vvv</B
>)
.</P
><P
></P
><UL
><LI
><P
>&#13;If you see a line
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;[00000107] main module debug: using demux module "ts_dvbpsi"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;it means the file is MPEG TS
.</P
></LI
><LI
><P
>&#13;If you see a line
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;[00000109] main module debug: using demux module "ps"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;it means the file is MPEG PS
.</P
></LI
><LI
><P
>&#13;If you see a line
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;[00000109] main module debug: using demux module "es"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;it means the file is MPEG ES, VLS can't stream it.
.</P
></LI
></UL
></LI
><LI
><P
>&#13;the sequence header of the video must repeat itself
regularly, which is often the case with MPEG-2, but very rare with
MPEG-1. There is no easy way to know if the sequence header is repeated
regularly. Files with a <EM
>.vob</EM
> extension are
normally MPEG-2 files and files with <EM
>.mpg</EM
> or
<EM
>.mpeg</EM
> extension or usually MPEG-1 files
.</P
></LI
></UL
><P
>&#13; You can download this
streamable MPEG-2 PS file for your tests : <A
HREF="ftp://ftp.videolan.org/pub/videolan/streams/presentation/presentation_short.vob"
TARGET="_top"
>presentation_short.vob</A
>
.</P
></TD
></TR
></TABLE
></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="x621.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="dvd.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Stream a file with VLC</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="file.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Stream a DVD</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>