Difference between revisions of "IPTV"

From MythTV Official Wiki
Jump to: navigation, search
m (Added link to FreeBox page)
(Emulation: url corrected.)
 
(33 intermediate revisions by 15 users not shown)
Line 1: Line 1:
IPTV is a name for a collection of technologies used to stream Television over the Internet. Essentially, it's the protocols RTC/RTCP or RTSP for streaming the video & audio, and SAP/SDP to announce the streams, all operating over UDP multicast.
+
[[Category:Glossary]]
 
+
{{Wikipedia}}
== Emulation ==
+
'''IPTV''' is a name for a collection of technologies used to stream Television over the Internet. It can refer to live media broadcasts and video on demand services.
Currently, there are a few implementations of SAP/SDP and RTP/RTCP that can be used to emulate being on an IPTV system. The most advanced version of this would be [http://www.videolan.org VideoLAN], which will take any kind of file it can open and will stream it over RTP/RTCP or RTSP (In version 8.3+), with automatic announcement over SAP/SDP.
 
 
 
== SAP/SDP ==
 
=== SAP ===
 
[http://www.faqs.org/rfc/rfc2974.txt SAP] is a method of sending "Session Announcements" over UDP Multicast. SAP uses Multicast address 224.2.127.254 port 9875 by default for sending announcements in the global scope.
 
  
A SAP announcement looks like this (Taken from the [http://www.faqs.org/rfc/rfc2974.txt RFC]):
+
= Differentiation and Support =
<pre>
+
Different live media transmission standards get called IPTV
    0                  1                  2                  3
+
* service discovery does not work at all (no support for SDP/SAP, DVB-IPTV SD&S, or others.)
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+
* [[DVB-IPTV]] (formerly DVB-IPI)
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
** live media broadcasts of TV and radio can be recorded by the backend.
  | V=1 |A|R|T|E|C|  auth len    |        msg id hash          |
+
** broadband content guide (epg) is not implemented. FIXME, Live media broadcasts with full SI might work.
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
* MPEG 2 SPTS over multicast (or almost DVB-IPTV. that's usually what your ISP serves you e.g. Freebox, MPEG2 TS Multicast on MBone)
  |                                                              |
+
** TV and radio can be recorded by the backend.
  :                originating source (32 or 128 bits)            :
+
** FIXME, Live media broadcasts with full SI might work.
  :                                                              :
+
* stuff thats at least somewhat close to some MPEG standard (MPEG Codecs via HTTP etc., think Shoutcast Radios)
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
** [[User_Manual:Setting_up_HTTP_Live_Streaming_Recorder|HTTP live streaming]] with MPEG 2 TS segments over HTTP is supported. Live media broadcasts can be recorded with the IPTVRecorder, on VOD services can be played with the internal player. (FIXME, how do you point the internal player to a video on demand stream?)
  |                    optional authentication data              |
+
** Other variants with raw elementary streams over HTTP can not be recorded directly, but radio streams can be played with MythMusic. Some can be remuxed by VideoLAN on demand into SPTS and fed into the backend.
  :                              ....                            :
+
* any other media streaming via IP Networks (basically stuff that does not fit into a MPEG2 SPTS, like ShoutcastTV)
  *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+
** can not be recorded directly. Some can be transcoded by VideoLAN on demand into SPTS and fed into the backend.
  |                      optional payload type                    |
 
  +                                        +-+- - - - - - - - - -+
 
  |                                        |0|                  |
 
  + - - - - - - - - - - - - - - - - - - - - +-+                  |
 
  |                                                              |
 
  :                            payload                            :
 
  |                                                              |
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  
  V: Version Number. The version number field MUST be set to 1 (SAPv2
+
= Emulation =
      announcements which use only SAPv1 features are backwards
+
Currently, there are a few implementations of SAP/SDP and RTP/RTCP that can be used to emulate being on an IPTV system.
      compatible, those which use new features can be detected by other
+
* [http://www.videolan.org VideoLAN], which will take any kind of stream it can open and will stream it over RTP/RTCP or RTSP. VideoLAN can be told to stream on demand so you can operate a full channel lineup without constantly consuming bandwidth to get a stream just to throw it away unwatched. [[User:Dekarl/How_to_remux_elementary_streams_to_look_like_a_Freebox|Draft Guide on live-on-demand]]
      means, so the SAP version number doesn't need to change).
+
* [http://mumudvb.net/ MumuDVB], allows you to build your own IPTV headend by converting full transports into a bunch of programs transmitted via multicast. [http://mumudvb.net/documentation/asciidoc/mumudvb-2.1.0/README.html#_mythtv MythTV specifics] are documented in their manual.
  
  A: Address type. If the A bit is 0, the originating source field
+
=Deployment Status=
      contains a 32-bit IPv4 address. If the A bit is 1, the
+
*Austria:
      originating source contains a 128-bit IPv6 address.
+
**[http://digitalitility.com/tutori-alitility/ubuntu-tutori-alitility/a1tv-und-mythtv/ A1 TV] - IPTV service of A1
 +
**[https://github.com/Bronkoknorb/a1tv-helpers A1 TV Helper scripts for MythTV]
 +
*Australia: [http://www.tpg.com.au/iptv/ TPG] and this useful [http://www.avenard.org/iptv/MythTV.html HOWTO]
 +
*Australia: [[TransACT]]
 +
*Canada: FIXME, see [[Sasktel IPTV]] (presumed DVB as that's what Alcatel delivers), and [[Fibreop]]
 +
*France: FIXME, see [[FreeBox]]
 +
*Germany: German ISP are required to provide public TV stations in DVB-IPTV compliant format if they want to provide them in their IPTV offering. [http://www.ard-digital.de/14027]
 +
** see [[Telekom Entertain on MythTV]] as an example
 +
*Private IPTV as a capture device [[IPTV Encoders as a Capture Device]]
 +
*Switzerland: All ISP which depend on the backbone of Swisscom VDSL/FTTH (so nearly any ISP on DSL or Fiber) have access to free Multicast flux for the free TV channels.
 +
** (it's the free channels from Bluewin's Swisscom TV light, Sunrise's TV basic, and probably other similar free TV plan with other ISP).
 +
** See [http://www.regardtv.net/t6105-flux-iptv-swisscom] for a full list of all Multicast addresses (compiled by volunteers).
 +
** streams are multicast so
 +
*** work only with Swiss ISP
 +
*** might have some trouble over WiFi depending on the modem and the smartphone/tablet's brands
 +
*USofA: FIXME, see [[SureWest IPTV]] (MPEG2)
  
  R: Reserved. SAP announcers MUST set this to 0, SAP listeners MUST
+
{{Note box|The [[FreeBox]] patch that's in {{Ticket|1704}} uses RTSP to receive IPTV streams from an ADSL box. However, this version uses a PLS "Playlist" provided by the box to discover channels, not SDP/SAP, thereby still needing a STB to tune. If we can make a version that uses SDP/SAP Discovery, this requirement will not be needed, and the "Tuner" can be made into a more generic "IPTV tuner".}}
      ignore the contents of this field.
 
 
 
  T: Message Type. If the T field is set to 0 this is a session
 
      announcement packet, if 1 this is a session deletion packet.
 
 
 
  E: Encryption Bit. If the encryption bit is set to 1, the payload of
 
      the SAP packet is encrypted.  If this bit is 0 the packet is not
 
      encrypted.  See section 7 for details of the encryption process.
 
 
 
  C: Compressed bit. If the compressed bit is set to 1, the payload is
 
      compressed using the zlib compression algorithm [3].  If the
 
      payload is to be compressed and encrypted, the compression MUST be
 
      performed first.
 
 
 
  Authentication Length. An 8 bit unsigned quantity giving the number
 
      of 32 bit words following the main SAP header that contain
 
      authentication data.  If it is zero, no authentication header is
 
      present.
 
 
 
  Authentication data containing a digital signature of the packet,
 
      with length as specified by the authentication length header
 
      field.  See section 8 for details of the authentication process.
 
 
 
  Message Identifier Hash. A 16 bit quantity that, used in combination
 
      with the originating source, provides a globally unique identifier
 
      indicating the precise version of this announcement.  The choice
 
      of value for this field is not specified here, except that it MUST
 
      be unique for each session announced by a particular SAP announcer
 
      and it MUST be changed if the session description is modified (and
 
      a session deletion message SHOULD be sent for the old version of
 
      the session).
 
 
 
      Earlier versions of SAP used a value of zero to mean that the hash
 
      should be ignored and the payload should always be parsed.  This
 
      had the unfortunate side-effect that SAP announcers had to study
 
      the payload data to determine how many unique sessions were being
 
      advertised, making the calculation of the announcement interval
 
      more complex that necessary.  In order to decouple the session
 
      announcement process from the contents of those announcements, SAP
 
      announcers SHOULD NOT set the message identifier hash to zero.
 
 
 
      SAP listeners MAY silently discard messages if the message
 
      identifier hash is set to zero.
 
 
 
  Originating Source. This gives the IP address of the original source
 
      of the message.  This is an IPv4 address if the A field is set to
 
      zero, else it is an IPv6 address.  The address is stored in
 
      network byte order.
 
 
 
      SAPv0 permitted the originating source to be zero if the message
 
      identifier hash was also zero.  This practise is no longer legal,
 
      and SAP announcers SHOULD NOT set the originating source to zero.
 
      SAP listeners MAY silently discard packets with the originating
 
      source set to zero.
 
</pre>
 
 
 
The standard announcement type for SAP is [http://www.faqs.org/rfc/rfc2327.txt SDP].
 
=== SDP ===
 
An SDP announcement looks like this:
 
 
 
v=  (protocol version)<br>
 
o=  (owner/creator and session identifier).<br>
 
s=  (session name)<br>
 
i=* (session information)<br>
 
u=* (URI of description)<br>
 
e=* (email address)<br>
 
p=* (phone number)<br>
 
c=* (connection information - not required if included in all media)<br>
 
b=* (bandwidth information)
 
 
 
One or more time descriptions (see below)
 
 
 
z=* (time zone adjustments)<br>
 
k=* (encryption key)<br>
 
a=* (zero or more session attribute lines)
 
 
 
Zero or more media descriptions (see below)
 
 
 
Time description<br>
 
t=  (time the session is active)<br>
 
r=* (zero or more repeat times)
 
 
 
Media description<br>
 
m=  (media name and transport address)<br>
 
i=* (media title)<br>
 
c=* (connection information - optional if included at session-level)<br>
 
b=* (bandwidth information)<br>
 
k=* (encryption key)<br>
 
a=* (zero or more media attribute lines)
 
 
 
==== Example ====
 
 
 
<pre>
 
v=0
 
o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
 
s=SDP Seminar
 
i=A Seminar on the session description protocol
 
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
 
e=mjh@isi.edu (Mark Handley)
 
c=IN IP4 224.2.17.12/127
 
t=2873397496 2873404696
 
a=recvonly
 
m=audio 49170 RTP/AVP 0
 
m=video 51372 RTP/AVP 31
 
m=application 32416 udp wb
 
a=orient:portrait
 
</pre>
 
For more information, please see the [http://www.faqs.org/rfc/rfc2327.txt RFC]
 
== RTP/RTCP ==
 
[http://www.faqs.org/rfcs/rfc1889.html RTP/RTCP]
 
== RTSP ==
 
[http://www.faqs.org/rfcs/rfc2326.html RTSP]
 
 
 
Note: The [[FreeBox]] patch that's in [http://svn.mythtv.org/trac/ticket/1704 Trac] uses RTSP to recieve IPTV streams from an ADSL box. However, this version uses a PLS "Playlist" provided by the box to discover channels, not SDP/SAP, thereby still needing a STB to tune. If we can make a version that uses SDP/SAP Discovery, this requirement will not be needed, and the "Tuner" can be made into a more generic "IPTV tuner".
 
 
 
[[Category:Glossary]]
 

Latest revision as of 17:15, 31 October 2017

Wikipedia-logo-en.png
Wikipedia has an article on:

IPTV is a name for a collection of technologies used to stream Television over the Internet. It can refer to live media broadcasts and video on demand services.

Differentiation and Support

Different live media transmission standards get called IPTV

  • service discovery does not work at all (no support for SDP/SAP, DVB-IPTV SD&S, or others.)
  • DVB-IPTV (formerly DVB-IPI)
    • live media broadcasts of TV and radio can be recorded by the backend.
    • broadband content guide (epg) is not implemented. FIXME, Live media broadcasts with full SI might work.
  • MPEG 2 SPTS over multicast (or almost DVB-IPTV. that's usually what your ISP serves you e.g. Freebox, MPEG2 TS Multicast on MBone)
    • TV and radio can be recorded by the backend.
    • FIXME, Live media broadcasts with full SI might work.
  • stuff thats at least somewhat close to some MPEG standard (MPEG Codecs via HTTP etc., think Shoutcast Radios)
    • HTTP live streaming with MPEG 2 TS segments over HTTP is supported. Live media broadcasts can be recorded with the IPTVRecorder, on VOD services can be played with the internal player. (FIXME, how do you point the internal player to a video on demand stream?)
    • Other variants with raw elementary streams over HTTP can not be recorded directly, but radio streams can be played with MythMusic. Some can be remuxed by VideoLAN on demand into SPTS and fed into the backend.
  • any other media streaming via IP Networks (basically stuff that does not fit into a MPEG2 SPTS, like ShoutcastTV)
    • can not be recorded directly. Some can be transcoded by VideoLAN on demand into SPTS and fed into the backend.

Emulation

Currently, there are a few implementations of SAP/SDP and RTP/RTCP that can be used to emulate being on an IPTV system.

  • VideoLAN, which will take any kind of stream it can open and will stream it over RTP/RTCP or RTSP. VideoLAN can be told to stream on demand so you can operate a full channel lineup without constantly consuming bandwidth to get a stream just to throw it away unwatched. Draft Guide on live-on-demand
  • MumuDVB, allows you to build your own IPTV headend by converting full transports into a bunch of programs transmitted via multicast. MythTV specifics are documented in their manual.

Deployment Status

  • Austria:
  • Australia: TPG and this useful HOWTO
  • Australia: TransACT
  • Canada: FIXME, see Sasktel IPTV (presumed DVB as that's what Alcatel delivers), and Fibreop
  • France: FIXME, see FreeBox
  • Germany: German ISP are required to provide public TV stations in DVB-IPTV compliant format if they want to provide them in their IPTV offering. [1]
  • Private IPTV as a capture device IPTV Encoders as a Capture Device
  • Switzerland: All ISP which depend on the backbone of Swisscom VDSL/FTTH (so nearly any ISP on DSL or Fiber) have access to free Multicast flux for the free TV channels.
    • (it's the free channels from Bluewin's Swisscom TV light, Sunrise's TV basic, and probably other similar free TV plan with other ISP).
    • See [2] for a full list of all Multicast addresses (compiled by volunteers).
    • streams are multicast so
      • work only with Swiss ISP
      • might have some trouble over WiFi depending on the modem and the smartphone/tablet's brands
  • USofA: FIXME, see SureWest IPTV (MPEG2)


Important.png Note: The FreeBox patch that's in #1704 uses RTSP to receive IPTV streams from an ADSL box. However, this version uses a PLS "Playlist" provided by the box to discover channels, not SDP/SAP, thereby still needing a STB to tune. If we can make a version that uses SDP/SAP Discovery, this requirement will not be needed, and the "Tuner" can be made into a more generic "IPTV tuner".