1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00
Go to file
2012-02-19 17:47:43 +02:00
iptv Reverted script changes. 2010-11-29 12:26:01 +02:00
patches Updated the patch. 2012-02-19 17:43:43 +02:00
po Updated translation files. 2012-02-02 18:56:05 +02:00
.gitignore Added .gitignore. 2008-08-29 17:38:46 +03:00
common.c Cleaned up compilation warnings. 2009-06-19 13:28:53 +03:00
common.h Enabled partial content responses for HTTP protocol. 2010-09-10 10:54:06 +03:00
config.c Canonicalized the configuration directory. 2010-12-03 16:00:40 +02:00
config.h Canonicalized the configuration directory. 2010-12-03 16:00:40 +02:00
COPYING Initial revision 2007-09-12 17:28:59 +00:00
device.c Updated for vdr-1.7.21. 2011-09-04 17:58:18 +03:00
device.h Updated for vdr-1.7.21. 2011-09-04 17:58:18 +03:00
HISTORY Updated for vdr-1.7.23 and version number. 2012-02-02 18:50:18 +02:00
iptv.c Updated for vdr-1.7.23 and version number. 2012-02-02 18:50:18 +02:00
Makefile Updated Makefile. 2012-02-19 17:47:43 +02:00
pidscanner.c Fixed debug compilation. 2010-12-01 10:09:11 +02:00
pidscanner.h Disable detaching of receivers if retuned to an existing channel (Thanks to Zdeněk Kopřivík). 2010-11-29 21:09:17 +02:00
protocolext.c Fixed EXT protocol execution (Thanks to Peter Holik). 2010-10-25 14:43:38 +03:00
protocolext.h Optimized TS packet data flow. 2009-02-26 16:04:12 +02:00
protocolfile.c Cleaned up compilation warnings. 2009-06-19 13:28:53 +03:00
protocolfile.h Optimized TS packet data flow. 2009-02-26 16:04:12 +02:00
protocolhttp.c Fixed a regression introduced in HTTP protocol. 2010-12-02 17:32:02 +02:00
protocolhttp.h Fixed some lint warnings. 2009-03-20 17:43:31 +02:00
protocolif.h Optimized TS packet data flow. 2009-02-26 16:04:12 +02:00
protocoludp.c Fixed Open()/Close() when using UDP protocol. 2010-11-29 18:27:39 +02:00
protocoludp.h Moved JoinMulticast()/DropMulticast() into cIptvUdpSocket class. 2010-09-15 18:18:46 +03:00
README Refactored cIptvTcpSocket class. 2010-09-15 23:41:25 +03:00
sectionfilter.c Added cppcheck target into Makefile. 2011-06-15 17:49:15 +03:00
sectionfilter.h Modified sectionfilters to use socket pair instead of filesystem fifos. 2009-10-01 18:48:28 +03:00
setup.c Silenced harmless "case value not in enumerated type" warnings. 2011-12-04 19:40:46 +02:00
setup.h Updated for vdr-1.7.13. 2010-03-04 17:34:21 +02:00
sidscanner.c Fixed debug compilation. 2010-12-01 10:09:11 +02:00
sidscanner.h Disable detaching of receivers if retuned to an existing channel (Thanks to Zdeněk Kopřivík). 2010-11-29 21:09:17 +02:00
socket.c Enabled one debug message. 2010-12-08 18:33:24 +02:00
socket.h Fixed a regression introduced in HTTP protocol. 2010-12-02 17:32:02 +02:00
source.c Added missing initializers. 2012-02-02 19:09:08 +02:00
source.h Added nid/tid/rid into the channel editor. 2010-03-04 18:22:28 +02:00
statistics.c Added cppcheck target into Makefile. 2011-06-15 17:49:15 +03:00
statistics.h Migration changes for git and UTF-8. 2008-08-23 08:15:30 +03:00
streamer.c Modified sectionfilters to use socket pair instead of filesystem fifos. 2009-10-01 18:48:28 +03:00
streamer.h Fixed remaining lint warnings. 2009-03-21 00:56:37 +02:00

This is an IPTV plugin for the Video Disk Recorder (VDR).

Written by:                  Rolf Ahrenberg
                             < R o l f . A h r e n b e r g @ s c i . f i >

                             Antti Seppälä
                             < a . s e p p a l a @ g m a i l . c o m >

Project's homepage:          http://www.saunalahti.fi/~rahrenbe/vdr/iptv/

Latest version available at: http://www.saunalahti.fi/~rahrenbe/vdr/iptv/

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
See the file COPYING for more information.

Requirements:

DVB compatible MPEG1/2 or H.264 network video streams.

Description:

This plugin integrates multicast IPTV transport streams seamlessly into
VDR. You can use any IPTV channel like any other normal DVB channel for
live viewing, recording, etc. The plugin also features full section
filtering capabilities which allow for example EIT information to be
extracted from the incoming stream.

Currently the IPTV plugin has direct support for both multicast UDP/RTP
and unicast HTTP MPEG1/2 transport streams. Also a file input method is
supported, but a file delay must be selected individually to prevent
VDR's transfer buffer over/underflow. Therefore the file input should be
considered as a testing feature only.

IPTV plugin also features a support for external streaming applications.
With proper helper applications and configuration IPTV plugin is able to
display not only MPEG1/2 transport streams but also other formats like
MP3 radio streams, mms video streams and so on.

Installation:

