Next Previous Contents

5. Running vls

5.1 Launching vls

If you want to use the telnet interface, running vls is very easy: just type "vls" in a shell console, and that's all. Running vlsd will start VideoLAN Server as daemon and will detach itself from the launching shell. Remember that vls will try to load its configuration file (vls.cfg) from the current directory, and if there is no vls.cfg there, it will try to load it from SYSCONF_DIR/etc/videolan (see section Configuration).

Be careful: if your log file is "vls.log" as in the example, vls will need write access in the current directory , or you will see something like:

*** Exception *** in copy constructor (0xbffffc98, copy of 0x80e30a8)
Unable to open the log file "vls.log": Error: Could not open file 'vls.log': 
Permission denied
Remember also that you must be root when using the "Interface" option in vls.cfg.

If everything is right, you will see something like:

VideoLAN Server v 0.3.0 (Dec 22 2001) - (c)1999-2001 VideoLAN

2002-03-09 17:24:51 [INFO/Vls]  Module "channel:file" registered
2002-03-09 17:24:51 [INFO/Vls]  Module "channel:network" registered
2002-03-09 17:24:51 [INFO/Vls]  Module "mpegreader:file" registered
2002-03-09 17:24:51 [INFO/Vls]  Module "mpegconverter:ts2ts" registered
[...]
What you can see on the screen (stderr) is exactly what goes in the log file vls.log.

When vls has been successfully started, it doesn't take any command from its standard input, so you can put it into background (you can use the "screen" utility to do that).

On the other hand, if you want to use the command line interface, please see section 5.4: Using the command line interface

5.2 Using the telnet interface

After vls has been launched, it opens a telnet server (on the port 9999 by default). You can connect to this server with the following command:

telnet localhost 9999
You should see something like:
Trying 127.0.0.1...
Connected to vls.
Escape character is '^]'.

Videolan Server Administration System

Login:
Then you must authenticate with a login/password pair defined in vls.cfg. When you have been successfully authenticated, you should see a prompt like:

admin@vls> 
Then you can type some commands, which are explained in the next paragraph. To log out, type "logout" after the telnet prompt.

5.3 Interface commands

help

Usage: help [command].

Called with no argument, "help" gives the list of all the commands (available or not). Called with one argument it gives details about how to use the specified command.

logout

Usage: logout

"logout" closes the current administration session and the remote connection.

start

Usage: start <program> <channel> <input> [--loop]

"start" launches the specified program of the specified input and broadcasts it through the specified channel. The option "--loop" makes the program being repeated indefinitely. The option "--rtp" makes the TS packet to be send through the RTP protocol, as defined in RFC 1889 and RFC 2250.

stop

Usage: stop <input> <program>

"stop" ends the broadcast of the specified program of the specified input.

suspend

Usage: suspend <input> <program>

"suspend" suspends the broadcast of the specified program of the specified input.

shutdown

Usage: shutdown

"shutdown" stops all the programs and then the VideoLAN Server stops.

browse

Usage: browse [input]

Called with one argument, "browse" gives all programs of inputs. Called with one argument it only gives the programs of the specified input. Each program is given with its status.

resume

Usage: resume <input> <program>

"resume" resumes the broadcast of the specified program of the specified input.

5.4 Using the Command line interface

Using this interface, you can give arguments to the vls using the command line. Here is the syntax that you must use:

vls [options] target

with targets like:

dvd:/dev/dvd                - to read from the device
dvd:/mnt/videos/dvd1        - to stram a DVD stored on a hard drive
file:/mnt/videos/stream1.ts - for a local file
dvb:EuroSport[:X]           - for a satellite card
                                (X means the adapter X, [:X] is optional, the default value is 0)
When using the file method, vls detects wether it is a TS or PS stream and wether it is MPEG1 or MPEG2

options

 
-f (--file)        to specify the configuration file
-l (--loop)        with start streaming with loop option
-v (--verbose)     verbose level (-v, -vv, -vvv)
-d (--destination) specify IP and port to broadcast to
                   use the syntax:  protocol:argument1[:argument2]
                        rtp:ip_adress
                        udp:ip_adress[:port] (port to use)
                             [:port] is optional, default is 1234. 
                             Multicast IP addresses are automatically detected
                        file:path_to_file

-t (--ttl)         specify TTL
-h (--help)        display a short syntax help
--log              specify logfile

5.5 Broadcasting a stream

To sum up, here are the different steps required to broadcast a stream with vls:

  1. Check your configuration files (vls.cfg and if necessary input.cfg)
  2. Run vls in a console (as root if you use options such as "Interface"). If you haven't given any argument, do what comes next...
  3. Open a telnet connection to vls (usually on port 9999)
  4. Log in
  5. Start a program, for instance with : start dvd multicast local1
  6. To stop this program, type stop local1 dvd
  7. To quit the telnet interface, type logout


Next Previous Contents