Commit cc5d4a06 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Removed some deprecated docs. small fix to vlc man page.

parent 5afce06b
......@@ -7,8 +7,6 @@ doc_DATA = \
fortunes.txt \
intf-cdda.txt \
intf-vcd.txt \
web-streaming.html \
vlc-howto.sgml \
$(NULL)
EXTRA_DIST = \
......@@ -24,8 +22,6 @@ EXTRA_DIST = \
intf-cdda.txt \
intf-vcd.txt \
release-howto.txt \
web-streaming.html \
vlc-howto.sgml \
arm-crosscompile-howto.sgml \
Configure.help \
lirc/example.lircrc \
......
HTTP interface
--------------
I. Presentation
###############
1. VLC has a little HTTP server
-------------------------------
You can launch the HTTP interface with :
vlc -I http --http-src /directory/ --http-host host:port
The HTTP interface will listen at host:port and will reproduce the
structure of /directory at http://host:ip/
While exporting /director, some files are a bit special :
* files beginning with '.' : they won't be exported.
* file '.access' : It will be opened and http interface expect to find
at the first line a login/password (written as login:password). This
login/password will be used to protect all files in this directory.
Be careful that only files in this directory will be protected,
particularly sub-directory won't be protected.
* file <dir>/index.html will be exported as <dir> and <dir>/ and not as
index.html.
Examples:
Sources URL
directory/index.html -> http://host:port/
directory/help.html -> http://host:port/help.html
directory/help.gif -> http://host:port/help.gif
directory/.access -> "Not exported"
directory/dir2/essai.html -> http://host:port/dir2/essai.html
The mime type is set looking at file extension and it cannot be
specified/modified for specific file. Unknown extensions will have
"application/octet-stream" as the mime type.
You should avoid exported big files. Actually, each file is first
loaded in memory before being sent to a client, so be careful ...
2. VLC macro in .html/.htm pages
--------------------------------
a. Presentation
---------------
Each type, a .html/.htm page is requested, it is parsed by the vlc
before sent. This parser search for special vlc macro, and then execute
them or substitute them.
Moreover, when receiving URL arguments (by a GET method), they could be
interpreted.
b. Syntax
---------
A vlc macro have to respect :
<vlc id="macro-name" param1="macro-parameters1" param2="macro-parameters2" />
"id" is the only mandatory field, param1 and param2 may or may not be
present and depends on the value of "id".
You should take care that you _have to_ respect this syntax, VLC won't
like invalid syntax. (It could easily leads to segfaults)
For examples :
Correct:
<vlc id="value" param1="version" /> is correct
Invalid:
<vlc id="value" param1="version" > <- invalid tag ending
<vlc id=value param1="version" /> <- missing "" around value
c. Valid macro list
-------------------
For now the following macro are valid :
Macro | Parameter 1 | Parameter 2
----------------------------------------------
control | Optional |
get | Yes | Yes
set | Yes | Yes
rpn | Yes |
if | Optional |
else | |
end | |
value | Optional |
foreach | Yes | Yes
3. RPN, Stacks and locale variables
------------------------------
To provide powerful macro, you have access to
a. RPN evaluator
----------------
See II.
b. Stacks
---------
The stacks is a place where you can push numbers and strings, and then
pop them backs. It's used with the little RPN evaluator.
c. Locales variables
--------------------
You can dynamically create new variables and changes their values.
Some locales variables are predefined
- url_value : parameter of the url
- url_param : 1 if url_value isn't empty else 0
- version : the VLC version
- copyright : the VLC copyright
- stream_position : current position of the VLC in the stream (percentage)
- stream_time : current position of the VLC in the stream (in seconds)
- stream_length : total length of the current stream (in seconds)
- volume : current volume level
- stream_state : current state of the VLC (playing, paused, stop)
Variables could have fields, just use . to access them.
Ex: var.field, var.field.subfield, ...
A field could in fact be a set, so use [] to access a particular element.
Ex: var.field[2], var.field[3].subfield[12]
Remarks: you cannot create (yet) such variables with fields.
4. Remarks:
-----------
The stacks, and locales variables context is reseted before a page is
executed.
II. RPN evaluator
#################
RPN means Reverse Polish Notation.
1.introduction
--------------
RPN could be strange but it's a fast and easy way to write expressions.
It also avoid the use of ( and ).
Instead of writing ( 1 + 2 ) * 5 you just use 1 2 + 5 *
The idea beyond it is :
- if it is a number or a string (using '') push it on the stack
- if it is an operator (like +), pop the arguments from the stack,
execute the operators and then push the result onto the stack.
The result of the RPN sequence is the value at the top of the stack.
Ex: instead of writing (1+2)*5 you enter 1 2 + 5 *
stack: Word processed
<empty> 1 1 is pushed on the stack
1 2 2 same things
1 | 2 + + : remove 1 and 2 and write 3 on the stack
3 5 5 is pushed on the stack
3 | 5 * * : remove 3 and 5 and write 15
15 <- result
2. Operators.
-------------
Notation : ST(1) means the first stack element, ST(2) the second one ...
and op the operator.
You have access to :
* standard arithmetics operators:
+, -, *, /, % : push the result of ST(1) op ST(2)
* standard binary operators:
! : push !ST(1)
^, &, | : push the result of ST(1) op ST(2)
* test:
=, <, <=, >, >= : do ST(1) op ST(2) and push -1 if true else 0
* string:
strcat : push the result of 'ST(1)ST(2)'
strcmp : compare ST(1) and ST(2), push -1, 0, or 1
strncmp : compare the ST(3) first characters of ST(1) and ST(2),
push -1, 0, or 1
strlen : push the length of ST(1)
strsub : extract substring of ST(1) from character number ST(2)
to character number ST(3)
* stack manipulation
dup : duplicate ST(1) on the stack
drop : remove ST(1)
swap : swap ST(1) and ST(2)
flush : empty the stack
* variables manipulation:
store : store ST(2) in a locale variable named ST(1)
value : push the value of the local variable named ST(1)
url_extract : push the value of the ST(1) part of the url parameters.
III. Macros
###########
1. Macro "control"
------------------
When asking for a page, you can pass arguments to it through the url.
(eg using a <form>)
Ex: http://host:port/page.html?var=value&var2=value2&...
The "control" macro warm a page to parse such arguments and give control
on which one will be authorized.
param1 of this macro say which command are allowed, if empty then all
commands will work.
Url commands are :
| Name | arguments |
-------------------------------------------------------------------------------
| play | item(integer)| Play the specified item
| stop | | Stop
| pause | | Pause
| next | | Go to the next playlist element
| previous | | Got to the previous playlist element
| fullscreen | | toggle fullscreen
| volume | value(string)| set volume level (absolute or relative)
| seek | seek_value | c.f. notes
| add | mrl(string) | Add a mrl to the playlist (with its options)
| delete | item(integer)| Deletes an (list of) element of the playlist
| keep | item(integer)| Deletes all but (list of) element of the playlist
| sort | type,order | c.f. notes
| empty | | Empty the playlist
| close | id(hexa) | Close a specific connection
| shutdown | | Quit vlc
For example, you can restrict the execution of the shutdown command to
protected pages (through a .access) using the control macro in all pages
unprotected.
Notes:
Seek: The seek command is used to seek in current playing stream. the
seek_value argument is a string which represents a relative or absolute
position in the stream: a percentage, or a time.
For examples "+12min 42sec", "01:13:43", "-12%", "42%", or
"1 hour 12 minutes" are valid argument values.
Sort: sorts the playlist by type (string), and with the order (integer).
If order is "0", it is normal order. Otherwise it is reverse order. The
type can be "title", "group", "author".
2. Macro "get"
--------------
This macro will be replaced by the value of the configuration variable
which name is stored in param1 and the type is given by param2.
- param1 should be a existing name of a configuration variable
- param2 should be the correct type of this variable. You have
- int
- float
- string
Example:
<vlc id="get" param1="sout" param2="string" />
will be replaced in the output page by the value of sout.
3. Macro "set"
--------------
This macro allow to set the value of a configuration variable.
The name is given by param1 and the type by param2 (like for get).
The value is retrieve from the url using the name in param1.
So if player.html contain <vlc id="set" param1="sout" param2="string" />
and then you can call http://host:ip/player.html?sout=sout_value to
set sout to the value "sout_value"
If the url doesn't contain sout, then nothing is done.
4. Macro "rpn"
-------------
This macro allows you to interpret RPN commands.
See II.
5. Macro "if" "else" "end"
--------------------------
It allows to control the parsing of the html page.
-> if param1 isn't empty, it is first executed with the RPN evaluator.
-> if the first element from the stack isn't 0 the test value is true
else false.
ex:
<vlc id="if" param1="1 2 =" />
<!-- Never reached -->
<vlc id="else" />
<p> Test succeed 1 isn't equal to 2 <p>
<vlc id="end" />
You can also just use "if" and "end".
6. Macro "value"
----------------
->if param1 isn't empty, it is first executed with the RPN evaluator.
->the macro is replaced with the value of the first element of the stack.
Remarks: if it's in fact a locale variable name, the value of this
variable will be displayed (instead of it name).
7. Macro "foreach" "end"
------------------------
param1 : name of the variable used for the loop
param2 : name of the set to be build:
- "integer" : take the first element from the stack to construct
a set of integer. The stack element should be a string like:
first:last[:step][,first2:last2[:step2][,...]
Ex: 1:5:2,6:8:1 will be expanded into 1,3,5,6,7,8
- "directory" : take the first element of the stack as the base
directory and construct a set of filename and directly in it.
Each element has the following fields:
- name : file/directory name
- type : "directory" or "file" or "unknown"
- size : size of the file
- date
- "playlist" :
Fields:
- current : 1 if currently selected else 0
- index : the index value (to be used for example for the
"delete" control command.
- name : the name of the item (it is equal to uri most of the time).
- uri : the URI of the item
- group : the group number
- "informations" : Create informations for the current playing
stream.
Fields:
- name : Category name
- value : Category value
- info : a new set so you can parse it with another foreach.
Sub fields :
- name : Info name
- value Info value
- "hosts" : Create the list of host we are listening.
Fields:
- id : opaque id
- host:
- ip :
- port:
- "urls" : Create the list of urls currently available
Fields:
- id :
- stream: 1 if it's a stream else 0.
- url :
- mime :
- protected: 1 if protected else 0.
- used :
- "connections" : Create the list of current connections.
Fields:
- id : opaque id, used by "control" macro (with close command)
- ip :
- url:
- status: HTTP error code.
- the name of a foreach variable if it's a set of set of value.
Ex :
<vlc id="foreach" param1="cat" param2="informations" />
<p> <vlc id="value" param1="cat.name" />
<ul>
<vlc id="foreach" param1="info" param2="cat.info" />
<li>
<vlc id="value" param1="info.name" /> :
<vlc id="value" param1="info.value" />
</li>
<vlc id="end" />
</ul>
<vlc id="end" />
IV. Conclusion
##############
Have a look at share/http directory of the VLC sources...
Any remarks, suggestions, ... -> fenrir@via.ecp.fr
<!doctype linuxdoc system>
<linuxdoc><article>
<titlepag>
<title>VLC HOWTO</title>
<author>Originally written by Henri Fallon, maintained by Johan Bilien<tt><htmlurl url="mailto:jobi@videolan.org" name="<jobi@videolan.org>"></tt></author>
<date>v0.0.9, 16 april 2002</date>
<abstract>
This document describes how to use the vlc (VideoLAN client) to read DVDs and mpeg files, locally or from a network.
</abstract>
</titlepag>
<toc>
<sect>
<heading>Introduction</heading>
<sect1>
<heading>What is VideoLAN ?</heading>
<p>
VideoLAN is a project of sudents of the École Centrale Paris which aims
at broadcasting video on the campus, and providing the students with an MPEG-2
software-only decoder. VideoLAN is an OpenSource project which will thus
allow anyone to watch DVD movies under Linux, BeOS, MacOS X, Windows
and most UNIX systems. Recent additions allow to read .avi files,
and MPEG-4/DivX-encoded movies.
</p>
<p>
You may want to look at the port section on our website :
<htmlurl url="http://www.videolan.org/" name="http://www.videolan.org/">.
</p>
</sect1>
<sect1>
<heading>What is the VideoLAN project ?</heading>
<p>
VideoLAN is a complete software solution for video streaming, developed
by students at the <htmlurl url="http://www.ecp.fr/" name="Ecole Centrale
Paris"> and contributors from all over the world, under the <htmlurl
url="http://www.gnu.org/copyleft/gpl.html" name="General Public License
(GPL)">. It has been designed for streaming MPEG 1 and MPEG 2 videos on
local area networks (LAN), but it can be extended to metropolitan or
wide area networks (MAN, WAN), thanks to the multicast technology.
The VideoLAN solution includes a server, which can stream video from
various sources (file, DVD, satellite and MPEG 2 encoder), a client, which can
receive, decode and display MPEG 1 and MPEG 2 streams and, if necessary,
a channel server which tells automatically to the client the parameters
needed to receive the stream.
Here is an illustration of the complete VideoLAN solution :
<verb>
DVD --->- Unicast/Broadcast/Multicast
\ ---
File --->-- -------- / \ --------
|->-| Server |=====>====| LAN |---->-----| Client |
Satellite ->-- | (VLS) | \ / | (VLC) |
/ -------- --- --------
MPEG2 -->- ^
encoder |
v
----------------
| Channel Server |
| (VLCS) |
----------------
</verb>
More details about the project can be found on the
<htmlurl url="http://www.videolan.org/" name="VideoLAN Web site">.
</p>
</sect1>
<sect1>
<heading>The documentation of the project</heading>
<p>
There are four main documents :
<itemize>
<item>the <htmlurl
url="http://www.videolan.org/doc/videolan-quickstart/videolan-quickstart.html"
name="VideoLAN Quickstart">,
<item>the <htmlurl url="http://www.videolan.org/network/doc/videolan-howto.html"
name="VideoLAN HOWTO">,
<item>the <htmlurl url="http://www.videolan.org/vls/doc/vls-guide.html"
name="VideoLAN Server user guide">,
<item>this VLC Howto.
</itemize>
The up-to-date version of these documents can be found on the <htmlurl
url="http://www.videolan.org/doc/" name="VideoLAN Web Site">.
<sect1>
<heading>Translated versions of this document</heading>
<p>
No translation is currently available.
</p>
<p>
The English version is maintained by Henri Fallon,
Johan Bilien, and the VideoLAN team. It can be found at:
<htmlurl url="http://www.videolan.org/doc/index.html"
name="http://www.videolan.org/doc/index.html">.
</p>
</sect1>
<sect1>
<heading>Requirements</heading>
<sect2>
<heading>Operating system</heading>
<p>
VLC works under the following systems :
</p>
<p>
<itemize>
<item> Linux (all distributions, including iPAQ Familiar Linux)
<item> Windows (all 32bit versions)
<item> Mac OS X
<item> FreeBSD, NetBSD, OpenBSD, BSD/OS
<item> BeOS
<item> QNX RTOS
<item> Solaris
</itemize>
</p>
<p>
Please note that the Linux, Windows and MacOS X versions are generally the most
up-to-date ones.
</p>
</sect2>
<sect2>
<heading>Software requirements</heading>
<p>
Depending on the outputs and inputs you are using, you may need
additional libraries. Please see <ref id="modules" name="description">.
</p>
<p>
For playing encrypted DVDs, you will need libdvdcss, which you can find
on this page :
<htmlurl name="http://www.videolan.org/libdvdcss/download.html"
url="http://www.videolan.org/libdvdcss/download.html">.
</p>
</sect2>
<sect2>
<heading>Hardware requirements</heading>
<p>
The hardware power needed depends a lot of the type of stream.
For reading a DVD, a CPU working at around 450 MHz is required.
</p>
<p>
VLC can benefits from hardware acceleration from modern video cards
for YUV transformation and window rescaling. it also uses MMX, MMX EXT,
SSE, 3Dnow! optimizations if available.
</p>
</sect2>
</sect1>
<sect1>
<heading>Disclaimer</heading>
<p>
This documentation is given "as is", and any comment and improvement
are welcome.
</p>
<p>
In this HOWTO, we consider you already have a little knowledge
about Linux, and you know how to use a DVD. If not, good howtos
can be found on the <htmlurl url="http://www.tldp.org/" name="Linux
Documentation Projet">.
</p>
</sect1>
<sect1>
<heading>Legal</heading>
<p>
Copyright (©) 2002 by the VideoLAN project.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version
1.1 or any later version published by the Free Software Foundation ;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. The text of the license can be found on <htmlurl
url="http://www.gnu.org/copyleft/fdl.html">.
</p>
</sect1>
</sect>
<sect>
<heading>Quick start</heading>
<p> This section will help you get, install and use vlc without giving you
much details.
</p>
<sect1>
<heading>Get and install vlc from binary packages</heading>
<p>
The first thing to do is to get an archive, on our web site
<htmlurl url="http://www.videolan.org/download.html" name="http://www.videolan.org/download.html">
</p>
<sect2>
<heading>Which package to chose ?</heading>
<p>
There are different packages because vlc has "plugins" which provide
features but also enlarge the executable and require external libraries.
</p>
<p>
SDL is a lib which allows you to have an accelerated video output.
You will need libsdl > 1.1.6
</p>
<p>
If you're using the enlightened sound daemon, you may want to try
the esd-aware vlc.
</p>
<p>
Generally, when you don't know what a module name is, you don't
need/use it :-)
</p>
</sect2>
<sect2>
<heading>Debian package</heading>
<p>
Just use dpkg :
<verb>
dpkg -i vlc-x.x.x.deb
</verb>
</p>
<p>
Depending on the package you have downloaded, you may have dependency
problems. You have to solve them, by installing the required libraries.
</p>
</sect2>
<sect2>
<heading>RPM package</heading>
<p>
Install vlc just as you would install any RPM package :
<verb>
rpm -i vlc-x.x.x.rpm
</verb>
</p>
<p>
You may have to install external libraries to meet dependencies, depending on
the package you downloaded (gnome, gtk, esd, ...).
</p>
</sect2>
<sect2>
<heading>BeOS users</heading>
<p>
Double-click on the archive. It should open your favorite archive extracter.
You can then execute the vlc from there, or extract the archive to a
directory and run it from there.
</p>
</sect2>
<sect2>
<heading>Mac OS X users</heading>
<p>
Double-click on the archive, and copy the vlc file to your Applications
folder.
</p>
</sect2>
<sect2>
<heading>Windows users</heading>
<p>
Launch the installer by double-clicking on it, and follow the installation
instructions. Please note that in most cases you will need administrator
rights to install it under Windows NT, 2000 and XP.
</p>
</sect2>
</sect1>
<sect1>
<heading>Get libdvdcss</heading>
<p>
In order to read CSSsrambled DVDs, you will need libdvdcss.
You can find binary
packages for your distribution here : <htmlurl
name="http://www.videolan.org/libdvdcss/download.html"
url="http://www.videolan.org/libdvdcss/download.html">
</p>
<p>
For Windows, BeOS and Mac OS X users, libdvdcss is statically linked in the
Windows binary, so you don't have to install it.
</p>
</sect1>
<sect1>
<heading>Use the vlc for DVD reading</heading>
<p>
Launch the application simply by typing vlc in a terminal (or by
double-clicking on its icon in a graphical shell). You should see
the graphical interface appear.
</p>
<p>
For reading a DVD (or a VCD), click on the "Disc" button. The new window
you must then enter the path to your DVD or VCD drive :
<sect2>
<heading>Linux users</heading>
<p>
Usually, your dvd device is /dev/hd? (if you have an ide drive).
For instance, if you DVD player is master on the second IDE device,
it will be /dev/hdc.
</p>
<p>
It is very useful to create a symlink to this file, called /dev/dvd.
To do this, as root, type (if your dvd device is /dev/hdc for example) :
<verb>
ln -s /dev/hdc /dev/dvd
</verb>
Also make sure you have read AND write permission to the device
(otherwise dvd decryption won't work).
</p>
</sect2>
<sect2>
<heading>Windows users</heading>
<p>
The path to your DVD drive usually is D:\ or E:\. You may have a look
in "My Computer" and look to which letter your DVD drive is assigned.
</p>
</sect2>
<sect2>
<heading>BeOS users</heading>
<p>
Under BeOS, the dvd device looks like
"/dev/disk/ide/atapi/1/slave/0/raw" for example, if your dvd device is
slave on your first (not sure) ide device.
</p>
</sect2>
<sect2>
<heading>Other OS</heading>
<p>
To do ...
</p>
</sect2>
<sect1>
<heading>Use the vlc for network streaming</heading>
<p>
This is the vlc original usage.
</p>
<p>
Launch the vlc as you would have for DVD reading. Then click on the
"Network" button.
</p>
<sect2>
<heading>If using a VideoLAN Channel Server</heading>
<p>
The only thing you have to do is to check the "Channel server" box
and to enter the IP address and port
of this channel
server. Ask your administrator if you don't have it. Then click on OK.
</p>
<p>
You will see a new "Channel" field in the interface. You may now
enter the selected channel and click on OK. After a few seconds,
if a program is being sent in this channel, you should see the program
start.
</p>
<p>
If nothing appears and you are sure that a program is streamed in
this channel, you may try once again, because a problem of communication
with the channel server could have occurred (if you launched vlc from
a terminal, you should see "Network error: no answer from vlcs").
</p>
</sect2>
<sect2>
<heading>Without VideoLAN Channel Server</heading>
<p>
Simply clicking on the network button, then on ok should be
sufficient in most cases.
</p>
<p>
After clicking on OK, and if a program is being sent, you should see
a window open with your program.
</p>
</sect2>
</sect>
<sect>
<heading>The graphical interface</heading>
<p>
Please note that the gnome, gtk and win32 interfaces are currently the most
advanced. The following descriptions refer to them.
</p>
<sect1>
<heading>Opening a stream</heading>
<p>
For opening streams through the graphical interface, click on either
"File" for opening a file stored on your hard drive, "Disc" for
opening a DVD or a VCD, "Network" for reading a stream from a vls
or through http input, or "Satellite" for reading directly
from a satellite card.
</p>
<sect1>
<heading>Basic stream control</heading>
<p>
You have at your disposal all the classical control of a video player.
For example when playing local streams, you can do pauses, speed up or
slow down the stream ... Just use the corresponding buttons.
</p>
<sect1>
<heading>DVD and VCD navigation</heading>
<p>
When reading a DVD or a VCD, you can change chapter and title either
by using the
right-click menu or by using the dedicated bar that appears when reading
from a disc.
</p>
</sect1>
<sect1>
<heading>Programs, audio and subtitles</heading>
<p>
When reading a multiprogram stream, you can change the current program
by selecting it in the "View/Programs" submenu, or using the "right click"
menu from the video output window.
</p>
<p>
In DVDs, if different angles are availables, they will be treated as
different programs.
</p>
<p>
At any time you can change the audio/subtitles channel using either the
"setting" menu from the interface or using the "right click" menu from
the video output window.
</p>
<sect1>
<heading>Preferences window</heading>
<p>
By choosing "Preferences" in the "Settings" menu, you will open
the preferences window. This window is generated dynamically according
to the modules that were compiled.
</p>
<p>
In every tab, you may click on "Save" to store your settings in your
~/.videolan/vlcrc file.
</p>
<sect2>
<heading>Interface tab</heading>
<p>
In that tab, you can select which interface you would like to use on next
start. Click on the choosen interface, click on "Select" then on "Save".
</p>
</sect2>
<sect2>
<heading>Audio tab</heading>
<p>
In this tab, you can select the audio output you would like to use on
next start. You may also specify some other settings such as the output
level, the audio frequency, ...
</p>
</sect2>
<sect2>
<heading>Video tab</heading>
<p>
In this tab, you can select which video output will be used on next start,
and add a video filter module. You may also specify some video settings,
such as the window size or if you would like fullscreen display.
</p>
</sect2>
<sect2>
<heading>Input tab</heading>
<p>
In this tab, you can enter the input method with options (for example
<tt>udp:@239.255.255.42</tt>) that will be used on next start. You can
also add some settings, such as the channel server address ...
</p>
</sect2>
<sect2>
<heading>Decoders tab</heading>
<p>
In this tab, you can select which decoder you want to use for MPEG audio
and AC3 streams.
</p>
</sect2>
<sect2>
<heading>CPU tab</heading>
<p>
In this tab, you may disable the use of some CPU extensions such as
MMX or SSE.
</p>
</sect2>
<sect2>
<heading>Playlist tab</heading>
<p>
In this tab, you can select some playlist options, such as looping the
playlist.
</p>
</sect2>
<sect2>
<heading>Miscellanous tab</heading>
<p>
In this tab, you can select which memcpy version you want to use. Some
of them uses MMX 3Dnow! extensions.
</p>
</sect2>
</sect1>
</sect>
<sect>
<heading>Command line options</heading>
<p>
Many options are only available through command line. They are detailed here.
</p>
<sect1>
<heading>Opening streams</heading>
<p>
The following commands start vlc and add a first element to the playlist.
</p>
<sect2>
<heading>Opening a file</heading>
<p>
Simply start vlc with <tt>vlc my_file.mpg</tt>.
</p>
<p>
You may tell vlc what input to use, for example add <tt>--input ts</tt>
when playing a ts MPEG, although vlc should be able to recognize the type
of MPEG.
</p>
</sect2>
<sect2>
<heading>Opening a DVD or VCD</heading>
<p>
Simply start vlc with <tt>vlc dvd:DVDDRIVE</tt> or <tt> vlc vcd:CDROMDRIVE
</tt>, where DVDDRIVE/CDROMDRIVE is the complete
path to your dvd/cdrom drive.
</p>
<p>
You may add <tt>-t X -T Y</tt> to start directly from the Xth chapter, Yth
title.
</p>
</sect2>
<sect2>
<heading>Start a network stream</heading>
<p>
To receive an UDP stream (being sent from a VLS), start vlc with
<tt> vlc udpstream:[@&lt;bind address&gt;[:&lt;server port&gt;]] </tt>.
</p>
<p>
Please note that bind address refers to the destination address, for
example your broadcast address. If the stream is being broadcasted,
<verb> vlc udpstream:</verb> should be sufficient. If the stream
is multicasted, you must specify the multicast address, for example
<verb> vlc udpstream:@239.255.255.42 </verb>
<p>
To receive a http stream, start vlc with <tt>vlc &lt;your URL&gt;</tt>.
</p>
</sect2>
</sect1>
<sect1>
<heading>Modules selection</heading>
<p>
The vlc tries to select the most appropriate interface, input and output
modules, among the ones available on the system, according to
the stream he is given to read. However, you may wish to force
the use of a specific module with the following options:
<p> <verb>--intf &lt;interface module&gt;</verb>
allows you to select the interface module </p>
<p> <verb>--vout &lt;video output module&gt;</verb>
allows you to select the video output.</p>
<p> <verb>--aout &lt;audio output module&gt;</verb>
allows you to select the audio output.</p>
<p> <verb>--filter &lt;video filter module&gt;</verb>
allows you to add a video filter module.</p>
<p> <verb>--mpeg-adec &lt;MPEG audio decoder module&gt;</verb>
allows you to select the audio MPEG decoder.</p>
<p> <verb>--ac3-adec &lt;AC3 audio decoder module&gt;</verb>
allows you to select the audio AC3 decoder.</p>
</sect1>
<sect1>
<heading>Other options</heading>
<sect2>
<heading>Help options:</heading>
<p> <verb>--help</verb>
gives you all the available options.</p>
<p> <verb>--longhelp</verb>
gives you a more detailled version of the available options.</p>
<p> <verb>--version</verb>
gives you information about the current version.</p>
<p> <verb>--list</verb>
gives you the list of all available plugins.</p>
<p> <verb>-vvvv (X times)</verb>
set the level of warning messages.</p>
<p> <verb>--stats</verb>
gives statistic outputs.</p>
</sect2>
<sect2>
<heading>Audio options:</heading>
<p> <verb>--noaudio</verb>
disables the audio output</p>
<p> <verb>--mono</verb>
forces the vlc to treat the stream in mono audio.</p>
<p> <verb>--volume &lt;integer&gt;</verb>
set the level of audio output.</p>
<p> <verb>--rate &lt;integer&gt;</verb>
set the audio output frequency (Hz)</p>
<p> <verb>--desync &lt;integer&gt;</verb>
compensates desynchronization of audio (ms)</p>
</sect2>
<sect2>
<heading>Video options:</heading>
<p> <verb>--novideo</verb>
disables the video output</p>
<p> <verb>--width &lt;integer&gt;</verb>
<verb>--height &lt;integer&gt;</verb>
set the video window dimensions.</p>
<p> <verb>--grayscale</verb>
turns video output into grayscale mode.</p>
<p> <verb>--fullscreen</verb>
set fullscreen video.</p>
<p> <verb>--nooverlay</verb>
disables hardware acceleration for the video output</p>
<p> <verb>--spumargin &lt;integer&gt;</verb>
force subtitles position.</p>
</sect2>
<sect2>
<heading>Input options:</heading>
<p> <verb>--network-channel</verb>
Start with channel server enabled.</p>
<p> <verb>--channel-server &lt;string&gt;</verb>
Specify the channel server address.</p>
<p> <verb>--channel-port &lt;integer&gt;</verb>
Specify the channel server port.</p>
<p> <verb>--iface &lt;string&gt;</verb>
Select the network interface to use.</p>
<p> <verb>--input-program &lt;integer&gt;</verb>
Select the program to use (for streams with
several programs, as those coming from satellite).</p>
<p> <verb>--audio-type &lt;integer&gt;</verb>
Select the audio channel to use.</p>
<p> <verb>--subtitle-channel &lt;integer&gt;</verb>
Select the subtitle.</p>
<p> <verb>--audio_channel &lt;integer&gt;</verb>
Select the channel number.</p>
<p> <verb>--dvd &lt;string&gt;</verb>
Specify the default dvd device.</p>
<p> <verb>--vcd &lt;string&gt;</verb>
Specify the default vcd device.</p>
<p> <verb>-4, --ipv4</verb>
Force IPv4.</p>
<p> <verb>-6, --ipv6</verb>
Force IPv6.</p>
</sect2>
<sect2>
<heading>CPU options</heading>
<p> <verb>--nommx</verb>
disable the use of mmx CPU extensions.</p>
<p> <verb>--no3dn</verb>
disable the use of 3D Now! CPU extensions.</p>
<p> <verb>--nommxext</verb>
disable the use of mmx ext CPU extensions.</p>
<p> <verb>--noaltivec</verb>
disable the use of AltiVec CPU extensions.</p>
</sect2>
</sect1>
<sect>
<heading>Building the vlc from sources</heading>
<p>
You can choose either to take the latest release, or a CVS source. Note that
CVS snapshots may be broken, although we do our best to prevent this from
happening.
</p>
<p>
From here, you have to be a little experienced, even more if you want to use
the cvs.
</p>
<sect1>
<heading>Getting an archive</heading>
<p>
You have guessed it, the first thing to do is to get the source.
Until there, everyone should understand :)
</p>
<sect2>
<heading>Web site</heading>
<p>
Source packages can be found in the "tarballs" section of the download page :
<htmlurl url="http://www.videolan.org/download.html" name="http://www.videolan.org/dowload.html">.
</p>
<p>
CVS snapshots are available from the address :
<htmlurl url="http://www.videolan.org/packages/snapshots/"
name="http://www.videolan.org/packages/snapshots/">.
</p>
<p>
Then untar the archive :
<verb>
tar xzf vlc-x-x-x.tar.gz
</verb>
</p>
</sect2>
<sect2>
<heading>Directly from CVS</heading>
<p> <label id="cvs">
First log in as user anonymous with an empty password :
<verb>
cvs -d :pserver:anonymous@anoncvs.videolan.org:/var/cvs/videolan login
</verb>
Then retrieve the repository :
<verb>
cvs -d :pserver:anonymous@anoncvs.videolan.org:/var/cvs/videolan -z3 checkout vlc
</verb>
</p>
</sect2>
<sect2>
<heading>libdvdcss</heading>
<p>
To compile vlc with dvd support, you need to get and install libdvdcss.
</p>
<p>
It is available for download here :
<htmlurl url="http://www.videolan.org/libdvdcss/download.html"
name="http://www.videolan.org/libdvdcss/download.html">
Decompress the tarball in a directory of your choice and build it :
<verb>
tar -xvzf libdvdcss-x.x.x.tar.gz
cd libdvdcss-x.x.x
./configure
make
[as root] make install
</verb>
You can also find binaries packages for many distributions.
</sect1>
<sect1>
<heading>Building the program</heading>
<p><label id="compile">
Go into the vlc directory and run the configure script :
<verb>
./configure
</verb>
If you want to enable options, you may add "--enable-option"
to the previous line.
For example, to build with the xvideo extension, and alsa support,
you should type :
<verb>
./configure --enable-xvideo --enable-alsa
</verb>
To get the list of the available options, and know if they are
enabled by default,
you can try :
<verb>
./configure --help
</verb>
</p>
<p>
Also have a look on the <ref id="modules" name="following modules
descriptions">.
</p>
<p>
A very typical installation, on a XFree 4.1 system, recent video card, with
gnome, is :
<verb>
./configure --enable-esd --enable-gnome
</verb>
<p>
</sect1>
<sect1>
<heading>Plugins, builtins ...</heading>
<p>
The configure script should create a Makefile.opts file, which you can edit and modify.
Indeed you can chose to have features (as esd support, for example) built as plugins
or inside the program.
</p>
<p>
If you build a feature as a plugin, it can lead to a little loss of performance.
It you build it inside the code, it'll enlarge a bit the size of the executable.
</p>
<p>
When you're done with Makefile.opts (which also works if you leave it
untouched), just
type:
<verb>
make
</verb>
It should compile without any error. If there are, please check you
have the required libraries
installed on your system, as the configure script can't check them all.
</p>
<p>
When you're done with it, as root, type :
<verb>
make install
</verb>
if you wish to have vlc fully installed on your system. If you prefer
to keep in in the
current directory, you may skip the "make install". You'll then have
to cd into the vlc
directory and type "./vlc" instead of just typing vlc.
</p>
</sect1>
</sect>
<sect>
<heading>Modules description</heading>
<p>
<label id="modules">
Here is a description of nearly all the available modules for the
vlc. If you wish to compile one which is stated disabled by default,
you have to launch the configure script with
<verb> ./configure --enable-module_name </verb>. See <ref
name="compilation instructions" id="compile">.
<sect1>
<heading>Video outputs</heading>
<sect2>
<heading>x11</heading>
<p>default :enabled </p>
<p>
This is the basic x11 video output. It only requires a
working X11 server. You will need xlibs headers to compile it
(xlibs-dev package on Debian systems).
</p>
</sect2>
<sect2>
<heading>xvideo</heading>
<p>default : enabled</p>
<p>
It requires an xvideo compliant graphic card (it is the case for
nearly all the modern card). It uses hardware acceleration for
yuv transformation and for rescaling.
</p>
</sect2>
<sect2>
<heading>sdl</heading>
<p>default : enabled</p>
<p>
This video output uses sdl libraries. You need at least version 1.1.6 of
this libraries.
</p>
<p>
You may indicate the path to the sdl-config program with the
<verb> --with-sdl-config-path=PATH </verb> option given to the <verb>
configure</verb> script.
</p>
</sect2>
<sect2>
<heading>directx</heading>
<p>default: enabled on win32</p>
<p>
This video output uses Microsoft Direct X libraries. It is recommended
for the win32 port.
</p>
<p>
You may indicate the path to directx libraries and headers with
the <verb>--with-directx=PATH</verb> option.
</sect2>
<sect2>
<heading>fb</heading>
<p>default: enabled on Linux</p>
<p>
This is the frame buffer video output. It requires that your kernel
was compiled with frame buffer support.
</p>
</sect2>
<sect2>
<heading>glide</heading>
<p>default: disabled</p>
<p>
This video output uses Glide libraries (hardware acceleration for
3Dfx cards).
</p>
<p>
You may indicate the path to the library with the
<verb>--with-glide=PATH</verb> compilation option.
</p>
</sect2>
<sect2>
<heading>mga</heading>
<p>default: disabled</p>
<p>
It provides hardware acceleration for Matrox cards on Linux.
</p>
</sect2>
<sect2>
<heading>ggi</heading>
<p>default: disabled</p>
</sect2>
<sect2>
<heading>aa</heading>
<p>default: disabled</p>
<p>
This video output uses the aalib library to display video
through ASCII art. It requires aalib headers (aalib1-dev under Debian)
to compile.
</p>
</sect2>
</sect1>
<sect1>
<heading>Video filters modules</heading>
<sect2>
<heading>deinterlace</heading>
<p>default: enabled</p>
<p>
This filter deinterlaces video. It is useful with streams coming
from a satellite broadcast.
</p>
</sect2>
<sect2>
<heading>wall</heading>
<p>default: enabled</p>
<p>
This filter allows you to have the video cut in pieces in several
windows, which you can order as you wish. It can be used to generate
image walls with several sources. Start it with
<verb> --filter wall:XxY</verb> in order to have the video cut in X rows
and Y columns
</p>
</sect2>
<sect2>
<heading>distort</heading>
<p>default: enable</p>
<p>
This filter adds a distortion effect to the video. Who said it
was useless ;-) ?
</p>
</sect2>
<sect2>
<heading>transform</heading>
<p>default: enable</p>
<p>
This filter rotates the video window of 90 degrees.
</p>
</sect2>
<sect2>
<heading>invert</heading>
<p>default: enabled</p>
<p>
This filter inverses colors.
</p>
</sect2>
</sect1>
<sect1>
<heading>Sound outputs</heading>
<sect2>
<heading>dsp</heading>
<p>default: enabled on Linux</p>
<p>
This is the Linux /dev/dsp output. It requires that your kernel
was compiled with support for your sound card.
</p>
</sect2>
<sect2>
<heading>alsa</heading>
<p>default: disabled</p>
<p>
This is the sound output for Advanced Linux Sound Architecture.
It requires that you installed the alsa drivers and libraries.
</p>
</sect2>
<sect2>
<heading>esd</heading>
<p>default: disabled</p>
<p>
This sound output has Enlightened Sound Daemon support
(usually used with Gnome).
You must have the daemon and its libraries installed.
</p>
</sect2>
<sect2>
<heading>arts</heading>
<p>default: disabled</p>
<p>
This sound output has aRts (KDE's sound server) support.
You must have the daemon and its libraries installed.
</p>
</sect2>
<sect2>
<heading>waveout</heading>
<p>default: enabled on win32</p>
<p>
This is the Wave output, which is used by the win32 port.
</p>
</sect2>
</sect1>
<sect1>
<heading>Input modules</heading>
<sect2>
<heading>dvd</heading>
<p>default: enabled</p>
<p>
This is the DVD input module. It will need libdvdcss, which can
be found <htmlurl url="http://www.videolan.org/libdvdcss/"
name="http://www.videolan.org/libdvdcss/">.
</p>
</sect2>
<sect2>
<heading>dvdread</heading>
<p>default: disabled</p>
<p>
This is an alternative to the previous one, it uses libdvdread
(which also needs libdvdcss).
</p>
</sect2>
<sect2>
<heading>vcd</heading>
<p>default: enabled</p>
<p>
This is the VideoCD input.
</p>
</sect2>
<sect2>
<heading>http</heading>
<p>default: enabled</p>
<p>
This is the http input. You can use it for Video On Demand.
</p>
</sect2>
<sect2>
<heading>satellite</heading>
<p>default: disabled</p>
<p>
This is an input module that allows to read directly from a
Hauppauge WinTV Nova card under Linux. It requires drivers 0.9.4
available from
<htmlurl url="http://www.linuxtv.org/" name="linuxtv.org">.
</p>
</sect2>
<sect2>
<heading>avi</heading>
<p>default: enabled</p>
<p>
This input module allows to read .avi files.
</p>
</sect2>
</sect1>
<sect1>
<heading>Interface modules</heading>
<sect2>
<heading>gtk</heading>
<p>default: enabled</p>
<p>
This is the GTK+ interface. It needs gtk libraries (libgtk1.2 package
on Debian) and headers files if you are compiling it (libgtk1.2-dev
package on Debian). Note that it can be used under Windows.
</p>
</sect2>
<sect2>
<heading>gnome</heading>
<p>default: disabled</p>
<p>
This is the Gnome interface. It needs gnome libraries (libgnome32 under
Debian) and headers (libgnome-dev) if you wish to compile it.
</p>
</sect2>
<sect2>
<heading>intfwin</heading>
<p>default: enabled on win32</p>
<p>
This is the Windows native interface. It requires Borland C++ builder
to compile. You may use <verb>--with-bc-builder=PATH</verb> option
to specify the path to this application.
</p>
</sect2>
<sect2>
<heading>qt</heading>
<p>default: disabled</p>
<p>
This is the QT libraries interface module. You will need the libraries
(libqt2 package on Debian) and headers (libqt-dev) if you wish to
compile it.
</p>
</sect2>
<sect2>
<heading>kde</heading>
<p>default: disabled</p>
<p>
This is the KDE interface module. You will need the libraries
(kdelib package on Debian) and headers (kde-devel) if you wish to
compile it.
</p>
</sect2>
<sect2>
<heading>rc</heading>
<p>default: enable</p>
<p>
This is the Remote Control interface module. With this one, vlc
is controled by sending him commands, such as play, stop, ... so
that you may control vlc through a script.
</p>
</sect2>
<sect2>
<heading>ncurses</heading>
<p>default: disabled</p>
<p>
This is a text interface, using ncurses library. You will need
ncurses headers if you want to compile it (libncurses5-dev on Debian).
</p>
</sect2>
<sect2>
<heading>lirc</heading>
<p>default: disabled</p>
<p>
This interface module allows you to control vlc through a remote.
A lircrc example is provided to help you configure it to your remote
(see doc/lirc/example.lircrc).
</p>
</sect2>
</sect1>
<sect1>
<heading>Codec modules</heading>
<p> The following modules add codec support. </p>
<sect2>
<heading>a52</heading>
<p>default: disabled</p>
<p>
This is a better AC3/A52 decoder than the built-in one, based on
liba52 :
<htmlurl url="http://liba52.sf.net/" name="liba52">.
</p>
</sect2>
<sect2>
<heading>ffmpeg</heading>
<p>default: disabled</p>
<p>
This is a free MPEG-4/DivX/OpenDivX codec :
<htmlurl url="http://ffmpeg.sf.net/" name="ffmpeg">.
</p>
</sect2>
</sect1>
<sect1>
<heading>OS support modules</heading>
<p> The following modules add support or different OSs. </p>
<sect2>
<heading>macosx</heading>
<p>default: enabled on MacOS X</p>
<p>
This is the MacOS X support module, including a native interface.
</p>
</sect2>
<sect2>
<heading>qnx</heading>
<p>default: enabled on qnx</p>
<p>
This is the QNX RTOS support module.
</p>
</sect2>
</sect1>
<sect>
<heading>Specific use of the vlc</heading>
<sect1>
<heading>Use the vlc as a viever and decoder for the Hauppauge WinTV
Nova card</heading>
<sect2>
<heading>What is required ?</heading>
<p>
At the present time, the satellite input only works under Linux.
It requires that drivers version 0.9.4 of the card, drivers
that are being developped by the <htmlurl name="linuxtv.org"
url="http://www.linuxtv.org/">.
</p>
</sect2>
<sect2>
<heading>Building the vlc with satellite support</heading>
<p>
Get the sources, either from our last .tar.gz release,
or best from the cvs (see <ref name="cvs instructions"
id="cvs">).
</p>
<p>
Move to the vlc directory, then launch
<verb>
./configure --enable-satellite
</verb>
You may add other compilation options, see <ref
name="compilation instructions" id="compile">.
Then launch the compilation with
<verb>
make
</verb>
You may install it with (as root)
<verb>
make install
</verb>
or run it from the current directory.
</p>
</sect2>
<sect2>
<heading>Running it from the command line</heading>
<p>
Run the vlc with
<verb>
vlc satellite:&lt;frequency(Hz)&gt;,&lt;polarization(0 for V,
1 for H)&lt;,
&gt;FEC (1 for 1/2, 2 for 2/3 ...)&gt;,&lt;symbol rate (kbytes/sec)&gt;
</verb>
You then have to select your program, either with the command line option
<verb>
--input_program <program_number (also called service ID)>
</verb>
or by choosing it in the view/programs menu.
</sect2>
<sect2>
<heading>Running it from the GTK/Gnome interface</heading>
<p>
Click on the "Sat" icon. In the opening box, you may enter
your transponder settings, then click on "Ok".
</p>
<p>
After a few seconds, the word satellite should appear under the command
buttons. You may now choose your program from the View/Programs menu.
</p>
</sect2>
</sect1>
<sect1>
<heading>Use the vlc to create image walls.</heading>
<p>
The idea is to use several video sources, each one displaying a part
of the whole image, to get a bigger result.
</p>
<p>
Vlc and the VideoLAN solution can provide a good way to create
such displays : a vls broadcasts a stream in several vlc each
display a part of image.
</p>
<p>
For this, you should use the wall filter : start vlc with
<verb>
vlc udp: --filter wall:&lt;number of rows&gt;x&lt;number of columns&gt;
:&lt;number of the part to diplay&gt;
</verb>
</p>
</sect1>
</sect>
<sect>
<heading>Get more help</heading>
<p>
First of all, it something seems to go wrong, read and try to
understand the error messages. You can have detailed messages by
choosing messages in the view menu, in GTK, Gnome and Win32 interfaces.
</p>
<p>
There is a FAQ page on our website :
<htmlurl url="http://www.videolan.org/doc/" name="http://www.videolan.org/doc/">.
If you think one question should be in the FAQ, please contact
<htmlurl url="mailto:videolan@videolan.org" name="videolan@videolan.org">
</p>
<p>
Finally, there's a users mailing list (English-speaking). To subscribe, send a mail to
<htmlurl url="mailto:listar@videlan.org" name="listar@videlan.org"> containing
"subscribe vlc" as message body.
</p>
</sect>
</article></linuxdoc>
......@@ -16,7 +16,7 @@
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
vlc, gnome-vlc, gvlc, kvlc, qvlc, wxvlc \- the VLC media player
vlc, wxvlc, svlc, gvlc, kvlc, qvlc \- the VLC media player
.SH SYNOPSIS
.B vlc
.RI [ OPTIONS ]
......@@ -24,7 +24,7 @@ vlc, gnome-vlc, gvlc, kvlc, qvlc, wxvlc \- the VLC media player
.SH DESCRIPTION
This manual page documents briefly the
.B VLC
multimedia player.
multimedia player and server.
.SH OPTIONS
.B VLC
......@@ -52,9 +52,9 @@ must have been prepared beforehands.
.B vcd:<device>
VCD device (for instance vcd:/dev/cdrom).
.TP
.B udpstream:[@[<multicast address>][:<local port>]]
.B udp:[@[<multicast address>][:<local port>]]
UDP stream, such as one sent by VLS or another VLC.
Usually "udpstream:" is enough.
Usually "udp:" is enough.
.TP
.B vlc:<command>
Execute a playlist command. Commands are :
......@@ -64,7 +64,7 @@ Execute a playlist command. Commands are :
(close VLC).
.SH SEE ALSO
.BR vls (1), vlms (1)
.BR vls (1)
.br
.SH AUTHOR
This manual page was written by Sam Hocevar <sam@zoy.org>, for the Debian
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Description" content="Web streaming">
<meta name="Keywords" content="MPEG, Web, streaming, VideoLAN">
<meta name="Author"
content="Christophe Massiot, massiot@via.ecp.fr">
<link rev="made" href="mailto:massiot@via.ecp.fr">
<title>How to setup VLC for web streaming (X11 only)</title>
<style type="text/css">
<!--
body, table, td, p, blockquote, th, td, tr, caption, dir
{font-family: Verdana, Arial, Helvetica, Lucida, sans-serif;
text-decoration: none; font-weight: 100; margin-left: 25px;}
ul, li {font-family: Verdana, Arial, Helvetica, Lucida, sans-serif;
text-decoration: none; font-weight: 100;}
code {font-family: "Letter Gothic", "Courier New", Courier, monospace;
font-weight: bold}
pre {font-family: "Letter Gothic", "Courier New", Courier, monospace;}
a {text-decoration: none}
b, strong {font-weight: bold}
h1 {font-family: Verdana, Arial, Helvetica, Lucida, sans-serif;
font-weight: bold; text-align: center}
h2 {font-family: Verdana, Arial, Helvetica, Lucida, sans-serif;
font-weight: bold; margin-left: -20px;}
h3 {font-family: Verdana, Arial, Helvetica, Lucida, sans-serif;
font-weight: bold; text-decoration: underline}
.lettrine {font-size: 18pt;}
-->
</style>
</head>
<body bgcolor="#E8E8E8">
<h1> How to set up VLC for web streaming (X11 only) </h1>
<h2> Abstract </h2>
VLC is a separate application which can either read a plain file or a TS
network stream. Using XSwallow, it is possible to incorporate VLC video
output window right into the window of a browser. With additional
tricks, it is also possible to launch a VLMS (VideoLAN MiniServer) on the
server-side, and have the client read a live network stream. This document,
intended for expert users only, describes the ways to do it.
<h2> Installing and configuring XSwallow for plain MPEG files </h2>
XSwallow is a software which allows any X11 window to be "swallowed"
(technically, just reparented, so that it has no effet on performance
anyhow) into the window of a netscape-compatible browser (Navigator,
Mozilla, Konqueror, Galeon, Opera...). This is indeed a trick in the X11
windowing model, and don't even expect to port this behaviour to any
non-X11-based operating system, even supported by VLC (MS Windows,
MacOS X, BeOS, QNX, ...). <p>
Download it here : <a href="http://www.csn.ul.ie/~caolan/docs/XSwallow.html">
http://www.csn.ul.ie/~caolan/docs/XSwallow.html</a>. Compilation is really
straightforward, it basically boils down to some :
<pre> make -f makefile.linux </pre> <p>
Place the resulting xswallow.so in a directory scanned by your browser
for plug-ins (for instance, /usr/lib/netscape/plugins, this scan path
can with some browsers be read in $NPX_PLUGIN_PATH) and xswallow.conf
in the directory indicated by the environment variable $MOZILLA_HOME. If
it is currently unset, <b>set it</b> with for instance :
<pre> export MOZILLA_HOME=/etc </pre> <p>
Of course your mileage may vary. The last step is to customize xswallow.conf
so that it launches VLC to handle MPEG files. Comment out all lines you
don't need, and add :
<pre>
video/mpeg; mpeg,mpg,vob; vlc -I dummy -V xvideo %s; VLC (XVideo output); VideoLAN
</pre> <p>
Notes :
<ul>
<li> This assumes vlc is in your $PATH, if it is not the case, adapt it.
<li> If nothing shows up, it might be because VLC cannot find its plug-ins.
Please check that they are in an appropriate place (such as
/usr/lib/videolan/vlc). You can try to add -vvvvv to the arguments to
see where it fails.
<li> The third field on the line is the actual name of the window to
swallow. This is currently annoying, you will have to guess the
name of the video output window, ie. changing the version number
and the output plug-in (to SDL for instance if you use SDL). At
present there is no way to force VLC to use a definite name, but
it will be added by 0.2.90.
<li> When the window is first spawned, it will appear on screen and
then be quicky reparented, making some flickering. The usual
workaround is to make the window appear at offset +10000+10000
using the --geometry switch, but it is not currently supported
by VLC. The will be addressed by 0.2.90 too.
<li> If your window manager isn't configured for automatic placement
of new windows, it may ask you to manually place the window before
XSwallow can swallow it. This is annoying, too. The only workaround
is to disable the functionality (for instance with twm, add
RandomPlacement in .twmrc). It will be addressed at the same time
with --geometry.
<li> XSwallow will first download the file, and then launch VLC. There
is no way to begin reading the stream before it is complete, à la
QuickTime plug-in. This will be addressed in a future version of
VLC (0.4). If you want to do live streaming, proceed to the next
chapter.
</ul> <p>
From now on, if you have your browser reload its plug-in list, it will
display VideoLAN as application handler for video/mpeg. You should now
try and see what it yields.
<h2> Tricks for live web streaming using VLMS </h2>
With a little trick, it is possible to stream a video using VLC and VLMS,
and make it appear in a Web browser (without having a local copy of the
file). This will only work if there is no firewall (nor masquerading)
between the server and the client. It requires to have a CGI support
built into the Web server. <p>
Here is the sketch :
<ul>
<li> The client requests a specific page, say video.html. This page
contains an image tag to a file vlc.ts, AND launches a VLMS
through a CGI script.
<li> The client receives the vlc.ts file which contains the address
of the VLMS server, and through a special mime-type in XSwallow
spawns a VLC.
<li> As soon as VLC begins to receive the stream, it is swallowed by
XSwallow and appears in the browser's window.
</ul>
<h3> Configuring the Web server </h3>
In this section I will only give configuration directives for Apache.
You need to add a new MIME type for TS stream in httpd.conf :
<pre> AddType video/x-mpeg-ts .ts </pre> <p>
And relaunch your Web server (apachectl reload). Next, create the vlc.html
page. You need two specific lines, one to load vlc.ts, the other to start
the VLMS server ; for instance in PHP (adapt it for Perl, Java, or whatever) :
<pre>
&lt;img src="vlc.ts"&gt;
&lt;?php system("/var/www/cgi-bin/stream.sh $REMOTE_ADDR mystream.mpg &gt; /dev/null 2&gt;&amp;1 &amp;"); ?&gt;
</pre> <p>
Where stream.sh is a simple shell script :
<pre>
#!/bin/sh
vlms -d $1 -a mpeg $2
</pre> <p>
VLMS starts streaming mystream.mpg to $REMOTE_ADDR (the IP address fetched
by the server, this is why you cannot do it through firewalls) on port 1234.
Notes :
<ul>
<li> The -a mpeg option may surprise you ; the VLMS doesn't preparse the
stream and thus cannot know which audio channel to send. If you had
an AC3 audio track, you could have put -a ac3. You can also
activate subtitles with -s.
<li> VLMS only reads MPEG-1 files from version 0.2 on. If you have an
older version, you may want to upgrade.
<li> It is possible that, due to the client latency, the client misses
the first frames of the stream. I have no ideal workaround for this.
<li> Some streams (especially MPEG-1) only have one sequence header at the
beginning of the stream. Since the client risks missing it, it may
be completely unable to decode the stream _at all_. If you only get
a blank screen, please try with another stream, such as one test
stream on <a href="ftp://ftp.videolan.org/pub/videolan/streams">
ftp://ftp.videolan.org/pub/videolan/streams</a> before issuing
a bug report.
<li> You should be careful that the stream.sh script is indeed launched
in the background. If your CGI program waits for it, it doesn't
hang up the connection until it finishes, and Web browsers wait
for the connection to be closed before launching plug-ins. In
that case you have nothing on screen, not even a <em> Click to
abort swallow </em> message.
</ul> <p>
Finally, create the vlc.ts file. It just contains the address of the server,
so that VLC can bind on it (you can't retrieve that from XSwallow). For
instance :
<pre> streaming.idealx.com </pre> <p>
<h3> Configuring XSwallow </h3>
You need to add an entry video/x-mpeg-ts in you xswallow.conf :
<pre> video/x-mpeg-ts; ts; video-streaming.sh %s; VLC (XVideo output); VideoLAN </pre> <p>
The same provisions as before apply here. The video-streaming.sh file is a
simple shell script which retrieves the server's name and spawns VLC :
<pre>
#!/bin/sh
SERVER=$( cat $@ )
vlc -I dummy -V xvideo ts://$SERVER
</pre> <p>
Here you go. This is quite a hack, but it will hold until the next major
release of VLC.
<h2> Acknowledgements </h2>
This page has been written by <a href="mailto:massiot@via.ecp.fr">
Christophe Massiot</a> for <a href="http://www.idealx.com/"> IDEALX
S.A.S</a>. <br>
<em> $Id$ </em>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment