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
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.
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.
Usage: logout
"logout" closes the current administration session and the remote connection.
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.
Usage: stop <input> <program>
"stop" ends the broadcast of the specified program of the specified input.
Usage: suspend <input> <program>
"suspend" suspends the broadcast of the specified program of the specified input.
Usage: shutdown
"shutdown" stops all the programs and then the VideoLAN Server stops.
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.
Usage: resume <input> <program>
"resume" resumes the broadcast of the specified program of the specified input.
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
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
-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
To sum up, here are the different steps required to broadcast a stream with vls:
start dvd multicast local1
stop local1 dvd
logout