HOWTO file for vls, the VideoLAN Server


Preamble
========

The VideoLAN Server is composed of "inputs" which provide some
"programs" to be streamed in the TS format through a "channel".

Global and channels configuration is in the "vls.cfg" file. Inputs'
configuration is in some separate files.

The configuration files are divided into sections like this:

BEGIN "<SectionName>"
  <SettingName> = "<SettingValue>"
END

You can add some comments after a '#' which must be outside of the
quotation marks if there are some. Quotation marks are mandatory for
the section's name and the setting's value.


How to configure the vls (vls.cfg) ?
====================================

Main settings
-------------

The first section is "Vls". You can specify an alternate log file
(default is "vls.cfg") with a "LogFile" setting like this:

  LogFile = "<vls-alternate.log>"


The two next sections are used for authentification and permissions.
The are called "Groups" and "Users".

In the first one you can specify which commands are available for
which group. The syntax is :

  <GroupName> = "<cmd1>|<cmd2>|..."

List of the commands :

  - help
  - browse
  - start
  - resume
  - suspend
  - stop
  - shutdown
  - logout

In the second section you can specify users' information. The syntax
is :

  <UserName> = "<EncryptedPassword>:<Group>"

Each user belongs to one and only one group.


Administration settings
-----------------------

The two next sections are "Telnet" and "NativeAdmin". For each of them
you can specify a local TCP port to use to accept connections. Telnet's
default port is 9999, NativeAdmin's is 9998. The syntax is :

  LocalPort = "<TcpPortToUse>"


How to configure Channels ?
===========================

Channels are declared in the vls.cfg section "Channels". The syntax
is :

  <ChannelName> = "<ChannelType>"

At the moment the only channel type available is "network".

Channel's settings are defined in a section whose name is the channel's
name.


Network channel
---------------

The settings for this kind of channel are :

  - "SrcHost"   : host used to bind the socket;
  - "SrcPort"   : TCP port used to bind the socket;
  - "DstHost"   : host used to connect the socket;
  - "DstPort"   : TCP port used to connect the socket;
  - "Interface" : interface to route the IP packets through.

Hosts could be DNS names or IP addresses.

The "Interface" setting is only supported under Linux. It's mainly
useful when you have multiple interfaces connected to the same network.
You must have super-user permissions to use this option. If not you
won't be able to use the channel.


How to configure Inputs ?
=========================


First: Input are declared in the vls.cfg section "Inputs". The syntax
is :

  <InputName> = "<InputType>"

At the moment the only input type available is "local".


Local input
-----------

This kind of input has been designed to read local Mpeg streams (files,
DVDs...) and to broadcast them in the Mpeg2 TS (Transport stream)
format.

To configure a local input you have to specify a path to a
configuration file named "input.cfg" like this :

BEGIN "<InputName>"
  ConfigPath = "<Path>"
END

The config file is "<Path>/input.cfg".

Its syntax is like vls.cfg. The first section is "Input" where you must
set up the "FilesPath" and "PgrmCount" settings. The first one is
the location of files, the second is the number of programs.

BEGIN "Input"
  FilesPath             = "<PathToFiles>"
  PgrmCount             = "<N>"
END

Then you must configure each program in a section whose name is the
program number (from "1" to "PgrmCount"). The syntax is :

BEGIN "<PgrmNumber>"
  Name                  = "Dolby_Game.vob"
  <AdditionnalSetting>  = "<Value>"
  Type                  = "Mpeg2-PS"
END

The "Name" setting is the name used to identify the program. The "Type"
setting could be :

  - Mpeg1PS (file) : supported;
  - Mpeg2PS (file) : supported;
  - Mpeg2TS (file) : supported;
  - Dvd (device)   : supported;

When the program is a file you must add a "FileName" setting. The file
used is "<FilesPath>/<FileName>".

When the program's type is "Dvd" you must add a "Device" setting
("/dev/dvd" for example). The "FilesPath" is _not_ prepended to the
device's name.

How to use the VideoLAN Server ?
================================

When you connect to the telnet port (9999 is the default) you have to
authentificate yourself (users are configured in vls.cfg). Once done
you can type commands. To have a list of available commands type
"help". "help <command>" gives you details. Be carefull: you may not
have the permission to run some of the commands.

Happy streaming.


