Protocols in IPTV
Protocols in IPTV
Manish Das
Manish Das
Video encoding
Video encoding
Video in its most basic form is a sequence of images, whichVideo in its most basic form is a sequence of images, which are displayed in a sequential order. The technical term for one are displayed in a sequential order. The technical term for one of these video images is “a frame.” The human eye in general of these video images is “a frame.” The human eye in general can comfortably watch TV at around 25 frames per second can comfortably watch TV at around 25 frames per second (fps).
(fps).
Devices called video encoders are used to compress videoDevices called video encoders are used to compress video content contained in each of the frames, while maintaining a content contained in each of the frames, while maintaining a high level of picture quality.
high level of picture quality.
Standard practice is to use Motion Picture Expert GroupStandard practice is to use Motion Picture Expert Group (MPEG) encoding.
(MPEG) encoding.
Video encoding
Video encoding
MPEG uses three fundamental techniques to
MPEG uses three fundamental techniques to achieve compression:achieve compression:
S
Suubbssaammpplliinngg RReedduuccees s ccoolloouur r iinnffoorrmmaattiioon n wwhhiicchh is less sensitive to eye
is less sensitive to eye S
Sppaattiiaal cl coommpprreessssiioonn RReemmoovvees res redduunnddaannt it innffoormrmaattiioonn within frames using the property within frames using the property that
that pixels pixels within within a a single single frameframe are related to their
are related to their neigboursneigbours Tem
Temporporal compal compressressionion ReRemovmoves redues redundndant infant informormatiationon between frames
Video encoding
Video encoding
Compression achieved: Compression achieved:
C
Cooddiinng g vveerrssiioonn SSDDTTVV HHDDTTVV M
MPPEEGG--22 33..5 5 MMbbppss 1199..3 3 MMbbppss M
Video packetising
Video packetising
In order for the elementary streams to be
In order for the elementary streams to be
transmitted over the digital network, each
transmitted over the digital network, each
elementary stream is converted into an
elementary stream is converted into an
interleaved stream of time stamped Packetized
interleaved stream of time stamped Packetized
Elementary Stream (PES) packets.
Elementary Stream (PES) packets.
A PES packet may be a fixed (or variable) sized
A PES packet may be a fixed (or variable) sized
block, with up to 65536 bytes per packet. This
block, with up to 65536 bytes per packet. This
includes an allocation of 6 bytes for the header
includes an allocation of 6 bytes for the header
with the remainder of the packet used to carry
with the remainder of the packet used to carry
content.
MPEG Transport Stream (TS) construction
MPEG Transport Stream (TS) construction
The next layer deals with building a transport
The next layer deals with building a transport
stream, which consists of a continuous stream of
stream, which consists of a continuous stream of
packets.
packets.
These packets, commonly called TS packets, are
These packets, commonly called TS packets, are
formed by breaking up the PES packets into
formed by breaking up the PES packets into
fixed-sized TS packets of 188 bytes
sized TS packets of 188 bytes
..
Each TS packet comprises 184 bytes of payload
Each TS packet comprises 184 bytes of payload
and a 4 byte header.
MPEG Stream Encoder Flow
MPEG Transport Stream (TS)
MPEG Transport Stream (TS)
Header (4
Header (4
bytes)
bytes)
Video Payload (184 bytes)
Video Payload (184 bytes)
188 bytes 188 bytes
Formation of IP Packets
Formation of IP Packets
Once the TS has been structured and formatted it is passedOnce the TS has been structured and formatted it is passed down to either the transport layer (UDP) directly or a layer down to either the transport layer (UDP) directly or a layer that uses the Real-Time Transport Protocol (RTP).
that uses the Real-Time Transport Protocol (RTP).
RTP delivers end-to-end streams of audio and video byRTP delivers end-to-end streams of audio and video by encapsulating the content into a particular format called a encapsulating the content into a particular format called a packet. Each packet consists of a header and the payload packet. Each packet consists of a header and the payload IPTV data.
IPTV data.
To improve bandwidth efficiency, the payload typicallyTo improve bandwidth efficiency, the payload typically includes seven MPEG-TS packet.
RTP encapsulation
RTP encapsulation
RTP Header RTP Header (12 bytes) (12 bytes) MPEG TS MPEG TS (188 (188 bytes) bytes) MPEG TS MPEG TS (188 (188 bytes) bytes) MPEG TS MPEG TS (188 (188 bytes) bytes) MPEG TS MPEG TS (188 bytes) (188 bytes) MPEG TS MPEG TS (188 bytes) (188 bytes) MPEG TS MPEG TS (188 (188 bytes) bytes) MPEG MPEG TS TS (188 (188 bytes) bytes)Formation of IP Packets: Transport Layer
Formation of IP Packets: Transport Layer
RTP packets form the input to the trRTP packets form the input to the transport layer UDPansport layer UDP or TCP.
or TCP.
It is also possible to map MPEGTS packets directly intoIt is also possible to map MPEGTS packets directly into
the transport layer protocol
the transport layer protocol payload. This effectivelypayload. This effectively avoids the RTP layer completely. But a
avoids the RTP layer completely. But a number of number of service providers use RTP to
service providers use RTP to address the inherentaddress the inherent unreliabil
unreliability of ity of the UDP protocol.the UDP protocol.
In the context of IPTV, UDP is In the context of IPTV, UDP is useful when a datauseful when a data
center needs to send IP video content to multiple users center needs to send IP video content to multiple users and is the
and is the most popular transport level protocolmost popular transport level protocol employed by IPTV service providers.
employed by IPTV service providers.
An RTP header is identifiable with a value of 5004 in aAn RTP header is identifiable with a value of 5004 in a User Datagram Protocol (UDP) header.
UDP encapsulation
UDP encapsulation
UDP Header UDP Header (8 bytes) (8 bytes) RTP Header RTP Header (12 bytes) (12 bytes) Optional Optional 7 X MPEG TSWhy UDP?
Why UDP?
IPTV is a real-time application and does not IPTV is a real-time application and does not tolerate delays. TCP can often introducetolerate delays. TCP can often introduce latency into the delivery of
latency into the delivery of IP video content due to fact that IP video content due to fact that the protocol employs flowthe protocol employs flow control mechanisms.
control mechanisms.
UDP ensures that UDP ensures that delivery of IPTV content delivery of IPTV content is not delayed even if theris not delayed even if there is delayed or e is delayed or damaged packets contained in the network traffic, whereas in using TCP, TV viewers damaged packets contained in the network traffic, whereas in using TCP, TV viewers are faced with a pause as
are faced with a pause as they wait for a delayed packet they wait for a delayed packet or picture frame to arrive or or picture frame to arrive or wait for the damaged packet to be replaced.
wait for the damaged packet to be replaced.
Low overhead: The size of the header is only Low overhead: The size of the header is only 8 bytes when compared to the TCP8 bytes when compared to the TCP header, which occupies 20 bytes of
header, which occupies 20 bytes of data.data.
Speedy connection setup: The Speedy connection setup: The establishment and teardown of connections betweenestablishment and teardown of connections between IPTVCDs (set top box) and IPTV data center networking components takes place in IPTVCDs (set top box) and IPTV data center networking components takes place in a very short time period. Therefore, the delivery of video packets using the UDP a very short time period. Therefore, the delivery of video packets using the UDP protocol is generally quicker compared to using the TCP protocol.
protocol is generally quicker compared to using the TCP protocol.
Easy implementation: From a technical perspective UDP is pretty easy to iEasy implementation: From a technical perspective UDP is pretty easy to i mplementmplement because it is
because it is not required to keep track of video packets once not required to keep track of video packets once they are sent onto thethey are sent onto the IP network.
The IP Layer
The IP Layer
Next task is IP
Next task is IP encapsulation.
encapsulation.
20 byte header is added to the payload.
20 byte header is added to the payload.
IPv4 IPv4 Header Header (20 bytes) (20 bytes) UDP UDP Header Header (8 bytes) (8 bytes) RTP Header RTP Header (12 bytes) (12 bytes) Optional Optional
7 X MPEG TS Packets (188 bytes)
To Recapitulate
Now the delivery mechanism
Now the delivery mechanism
In standard broadcast systems all of the normal
In standard broadcast systems all of the normal
broadcast channels are delivered to the STB in
broadcast channels are delivered to the STB in
the home (via Cable, Satellite or Terrestrial).
the home (via Cable, Satellite or Terrestrial).
There could be hundreds of channels, all of
There could be hundreds of channels, all of
which are delivered simultaneously. The STB
which are delivered simultaneously. The STB
tunes to the desired channel in response to
tunes to the desired channel in response to
requests from the viewer’s remote control.
requests from the viewer’s remote control.
Now the delivery mechanism
Now the delivery mechanism
In order to preserve bandwidth over the final link
In order to preserve bandwidth over the final link
to the house, IPTV systems are
to the house, IPTV systems are designed to
designed to
deliver only the requested channel to the STB.
deliver only the requested channel to the STB.
In order to
In order to change channels, special commands
change channels, special commands
are sent into the Access network requesting a
are sent into the Access network requesting a
change of channel.
change of channel.
Thus in IPTV systems the channel
Thus in IPTV systems the channel change is
change is
made in the network and not on the local STB.
made in the network and not on the local STB.
Now the delivery mechanism
Now the delivery mechanism
IP communication is normally one to one – unicast.IP communication is normally one to one – unicast.
This method of communications is not effective for This method of communications is not effective for
delivering traditional broadcast style channels because delivering traditional broadcast style channels because the duplication of point-to-point sessions would
the duplication of point-to-point sessions would overwhelm the network.
overwhelm the network.
So IPTV uses multicast to provide a single So IPTV uses multicast to provide a single broadcast TVbroadcast TV channel to multiple clients
channel to multiple clients simultaneously.simultaneously.
The primary purpose of multicast technologies is toThe primary purpose of multicast technologies is to ensure that end users are able
ensure that end users are able to instantaneously andto instantaneously and reliably switch channels during a TV
Features of IP Multicast in IPTV network
Features of IP Multicast in IPTV network
Only a single copy of every video stream needs to beOnly a single copy of every video stream needs to be
sent to a router,
sent to a router, which in turn makes a copy of which in turn makes a copy of thatthat stream for
stream for the requesting devices.the requesting devices.
Multicast not only reduce the Multicast not only reduce the bandwidth requiremenbandwidth requirements of ts of
the network but the processing power of the content the network but the processing power of the content server can also be kept relatively low because it only server can also be kept relatively low because it only transmits one copy of an IPTV stream
transmits one copy of an IPTV stream at a time.at a time.
But it increases the But it increases the workload and processingworkload and processing
requirements of routers as
requirements of routers as they handle additional tasksthey handle additional tasks such as replicating video streams and keeping track of such as replicating video streams and keeping track of multiple copies of video packets. Processing the various multiple copies of video packets. Processing the various tasks associated with IP
tasks associated with IP multicasting adds a significantmulticasting adds a significant burden to the workload of IP routers.
A simple example
A simple example
•• multiple unicasts
multiple unicasts
•• IP multicastIP multicastS S SS R R R R R R R R
Channel zapping in IPTV
Channel zapping in IPTV
Every channel has a multicast group IP address.
Every channel has a multicast group IP address.
Internet Group Management Protocol (IGMP) is
Internet Group Management Protocol (IGMP) is
used for zapping channels.
used for zapping channels.
IGMP v2 is widely used in IPTV.
IGMP v2 is widely used in IPTV.
Whenever an end user changes a channel, t
Whenever an end user changes a channel, the
he
SETOPBOX responds by sending two
SETOPBOX responds by sending two
commands to the central equipment:
commands to the central equipment:
(1) To leave the existing video multicast.
(1) To leave the existing video multicast.
(2) To join the desired new video multicast.
(2) To join the desired new video multicast.
IGMP message format
Encapsulation of IGMP packet
Typical IPTV System: Selection of first channel
Typical IPTV System: Selection of first channel
Transport Transport H Heeaaddeenndd AAcccceessss HHoommee Transport Transport Network
Network xDSL CPE/xDSL CPE/ FTTH FTTH Computer Computer STB STB IGMP IGMP Router Router MPEG MPEG Encoders Encoders Apps Apps Servers Servers IGMP DSLAM IGMP DSLAM Video Video Servers Servers Other Other Content Content Sources Sources VoIP VoIP Subscriber Subscriber presses presses channel channel number number The IP set-top box
The IP set-top box accepts the channel accepts the channel request command request command
and sends this and sends this instruction in the form instruction in the form
of an IGMP of an IGMP join join request to the request to the DSLAM. DSLAM. IGMP JOIN IGMP JOIN
DSLAM examines the DSLAM examines the request to see if the request to see if the requested channel requested channel already exists at one of already exists at one of
its ports. If this is the its ports. If this is the case, then the DSLAM case, then the DSLAM
simply copies the simply copies the stream and sends to stream and sends to the requesting device. the requesting device.
If the requested channel If the requested channel is not available in the is not available in the
IGMP JOIN
IGMP JOIN
Router examines the Router examines the request to see if the request to see if the requested channel requested channel already exists at one of already exists at one of
its ports. If this is the its ports. If this is the case, then the Router case, then the Router
simply copies the simply copies the stream and sends to stream and sends to the requesting device the requesting device If the requested If the requested channel is not channel is not available in the available in the Router, the request Router, the request is sent to the is sent to the upstream routers. upstream routers. IGMP JOIN IGMP JOIN Video Stream Video Stream
The request for the The request for the channel finally ends up channel finally ends up at the IPTV data center at the IPTV data center
where all broadcast where all broadcast channels are available. channels are available. The IP address of the The IP address of the subscriber’s IP set-top subscriber’s IP set-top box get added to the box get added to the multicast list. The multicast list. The channel is then copied channel is then copied and sent onward to the and sent onward to the
IP set-top box. IP set-top box.
Channel selection: Possible steps that may occur
Channel selection: Possible steps that may occur
across a DSL based IPTV network
across a DSL based IPTV network
Once a subscriber wishes to select a channel they press a channel number Once a subscriber wishes to select a channel they press a channel number on their remote control or select from an EPG application. These commands on their remote control or select from an EPG application. These commands are received by the infrared receiver.
are received by the infrared receiver.
The IP set-top box accepts the channel changing command and sends thisThe IP set-top box accepts the channel changing command and sends this instruction in the form of an IGMP
instruction in the form of an IGMP join join request to the DSLAM. The DSLAMrequest to the DSLAM. The DSLAM sees the request and will either pass onward or else examine the request to sees the request and will either pass onward or else examine the request to see if the requested channel already exists at one of its ports. If this is the see if the requested channel already exists at one of its ports. If this is the case, then the DSLAM simply copies the stream and sends to the requesting case, then the DSLAM simply copies the stream and sends to the requesting device.
device.
If the requested channel is not available in the DSLAM, the request is sent toIf the requested channel is not available in the DSLAM, the request is sent to the upstream routers.
the upstream routers.
When the router located at the regional office receives a request that has notWhen the router located at the regional office receives a request that has not been serviced by the various downstream network components, it also has been serviced by the various downstream network components, it also has two options, namely, to copy the stream to the correct interface or pass the two options, namely, to copy the stream to the correct interface or pass the request upstream to the distribution router in the event that the channel is request upstream to the distribution router in the event that the channel is unavailable at its downstream interface.
Channel selection: Possible steps that may occur
Channel selection: Possible steps that may occur
across a DSL based IPTV network
across a DSL based IPTV network
The request for the channel finally ends up at The request for the channel finally ends up at the IPTV data center wherethe IPTV data center where all broadcast channels are available. It is important to note t
all broadcast channels are available. It is important to note that thehat the channel is generally identified by an IP address. The IP
channel is generally identified by an IP address. The IP address of theaddress of the subscriber’s IP set-top box get added to the multicast list. The channel is subscriber’s IP set-top box get added to the multicast list. The channel is then copied and sent onward to the IP
then copied and sent onward to the IP set-top box.set-top box.
The set-top receives the new IP stream. It then buffers in memory, andThe set-top receives the new IP stream. It then buffers in memory, and waits for an I-frame to arrive before decoding starts. The I-frame contains waits for an I-frame to arrive before decoding starts. The I-frame contains all of the necessary information required to reconstr
all of the necessary information required to reconstruct the original pictureuct the original picture frame. Once the I-frame is received the IP set-top box, which can take frame. Once the I-frame is received the IP set-top box, which can take between a half and two full seconds, can s
between a half and two full seconds, can start the process of tart the process of displayingdisplaying the channel.
the channel.
The first picture frame of the new channel is displayed on the TV The first picture frame of the new channel is displayed on the TV display.display. Note that the ITU-T FG IPTV group is recommending that the time taken Note that the ITU-T FG IPTV group is recommending that the time taken
Typical IPTV System: Change of channel
Typical IPTV System: Change of channel
Transport Transport H Heeaaddeenndd AAcccceessss HHoommee Transport Transport Network
Network xDSL CPE/xDSL CPE/ FTTH FTTH Computer Computer STB STB IGMP IGMP Router Router Digital and Digital and Analog Analog Receivers Receivers MPEG MPEG Encoders Encoders Apps Apps Servers Servers IGMP DSLAM IGMP DSLAM Video Video Servers Servers Other Other Content Content Sources Sources VoIP VoIP Subscriber Subscriber changes changes channel channel number number IGMP JOIN IGMP JOIN Video Stream Video Stream IGMP LEAVE IGMP LEAVE
The set-top box issues The set-top box issues an IGMP
an IGMP LeaveLeave message to terminate message to terminate the stream associated the stream associated with the old stream. with the old stream. The The termination of termination of the stream the stream takes place in takes place in the DSLAM. the DSLAM. A join A join message is message is then sent to then sent to start viewing start viewing the next the next channel. channel.
Channel change: Possible steps that may occur
Channel change: Possible steps that may occur
across a DSL based IPTV network
across a DSL based IPTV network
The process involved in changing channels in the middle of the TV The process involved in changing channels in the middle of the TV
viewing experience is quite similar to
viewing experience is quite similar to selecting a channel. There isselecting a channel. There is
however a couple of extra steps: however a couple of extra steps:
When a viewer wants to When a viewer wants to change to another IPTV signal the remotechange to another IPTV signal the remote control button is pressed and the instruction is accepted by the IP control button is pressed and the instruction is accepted by the IP set-top box.
set-top box.
The set-top box issues an IGMPThe set-top box issues an IGMP LeaveLeave message to terminate themessage to terminate the stream associated with the old stream.
stream associated with the old stream.
The termination of the stream takes place The termination of the stream takes place in the DSLAM.in the DSLAM.
Session
Session
Announcement Protocol (SAP
Announcement Protocol (SAP)
)
Session Announcement Protocol (SAPSession Announcement Protocol (SAP) is used to) is used to
inform multicast enabled receivers periodically about inform multicast enabled receivers periodically about programs currently being multicast on a
programs currently being multicast on a network.network.
The most important part of a SAP message is theThe most important part of a SAP message is the
multicast address of the multicast stream. Once the user multicast address of the multicast stream. Once the user device has this address, it can send a
device has this address, it can send a request to therequest to the network to join that
network to join that multicast.multicast.
By default, SAP communications always take place onBy default, SAP communications always take place on the multicast group address 224.2.127.254 on port
the multicast group address 224.2.127.254 on port
9875. Specialized software on the user device converts 9875. Specialized software on the user device converts the information received from SAP into a
the information received from SAP into a list of choiceslist of choices from which the user can select.
MULTICASTING IPTV content across IPV6
MULTICASTING IPTV content across IPV6
networks
networks
IPv6 deployment requires service providers to
IPv6 deployment requires service providers to
use a multicasting signaling protocol called
use a multicasting signaling protocol called
Multicast Listener Discovery (MLD) when
Multicast Listener Discovery (MLD) when
delivering broadcast TV channels to IPTV end
delivering broadcast TV channels to IPTV end
users.
users.
D DSSLLAAM M # # 11 DDSSLLAAM M # # 22 DDSSLLAAM M # # 33 DDSSLLAAM M # # 44 T T22 TT22 T1 T1
Multicast TV
Multicast TV
Multicast TV
Multicast TV
TV TV TV TV IGMP IGMP JOIN JOIN BNG BNG Video Server Video ServerTime-shift TV
Time-shift TV
Video on Demand (VoD)
Video on Demand (VoD)
VoD is unicast delivery and uses VoD is unicast delivery and uses RTSP.RTSP.
The Real Time Streaming ProtocolThe Real Time Streaming Protocol ((RTSPRTSP) is a) is a protocol for use in streaming media systems which protocol for use in streaming media systems which allows a client to r
allows a client to remotely control a streaming mediaemotely control a streaming media server, issuing VCR-like commands such as "play" and server, issuing VCR-like commands such as "play" and "pause", and allowing time-based access to files on a "pause", and allowing time-based access to files on a server
server
RTSP requests are based on RTSP requests are based on HTTP requestsHTTP requests
In RTSP we can distinguish followIn RTSP we can distinguish following requests:ing requests:
DESCRIBE, SETUP, PLAY, PAUSE, RECORD, DESCRIBE, SETUP, PLAY, PAUSE, RECORD, TEARDOWN.
TEARDOWN.
RTSP servers use RTP among other things the transportRTSP servers use RTP among other things the transport
protocol for the actual
protocol for the actual audio/videaudio/video data and o data and RTCP toRTCP to monitor quality of
Example:RTSP with UDP-Based RTP Delivery
Example:RTSP with UDP-Based RTP Delivery
DESCRIBEDESCRIBErtsp://192.168.1.25:554/mp rtsp://192.168.1.25:554/mp eg4/movies/3idiots.mpg eg4/movies/3idiots.mpg RTSP/1.0 RTSP/1.0 CSec: 101 CSec: 101 Accept: application/sdp Accept: application/sdp RTSP/1.0 200 RTSP/1.0 200 OK OK CSec: 101 CSec: 101 Content-Base: Content-Base: rtsp://192.168.1. rtsp://192.168.1. 25:554/mpeg4/m 25:554/mpeg4/m ovies/3idiots. ovies/3idiots. mpg mpg Content-Type: Content-Type: application/sdp application/sdp Content-Length: Content-Length: 320 320 <SDP <SDP Data...> Data...> OPTIONS OPTIONS rtsp://192.168.1.25:554/mp rtsp://192.168.1.25:554/mp eg4/movies/3idiots.mpg eg4/movies/3idiots.mpg CSec: 102 CSec: 102 RTSP/1.0 200 RTSP/1.0 200 OK OK CSec: 102 CSec: 102 Public: Public: DESCRIBE, DESCRIBE, OPTIONS, OPTIONS, PAUSE, PAUSE, PLAY, PLAY, SETUP, SETUP, TEARDOWN, TEARDOWN, ANNOUNCE ANNOUNCE SETUP SETUP rtsp://192.168.1.25:554/mp rtsp://192.168.1.25:554/mp eg4/movies/3idiots.mpg eg4/movies/3idiots.mpg CSeq: 103 CSeq: 103 Transport: Transport: RTP/UDP;unicast;client_p RTP/UDP;unicast;client_p ort=4042-4043 ort=4042-4043 RTSP/1.0 RTSP/1.0 200 OK 200 OK CSeq: 103 CSeq: 103 Session: Session: 1234567891; 1234567891; timeout=10 timeout=10 Transport: Transport: RTP/UDP;un RTP/UDP;un icast;mode= icast;mode= play; play; client_port=4 client_port=4 042-4043; 042-4043; server_port= server_port= 5072-5073 5072-5073 PLAY PLAY rtsp://192.168.1.25:554/m rtsp://192.168.1.25:554/m peg4/movies/3idiots.mpg peg4/movies/3idiots.mpg RTSP/1.0 RTSP/1.0 CSeq: 104 CSeq: 104 Session: 1234567891 Session: 1234567891 RTSP/1.0 RTSP/1.0 200 OK 200 OK CSeq: 104 CSeq: 104 Session: Session: 1234567891 1234567891 PAUSE PAUSE rtsp://192.168.1.25:554/m rtsp://192.168.1.25:554/m peg4/movies/3idiots.mpg peg4/movies/3idiots.mpg CSeq: 105 CSeq: 105 Session: 1234567891 Session: 1234567891 R R T TSSPP//11..00 220000 O OKK C CSSeeqq:: 110055 S Seessssiioonn:: 1 12233 4 45566 7 7889911 TEARDOWN TEARDOWN rtsp://192.168.1.25:554/m rtsp://192.168.1.25:554/m peg4/movies/3idiots.mpg peg4/movies/3idiots.mpg RTSP/1.0 RTSP/1.0 CSeq: 106 CSeq: 106 Session: 1234567891 Session: 1234567891 RTSP/1.0 200 RTSP/1.0 200 OK OK