cd /put/your/path/here/VDR/PLUGINS/src
tar -xzf /put/your/path/here/vdr-iptv-X.Y.Z.tgz
ln -s iptv-X.Y.Z iptv
cd /put/your/path/here/VDR
cp -R PLUGINS/src/iptv/iptv /path/to/vdrconf/plugins/
make
make plugins
./vdr -P iptv

Setup menu:

- TS buffer size [MB] = 2          Defines ringbuffer size for transport
                                   stream in MB.
                                   Valid range: 1...4
- TS buffer prefill ratio [%] = 0  Defines prefill ratio for transport
                                   stream ringbuffer before data is
                                   transferred to VDR.
                                   Valid range: 0...40
- EXT protocol base port = 4321    Defines base port used in EXT protocol.
                                   The port range is defined by the number
                                   of IPTV devices (max. 8).
                                   Valid range: 0...65527
- Use section filtering = 1        Defines whether section filtering shall
                                   be used.
                                   Valid range: 0...1
- Disable filters = 0              Certain section filters might cause some
                                   unwanted behaviour to VDR such as time
                                   being falsely synchronized etc. This
                                   option allows creation of blacklists of
                                   ill-behaving filters. If this option is
                                   set to a non-zero value, the menu page
                                   will contain that many "Disable filter"
                                   options which allow you to disable the
                                   individual section filters.
                                   Valid range: 0...7
- [Blue:Info]                      Opens IPTV information/statistics menu.

Information menu:

- [Red:General]                    Opens the general information page.
- [Green:Pids]                     Opens the pid statistics page.
- [Yellow:Filters]                 Opens the section filter statistics page.
- [Blue:Bits/bytes]                Toggles between bits and bytes mode.

Configuration:

- channels.conf

  TV4;IPTV:40:S=1|P=0|F=EXT|U=iptvstream.sh|A=0:I:0:0:680:0:0:4:0:0:0
  TV3;IPTV:30:S=0|P=1|F=FILE|U=/video/stream.ts|A=5:I:0:514:670:2321:0:3:0:0:0
  TV2;IPTV:20:S=0|P=1|F=HTTP|U=127.0.0.1/TS/2|A=3000:I:0:513:660:2321:0:2:0:0:0
  TV1;IPTV:10:S=1|P=0|F=UDP|U=127.0.0.1|A=1234:I:0:512:650:2321:0:1:0:0:0
           ^  ^   ^   ^     ^           ^    ^
           |  |   |   |     |           |    Source type ("I")
           |  |   |   |     |           Stream parameter (multicast port
           |  |   |   |     |           number, HTTP port number, file delay
           |  |   |   |     |           (ms), script parameter)
           |  |   |   |     Stream address (multicast address, URL, file
           |  |   |   |     location, script location)
           |  |   |   Stream protocol ("UDP", "HTTP", "FILE", "EXT")
           |  |   Pid scanner ("0" disable, "1" enable)
           |  Section id (Sid/Nid/Tid) scanner ("0" disable, "1" enable)
           Unique enumeration

- UDP multicast rules for iptables firewall

  # Multicast UDP -packets
  iptables -A INPUT -i eth0 -p udp -d 224.0.0.0/4 --dport 1234 -j ACCEPT

  # IGMP required by multicasts
  iptables -A INPUT -i eth0 -p igmp -d 224.0.0.0/4 -j ACCEPT

External streaming:

- To watch an externally received channel add an EXT entry to channels.conf
  and specify a script name and parameter. The specified script is executed
  from plugin configuration directory when VDR tunes to the channel. The
  specified script parameter is passed to the script and it can be used to
  select for example between different URLs.

- When an EXT channel is opened the IPTV plugin opens an UDP listening port
  on the localhost. The external script is responsible for supplying IPTV
  plugin with MPEG2 TS data in UDP/RTP format to the listening port. The
  data will be processed in VDR like a normal DVB broadcast. The listening
  base port can be specified in the plugin configuration menu.

- Each IPTV device has different listen port. The port number is specified
  as a base port number plus IPTV device index minus one. Maximum of 8 IPTV
  devices can be used simultaneously.

- IPTV plugin includes an example script which uses VLC media player for
  receiving streams, transcoding and handing the result to IPTV plugin.

Notes:

- Working EIT requires correct Nid/Tid/Sid values as the NIT filter cannot
  determine the type (satellite/cable/terrestrial) of the IPTV transport
  stream.

- The following section filters are recommended to be disabled:
  "NIT (0x40)", "SDT (0x42)", "TDT (0x70)"

- The IPTV devices look for a "/tmp/vdr-iptv<devicenumber>.dvr" fifo at
  startup. If the fifo is found and succesfully opened, the device writes
  the current data stream into it. This can be used for debugging purposes.

- Multiple channels with identical service id should have frequency
  difference of 4 or greater. It's recommended to use frequencies in decades
  (10, 20, 30, 40, ...) for all IPTV channel entries.

- VLC processes won't get killed on some setups with the provided iptvstream.sh
  script and the iptvstream-notrap.sh script should be used instead in these
  cases.

- If received MPEG-2 TS streams carry CA descriptors, you'll have to apply
  "disable_ca_updates" patch to the VDR in order to get rid of "Channel not
  available" messages.

- EIT scanning functionality can be disabled for all IPTV channels by applying
  the "disable_eitscan" patch to the VDR.

- Source address validation can be enabled for UDP protocol separated by 
  adding the source address after a ';' character: "U=239.192.0.1;239.192.0.2"

- Section id and pid scanners should be disabled after the correct data is
  found. This can be made via VDR's channel editor.

Acknowledgements:

- The IPTV section filtering code is derived from Linux kernel.

- The pid scanning code is derived from Udo Richter's streamplayer plugin.