Streamdev 0.5.0-rc1

This commit is contained in:
Frank Schmirler
2010-12-02 09:48:23 +01:00
parent 435f01649c
commit 11b22d9f33
57 changed files with 2101 additions and 1153 deletions

225
README
View File

@@ -15,9 +15,9 @@ Contents:
1. Description
2. Installation
2.1 VDR 1.4.x and older
2.2 VDR 1.6.0 and above
2.3 Updating from streamdev 0.3.x
2.1 Compatibility
2.2 Compiling
2.3 Updating
3. Usage
3.1 Usage HTTP server
3.2 Usage IGMP multicast server
@@ -27,7 +27,8 @@ Contents:
4.1 Plugins for VDR-to-VDR clients
4.2 Plugins for Server
4.3 Alternatives
5. Known Problems
5. externremux.sh
6. Known Problems
1. Description:
@@ -62,7 +63,7 @@ the PROTOCOL file.
2. Installation:
----------------
Let's say streamdev's version is 0.4.0 and vdr's version is 1.X.X. If you
Let's say streamdev's version is 0.5.0 and vdr's version is 1.X.X. If you
use anything else please exchange the version numbers appropriately (this
way I don't have to update this section all the times;) ).
@@ -79,54 +80,71 @@ If you want to drive additional Input-Devices (with different sources) on the
client, you can merge the channels.conf files. VDR will detect if the local
device or the network device can receive the channels.
Last, but not least you have to copy the streamdev folder into the
"plugins/streamdev" subfolder of VDR's config-directory (which is equal to your
video-directory if not specified otherwise). For example, if you didn't specify
a separate config-directory, and specified your video directory as "/video0",
the directory has to be copied to /video0/plugins/streamdev.
Last, but not least you have to copy the streamdev-server folder into the
"plugins/streamdev-server" subfolder of VDR's config-directory (which is equal
to your video-directory if not specified otherwise). For example, if you didn't
specify a separate config-directory, and set your video directory to "/video0",
the directory has to be copied to /video0/plugins/streamdev-server.
The directory contains a file named streamdevhosts.conf which you must adjust
to your needs. The syntax is the same as for svdrphosts.conf, so please consult
VDR's documentation on how to fill that file, if you can't do it on-the-fly.
There's also a sample externremux.sh script in this directory. It is used by
streamdev's external remux feature. The sample script uses mencoder. Please
check the script for further information. You can specify a different script
location with the -r parameter. The VDR commandline would then include a
streamdev's external remux feature. The sample script uses mencoder by default.
Please check the script for further information. You can specify a different
script location with the -r parameter. The VDR commandline would then include a
"-P 'streamdev-server -r /usr/local/bin/remux.sh'". Note the additional quotes,
as otherwise -r will be passed to VDR and not to streamdev.
2.1 VDR 1.4.x and older:
------------------------
2.1 Compatibility:
------------------
This version is not compatible to VDR releases older than 1.5.9. Take one of
the streamdev-0.4.x releases if you are running at least VDR 1.4.x. For older
VDRs you will probably need one of the streamdev-0.3.x releases.
2.2 VDR 1.6.0 and above:
------------------------
2.2 Compiling:
--------------
cd vdr-1.X.X/PLUGINS/src
tar xvfz vdr-streamdev-0.4.0.tgz
ln -s streamdev-0.4.0 streamdev
cp -r streamdev/streamdev VDRCONFDIR/plugins/
cd ../..
make [options, if necessary] vdr
make [options, if necessary] plugins
cd vdr-1.X.X/PLUGINS/src
tar xvfz vdr-streamdev-0.5.0.tgz
ln -s streamdev-0.5.0 streamdev
cp -r streamdev/streamdev-server VDRCONFDIR/plugins/
cd ../..
make [options, if necessary] vdr
make [options, if necessary] plugins
2.3 Updating from streamdev 0.3.x
----------------------------------
To build only the plugin, change into the streamdev source folder and issue
make
Starting with streamdev 0.4.0, all additional files are kept in a directory
called "streamdev" inside VDR's plugin config directory. It is the new default
location of externremux.sh and the new place where streamdev-server expects the
file "streamdevhosts.conf". You will have to move this file to its new location:
To build only streamdev-server or only streamdev-client, use
make server
make client
mv VDRCONFDIR/plugins/streamdevhosts.conf VDRCONFDIR/plugins/streamdev/
2.3 Updating:
--------------
(Directory VDRCONFDIR/plugins/streamdev already exists, as you copied the
whole folder from the sources directory as suggested above, right?)
If you are updating streamdev from an earlier release, you might have to
perform some additional steps. Check which version you've been running before,
then read below for the necessary changes.
* Location of files:
--------------------
(Affected: 0.3.x, 0.4.x, 0.4.0pre, 0.5.0pre)
Starting with streamdev 0.5.0, all additional files are kept in a directory
called "streamdev-server" inside VDR's plugin config directory. It is the new
default location of externremux.sh and the new place where streamdev-server
expects the file "streamdevhosts.conf". You will have to move this file to its
new location:
streamdev 0.3.x:
mv VDRCONFDIR/plugins/streamdevhosts.conf VDRCONFDIR/plugins/streamdev-server/
streamdev 0.4.x, 0.4.0pre and 0.5.0pre:
mv VDRCONFDIR/plugins/streamdev VDRCONFDIR/plugins/streamdev-server/
Now check the contents of streamdevhosts.conf. Does it contain a "0.0.0.0/0"
entry? If your VDR machine is connected to the Internet, this line gives
@@ -134,6 +152,21 @@ entry? If your VDR machine is connected to the Internet, this line gives
prevent this (e.g. firewall). You might want to remove this line and enable
HTTP authentication instead.
* Handling of externremux script:
---------------------------------
(Affected: 0.3.x, 0.4.0pre, 0.5.0pre)
Streamdev server's externremux script became responsible for emitting all HTTP
headers. A quick and dirty extension to your current script would be:
echo -ne 'Content-type: video/mpeg\r\n'
echo -ne '\r\n'
However I encourage you to try the new externremux.sh script shipped with the
streamdev source distribution.
To emphasize the required change in externremux, the URL path for passing the
stream through externremux has changed from EXTERN to EXT.
3. Usage:
---------
@@ -172,15 +205,15 @@ listen to with the parameter "HTTP Server Port". The parameter "HTTP Streamtype"
allows you to specify a default stream type, which is used if no specific type
has been requested in the URL (see below). The supported stream types are:
TS Transport Stream (i.e. a dump from the device)
PES Packetized Elemetary Stream (VDR's native recording format)
PS Program Stream (SVCD, DVD like stream)
ES Elementary Stream (only Video, if available, otherwise only Audio)
EXTERN Pass stream through external script (e.g. for converting with mencoder)
TS Transport Stream (i.e. a dump from the device)
PES Packetized Elemetary Stream (VDR's native recording format)
PS Program Stream (SVCD, DVD like stream)
ES Elementary Stream (only Video, if available, otherwise only Audio)
EXT Pass stream through external script (e.g. for converting with mencoder)
Assuming that you leave the default port (3000), point your web browser to
http://hostname:3000/
http://hostname:3000/
You will be presented a menu with links to various channel lists, including M3U
playlist formats.
@@ -188,27 +221,28 @@ playlist formats.
If you don't want to use the HTML menu or the M3U playlists, you can access the
streams directly like this:
http://hostname:3000/3
http://hostname:3000/S19.2E-0-12480-898
http://hostname:3000/3
http://hostname:3000/S19.2E-0-12480-898
The first one will deliver a channel by number on the server, the second one
will request the channel by unique channel id. In addition, you can specify
the desired stream type as a path to the channel.
http://hostname:3000/TS/3
http://hostname:3000/PES/S19.2E-0-12480-898
http://hostname:3000/TS/3
http://hostname:3000/PES/S19.2E-0-12480-898
The first one would deliver the stream in TS, the second one in PES format.
Possible values are 'PES', 'TS', 'PS', 'ES' and 'EXTERN'. You need to specify
Possible values are 'PES', 'TS', 'PS', 'ES' and 'EXT'. You need to specify
the ES format explicitly if you want to listen to radio channels. Play them
back i.e. with mpg123.
mpg123 http://hostname:3000/ES/200
mpg123 http://hostname:3000/ES/200
With 'EXTERN' you can also add a parameter which is passed as argument to the
externremux script.
http://hostname:3000/EXTERN;some_parameter/3
With 'EXT' you can also add parameters which are passed as arguments to the
externremux script (e.g. http://hostname:3000/EXT;param1=value1;param2=value2/3)
Check your externremux.sh script for the parameters it understands. For details
on how to modify or write your own externremux.sh, please see the chapter upon
externremux.sh further down.
If you want to access streamdev's HTTP server from the Internet, do *not* grant
access for anyone by allowing any IP in "streamdevhosts.conf". Instead, pass the
@@ -216,7 +250,7 @@ access for anyone by allowing any IP in "streamdevhosts.conf". Instead, pass the
as argument. Clients with an IP not accepted by "streamdevhosts.conf" will then
have to login. The VDR commandline will have to look like this:
vdr ... -P 'streamdev-server -a vdr:secret' ...
vdr ... -P 'streamdev-server -a vdr:secret' ...
Note the single quotes, as otherwise "-a" will be passed to VDR and not to
streamdev-server. The login ("vdr" in the example above) doesn't have to exist
@@ -267,11 +301,11 @@ You might want to increase this up to "number_of_channels + 1". Note that it's
"number_of_channels", not "maximum_channel_number".
#First 100 channels:
bash# sysctl -w sys.net.ipv4.igmp_max_memberships=101
bash# sysctl -w net.ipv4.igmp_max_memberships=101
#All channels:
bash# COUNT=$(grep -c '^[^:]' PATH_TO_YOUR/channels.conf)
bash# sysctl -w sys.net.ipv4.igmp_max_memberships=$COUNT
bash# sysctl -w net.ipv4.igmp_max_memberships=$COUNT
A multicast server never knows how many clients are actually receiving a stream.
If a client signals that it leaves a multicast group, the server has to query
@@ -337,15 +371,6 @@ With "Filter Streaming" enabled, the client will receive meta information like
EPG data and service information, just as if the client had its own DVB card.
Link channels and even a client-side EPG scan have been reported to work.
The next parameter, "Synchronize EPG", will have the client synchronize it's
program table with the server every now and then, but not regularly. This
happens when starting the client, and everytime VDR does its housekeeping
tasks. The only thing that's guaranteed is, that there will be a minimum
interval of ten seconds between each EPG synchronization. With "Filter
Streaming" this option has been obsoleted. If you still need to synchronize
EPG as additional information is available from the server, you should use the
epgsync-plugin instead (http://vdr.schmirler.de).
Finally with the maximum and minimum priority, you can keep VDR from considering
streamdev in certain cases. If for instance you have a streamdev client with its
own DVB card, VDR would normally use streamdev for recording. If this is not
@@ -356,6 +381,21 @@ which streamdev will accept to tune. Setting the minimum priority to a higher
value than the maximum, you will get two ranges: "up to maximum" and "minimum
and above".
Note that streamdev-client acts similar to a DVB card. It is possible to receive
multiple channels simultaneously, but only from the same transponder. Just add
additional instances of streamdev-client and you will be able to receive as many
transponders at a time. The same trick allows a client to receive channels from
different servers. To create an additional instance, copy the streamdev-client
binary to a different name (e.g. streamdev-client2):
cd VDRPLUGINLIBDIR
cp libvdr-streamdev-client.so.1.X.X libvdr-streamdev-client2.so.1.X.X
Now add -Pstreamdev-client2 to the VDR commandline. In the VDR plugin setup
a second streamdev-client entry should show up. Both instances have to be
configured individually.
4. Other useful Plugins:
------------------------
@@ -398,7 +438,58 @@ With its networking option, xineliboutput provides an alternative to streamdev.
You will get the picture of the server VDR, including its OSD. However you
won't get independent clients, as they all share the same output.
5. Known Problems:
5. externremux.sh:
------------------
When selecting streamtype "EXT", the TS stream from VDR is passed through an
external program for further processing. By default a script installed at
VDRCONFDIR/plugins/streamdev/externremux.sh is expected, however you may
specify a different location as parameter -r to the streamdev-server plugin
(see chapter upon Installation above).
The TS stream is passed to the script on stdin, the resulting stream is expected
on stdout. The following parameters are passed to the script in the environment:
* Information on the channel:
REMUX_CHANNEL_ID VDR channel ID
REMUX_CHANNEL_NAME Channel name
REMUX_VTYPE Video type (2 for MPEG-2)
REMUX_VPID Video PID (undefined if audio only)
REMUX_PPID PCR PID (undefined if equal to VPID)
REMUX_TPID Teletext PID (undefined if not available)
REMUX_APID Space separated list of audio pids
REMUX_ALANG Space separated list of audio languages
REMUX_DPID Space separated list of dolby pids
REMUX_DLANG Space separated list of dolby languages
REMUX_SPID Space separated list of subtitle pids
REMUX_SLANG Space separated list of subtitle languages
REMUX_PARAM_* All (user supplied) parameters (e.g. REMUX_PARAM_x)
* Information on the connection (CGI like)
REMOTE_ADDR Client IP
SERVER_NAME Local IP
SERVER_PORT Local port
SERVER_PROTOCOL Streamdev protocol (HTTP, VTP, IGMP)
SERVER_SOFTWARE Streamdev version
All HTTP headers converted to uppercase, '-' replaced by '_' (e.g. USER_AGENT)
The script should perform the following steps (pseudocode):
if (SERVER_PROTOCOL == HTTP)
write headers (including Content-Type) to STDOUT
write empty line to STDOUT
if (REQUEST_METHOD == HEAD)
exit
endif
endif
while (read STDIN)
remux to STDOUT
wend
onSIGINT/SIGKILL: cleanup and exit
6. Known Problems:
------------------
* In VDR-to-VDR setup, the availability of a channel is checked with a different
@@ -424,15 +515,9 @@ up. So please consider the logs for the correct value. Remember to fill in
hexadecimal values if you are using an editor to modify your channels.conf
(number 10 becomes an "a", number 11 a "b", ...).
2. Turn encrypted channels into Free-to-Air channels on the client. Again,
either enter the channels menu or edit the client's channels.conf. You will
also have to disable automatic channel updates on the client or (if streamdev
is the only DVB source) disable streamdev's filter streaming feature. Otherwise
VDR will revert the channel into an encrypted one.
3. Apply either patch "patches/vdr-1.6.0-intcamdevices.patch" or patch
2. Apply either patch "patches/vdr-1.6.0-intcamdevices.patch" or patch
"patches/vdr-1.6.0-ignore_missing_cam.diff" to your client VDR. Intcamdevices
is the clean solution. But as it modifies the VDR API, so you will need to
is the clean solution, but it modifies the VDR API. So you will need to
recompile all of your plugins. The ignore_missing_cam patch is trivial, no need
to recompile other plugins. However it is not suitable for clients with a DVB
card of their own.