old-www/REF/VLS-User-Guide/x463.html

1562 lines
23 KiB
HTML

<HTML
><HEAD
><TITLE
>&#13;Writing a vls.cfg
</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="
VLS user guide
"
HREF="index.html"><LINK
REL="UP"
TITLE="Configuration"
HREF="config.html"><LINK
REL="PREVIOUS"
TITLE="
General structure
"
HREF="x456.html"><LINK
REL="NEXT"
TITLE="
Running VLS
"
HREF="run.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"
>VLS user guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x456.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Configuration</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="run.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="AEN463"
></A
>4.2. Writing a <TT
CLASS="filename"
>vls.cfg</TT
></H1
><P
>&#13;Here is an explanation of all the sections you can
find in a <TT
CLASS="filename"
>vls.cfg</TT
>
:</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN468"
></A
>4.2.1. Section "Vls"</H2
><P
>&#13;This section contains application wide settings
.</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;LogFile = "name"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Name of VLS log file. If left empty "", then no
logging to files is done. Default is "vls.log"
.</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;SystemLog = "[disable|enable]"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Logging to the SystemLog. Today, only the SystemLog
using syslogd is implemented: compile with <B
CLASS="command"
>./configure
--enable-syslog</B
>
.</P
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; If VLS is started as <B
CLASS="command"
>vlsd</B
>, then
the following configuration is mandatory
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Vls"
LogFile = ""
SystemLog = "enabled"
ScreenLog = "disabled"
END
</PRE
></FONT
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></DIV
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;ScreenLog = "[disable|enable]"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Logging to the console
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Vls"
LogFile = "vls.log"
SystemLog = "disable"
ScreenLog = "enable"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN484"
></A
>4.2.2. Section "Groups"</H2
><P
>&#13;In this section, you can define some groups of
users, and which commands these users are allowed to execute. For
each group you want to define, you must add a line in the following
format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;groupname = "command1|command2|..."
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;This adds a group "groupname", the users of which
are allowed to execute command1, command2, and so on. At the moment, the
available commands are: help, browse, start, suspend, resume, forward,
rewind, stop, shutdown, logout
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Groups"
monitor = "help|browse|logout"
master = "help|browse|start|resume|suspend|forward|rewind|stop|shutdown|logout"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN491"
></A
>4.2.3. Section "Users"</H2
><P
>&#13;This section contains a list of users allowed to
control VLS through an administration interface. For each user, add a
line in the following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;username = "password:groupname"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;This adds a user "username", who belongs to the
group "groupname" (defined in the "Groups" section) and can log in with
the password "password"
.</P
><P
></P
><UL
><LI
><P
>&#13;Under Unix/Linux, the password must be encrypted,
with a tool such as <B
CLASS="command"
>mkpasswd</B
>, or with the UNIX
function "crypt"
.</P
></LI
><LI
><P
>&#13;Under Windows, the password must be in clear text
.</P
></LI
></UL
><P
>&#13;Example for Unix/Linux
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Users"
monitor = "3BcKWoiQn0vi6:monitor" # password is 'monitor'
admin = "42BKiCguFAL/c:master" # password is 'Vir4Gv5S'
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN504"
></A
>4.2.4. Section "Telnet"</H2
><P
>&#13;In this section, you can configure the telnet
administration interface
.</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;LocalPort = "port"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Defines which port will be used for the telnet
server. Default port is "9999"
.</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;Domain = "domain"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Either "inet4" or "inet6" (default is "inet4"). If
you want to use IPv4 addresses, put "inet4", and if you want to use
IPv6, put "inet6"
.</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;LocalAddress = "IP address"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;Defines on which IP address the telnet server will
listen for requests. Default address is "0.0.0.0" (or "0::0" with
IPv6)
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Telnet"
LocalPort = "9999"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN515"
></A
>4.2.5. Section "NativeAdmin"</H2
><P
>&#13;Same syntax as "Telnet". Not used yet
.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN518"
></A
>4.2.6. Section "Inputs"</H2
><P
>&#13;In this section, you can define which inputs you
want to use. For each input you need, add a line in the following
format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;InputName = "Type"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;This adds a input named "InputName", the type
of which is "Type". As explained before, there are several types of
input
:</P
><P
></P
><UL
><LI
><P
>&#13;
"local" to play a stream from a file or a DVD
,</P
></LI
><LI
><P
>&#13;"video" to play a stream from an MPEG encoding
card
,</P
></LI
><LI
><P
>&#13;"dvb" to play a stream from a DVB card
,</P
></LI
><LI
><P
>&#13;"v4l" to play a stream from a Video4Linux device
.</P
></LI
></UL
><P
>&#13;Each input must be configured in its own section
(see next paragraph)
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Inputs"
local1 = "local"
pvr = "video"
dvb1 = "dvb"
tuner = "v4l"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN535"
></A
>4.2.7. Inputs configuration</H2
><P
>&#13;For each input declared in the "Inputs" section,
excepted "local" inputs, you must add a section with the same name as
the corresponding input. For instance, if you declared an input "pvr",
there should be one section named "pvr" too. The syntax of such sections
depends on the type of the corresponding input
.</P
><P
>&#13;To configure a local input, you don't have to do
anything. Except when another trickplay strategy must be used
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Local1"
ProgramCount = "1"
TrickPlay = "normal"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;"Local1" is the name of the local input you want to
configure. "ProgramCount" is the number of programs assigned to this
input. "TrickPlay" is the trickplay strategy that is used by this input
(default is "normal")
.</P
><P
>&#13;To configure a video input, add a section in the
following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "VideoInputName"
Device = "device"
Type = "type"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;"VideoInputName" is the name of the video input you
want to configure. "Device" is the path of the MPEG encoding card you
want to read from (default is "/dev/video"). "Type" is either "Mpeg2-PS"
or "Mpeg2-TS", depending on your device configuration (default is
"Mpeg2-PS")
.</P
><P
>&#13;Example for a Hauppauge WinTV-PVR-250 card
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "pvr"
Device = "/dev/video0"
Type = "Mpeg2-PS"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;To configure a dvb input, add a section in the
following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "DvbInputName"
DeviceNumber = "devicenumber"
SendMethod = "0"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;"DvbInputName" is the name of the dvb input you
want to configure. Set "SendMethod" to "0" if you to stream the
complete DVB stream and set it to "1" if you only want to stream
the MPEG audio and video streams (default is "0"). "DeviceNumber"
is the number of the DVB device you want to read from (read
from <TT
CLASS="filename"
>/dev/ost/dvr&#60;devicenumber&#62;</TT
>,
default is ""). The dvb configuration file is defined by the
driver. You can find it in <TT
CLASS="filename"
>$HOME/.dvbrc</TT
> for
/dev/dvb/adapter0 or in <TT
CLASS="filename"
>$HOME/.dvbrc.X</TT
> for
<TT
CLASS="filename"
>/dev/dvb/adapterX</TT
>
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "dvb1"
DeviceNumber = "0"
TrickPlay = "normal"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN555"
></A
>4.2.8. Section "Channels"</H2
><P
>&#13;In this section, you can define the channels
(outputs) you want to use. For each channel, write a line in the
following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;ChannelName = "Type"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;This adds a channel named "ChannelName", the type of
which is "Type". "Type" must be either "network" or "file". Like inputs,
channels must be configured in their own section
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Channels"
localhost = "network"
client1 = "network"
client2 = "network"
multicast1 = "network"
multicast2 = "network"
localfile = "file"
END
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN562"
></A
>4.2.9. Channels configuration</H2
><P
>&#13;For each channel declared in the "Channels" section,
you must add a section with the same name as the corresponding channel.
The syntax of such a section depends on the type of the corresponding
channel
.</P
><P
>&#13;To configure a network channel, add a section in the
following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "NetChannelName"
Domain = "Domain"
Type = "Type"
SrcHost = "SourceHost"
SrcPort = "SourcePort"
DstHost = "DestHost"
DstPort = "DestPort"
TTL = "ttl"
Interface = "Interface"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>&#13;"NetChannelName" is the name of the network channel
you want to configure
.</P
></LI
><LI
><P
>&#13;"Domain" is either "inet4" if you use IPv4
addresses, or "inet6" if you use IPv6 (default is "inet4")
.</P
></LI
><LI
><P
>&#13;"Type" is either "unicast", "broadcast" or
"multicast" (default is "unicast"), depending on what you want to do
(and on your "DstHost" address)
.</P
></LI
><LI
><P
>&#13;"SourceHost" is the IP address (or DNS name) from
which VLS will send the stream
.</P
></LI
><LI
><P
>&#13;"SourcePort" is the UDP port from which the stream
will be sent
.</P
></LI
><LI
><P
>&#13;"DestHost" is the IP address (or DNS name) to which
the stream will be sent
.</P
></LI
><LI
><P
>&#13;"DestPort" is the UDP port to which the stream will
be sent (default is "1234")
.</P
></LI
><LI
><P
>&#13;"TTL" is an option useful only if "Type" is
"multicast" (default value is "0"). You can use it to increase the TTL
of your multicast packets if they have to cross several routers
.</P
></LI
><LI
><P
>&#13;"Interface" is an option only supported under
GNU/Linux, to force the stream to be sent through a given network
interface, "eth1" for instance" (to use this option, you must have
super-user permissions)
.</P
></LI
></UL
><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;"SrcHost" and "SrcPort" are optional (if you don't
set them, VLS will not 'bind' the socket)
.</P
></TD
></TR
></TABLE
></DIV
><P
>&#13;To configure a file channel, add a section in the
following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "FileChannelName"
FileName = "file"
Append = "append"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;"FileChannelName" is the name of the file channel
you want to configure. "file" is the name of the file where the stream
will be stored (default is "fileout.ts"). "append" is either "yes" or
"no", and indicates whether VLS will append the stream at the end of the
file, or rewrite it
.</P
><P
>&#13;Example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "localhost" # The client is on the same host as the server
DstHost = "localhost"
DstPort = "1234"
END
BEGIN "client1" # unicast towards client1
DstHost = "192.168.1.2"
DstPort = "1234"
END
BEGIN "client2" # unicast towards client2 in IPv6
Domain = "inet6"
DstHost = "3ffe:ffff::2:12:42"
DstPort = "1234"
END
BEGIN "multicast1" # multicast streaming
Type = "multicast"
DstHost = "239.2.12.42"
DstPort = "1234"
TTL = "2"
END
BEGIN "multicast2" # multicast streaming in IPv6
Domain = "inet6"
Type = "multicast"
DstHost = "ff08::1"
DstPort = "1234"
TTL = "12"
END
BEGIN "localfile" # file output
FileName = "stream.ts"
Append = "no"
END
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13;If you use Windows, you should specify the "SrcHost"
and "SrcPort" fields. For example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "client1" # The client is on the same host as the server
SrcHost = "192.168.1.1" # IP of VLS
SrcPort = "1242" # Source port : the value is not important
DstHost = "192.168.1.2" # IP of the client
DstPort = "1234"
END
</PRE
></FONT
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN596"
></A
>4.2.10. Programs Configuration</H2
><P
>&#13;As explained before, you must define the programs.
Each one is a MPEG stream (a file, for example). To do this, you must
add an "Input" section in your <TT
CLASS="filename"
>vls.cfg</TT
> file. Each
"Input" section must have the following syntax
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Input"
FilesPath = "path"
ProgramCount = "count"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13;"path" is the path where your MPEG files are located
(by default it is the current directory). "count" is the number of
programs defined ("0" by default)
.</P
><P
>&#13;For each program you want to define, you must add a
section with the following format
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "number"
Name = "name"
Type = "type"
FileName = "file"
Device = "device"
END
</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
><UL
><LI
><P
>&#13;"number" is the program number: the first program
has number 1, the second number 2, and so on
.</P
></LI
><LI
><P
>&#13;"name" is the program name, by which you will tell
VLS to start this program (see next chapter "Running VLS")
.</P
></LI
><LI
><P
>&#13;"type" can be "Mpeg1-PS", "Mpeg2-PS", "Mpeg2-TS",
or "DVD". If your stream is stored in a MPEG file (*.mpeg, *.mpg,
*.vob, and so on...), it is probably in Mpeg1-PS or Mpeg2-PS
format
.</P
></LI
><LI
><P
>&#13;if "type" is set to "Mpeg1-PS", "Mpeg2-PS", or
"Mpeg2-TS", VLS will assume your stream is stored in the file "file", in
the directory "path" ("path" being the variable defined in the "Input"
section)
.</P
></LI
><LI
><P
>&#13;if "type" is "DVD", the variable "Device" will be
used instead of "FileName" (the variable "FilesPath" is not prepended
to the device name !). The variable "Device" is the device of your DVD
drive ("/dev/hdc" or "/dev/cdrom" for instance). You can also play a DVD
copied on a hard disk: then "device" is the directory where the .vob
files are stored ("/mnt/data/VIDEO_TS" for instance)
.</P
></LI
></UL
><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
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;In order to play DVDs, you need to compile VLS with
DVD support, which uses libdvdread and libdvdcss. You will need
read <EM
>and</EM
> write access rights to the DVD
device
.</P
></TD
></TR
></TABLE
></DIV
><P
>&#13;Full example
:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;BEGIN "Input"
FilesPath = "/home/videolan/streams"
ProgramCount = "4"
END
BEGIN "1" # MPEG2 stream stored in /home/videolan/streams/Dolby.vob
Name = "dolby"
FileName = "Dolby.vob"
Type = "Mpeg2-PS"
END
BEGIN "2" # another file
Name = "canyon"
FileName = "Dolby_Canyon.vob"
Type = "Mpeg2-PS"
END
BEGIN "3" # DVD
Name = "dvd"
Device = "/dev/cdrom"
Type = "Dvd"
END
BEGIN "4" # DVD stored on a hard disk
Name = "matrix"
Device = "/mnt/data/matrix/VIDEO_TS"
Type = "Dvd"
END
</PRE
></FONT
></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="x456.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="run.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>General structure</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="config.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Running VLS</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>