Skip to main content

MPEG-2 Transport Streams

Pro MPEG Forum CoP3 or SMPTE 2022


Introduction

Pro-MPEG Forum Code of Practice #3 release 2
(CoP3) or SMPTE 2022-2007, describe how MPEG-2 Transport Streams (MPEG-2 TS) should be encapsulated when sent over IP networks. It also describes a forward error correction (FEC) mechanism that can be used to correct errors than can occur during the transport. This article will explain how video content can be sent over IP networks and how errors can be corrected using CoP3 FEC.

ASI to IP

All MPEG-2 transport streams shall be encapsulated in RTP (Real-time Transport Protocol) according to RFC 1889 in conjunction with RFC 2250. Transport service is provided jointly by UDP (checksum and multiplexing) and RTP (sequencing and time stamping / jitter removing). RTP always uses an even UDP port number.

Mpeg-2 TS packets into RTP packets

For most streams, the RTP/UDP/IP overhead of 40 bytes per RTP packet is relatively low (for example 3% with a 1 316 byte payload).

.UDP and RTP headers

IP packets can carry from 1 to 7 TS packets, knowing that:
  • The overall size of RTP payload must not exceed the MTU (Maximum Transfer Unit) in order to prevent RTP packets fragmentation around the network
  • Short packets induce high overhead
There is no requirement for every RTP packet in a stream to contain the same number of transport stream packets. The receiver should use the length field in the UDP header to determine the number of transport stream packets contained in each RTP packet.

The time stamp field in the RTP header is based on the PCR values from MPEG-2 with a resolution of 90 Khz.

Streams must include:
  • Program Association Table (PAT)
  • Program Map Table (PMT)
Other tables are optional. SI (Service Information) is intended to be delivered via separate IP streams, e.g. in XML format.

RTCP (Real-time Transport Control Protocol) can be included to periodically inform the sending side about network quality (e.g. lost packets, delay, jitter, etc.).

At the output of the IP network, the delivered Transport Stream must be fully ISO/IEC 13818-1 compliant (40ms maximum jitter, 1 artifact every hour, etc.).

What about error protection ?

Code of Practice #3 describes a Forward Error Correction (FEC) method for protection against errors in delivering professional MPEG-2 TS data over IP networks. With that method implemented in IP video gateays, packet errors, out of order packets, network jitter and delay can be compensated.

FEC data insertion is done in real-time along with TS over IP encapsulation: Protection data is calculated and embedded in regular RTP packets with a specific payload type.
It relies on simple XOR arithmetics:
if F=A B C, then if only A,B,F are present, C can be recovered.

A FEC matrix is generated and transmitted on two separate UDP ports:
FEC columns on UDP port + 2
FEC rows on UDP port + 4

Forward Error Correction (FEC) packets for CoP3

FEC Matrix is computed as follows:

FEC matrix computation

FEC packets can be computed for both columns and lines. One FEC packet is able to recover one lost RTP packet in a column/row. If several packets are lost in the same column for instance, FEC packet for rows can be used to re-generate the packet.

Popular posts from this blog

Juniper IS-IS summary

##################################################################################################### ## ISIS ##################################################################################################### # Be sure to set family iso on the interface to be placed into ISIS set interfaces <interface> family iso # By default Junos places interfaces as L1/L2 # Default route leaking:         L1 to L2 - all internal routes         L2 to L1 - 0/0 route # L1/L2 will send the attached-bit down to L1 and it will act as a NSSA-like area.  When the L1 interface # receives the attached-bit it will inject a 0/0 route into the RIB point to the L1/L2 interface. # To disable the attached bit use: set protocols isis ignore-attached-bit # Be careful with the "interface all" command, as it may have some unexpected consequences such as trying # to establish a neighbor on your fxp0 management...

IOS on Unix (IOU)

source http://evilrouters.net/2011/01/18/cisco-iou-faq/ What is IOU? From the Cisco Engineering Education web site (a long time ago): IOS on Unix (IOU) is a fully working version of IOS that runs as a user mode UNIX (Solaris) process. IOU is built as a native Solaris image and run just like any other program. IOU supports all platform independent protocols and features. What operating systems does IOU run on? It is my understanding that, initially, IOU was Solaris (SPARC) only. Nowadays, however, there are also builds for OS X and Linux. Similar to dynamips, IOU allows you to build out a network topology on a computer, without the need for physical routers. This is useful for validating designs, proof-of-concept testing, and certification self-study. Is my system compatible with IOU? You will need to be running the operating system that your IOU image were built for, obviously. Other than that, there are no special requirements to run IOU. It is not very CPU- or memory-intensive, unlik...

Beijing - China

I am not sure how to describe Beijing China, maybe everyone who goes their simply use the world 'Amazing' because it will be nearly impossible to describe it. I had a personal driver and tour guide which significantly simplify my trip around.  Of course, it was a business trip and I didn't have as much time as I needed to see everything from Beijing but I will try to share couple of pictures and some of my impressions. I will start with the food.  I remember when I was younger there was so many Chines restaurants in the neighbourhood and I could eat Chines food everyday, and at every time - my parents were joking that I will became a Chines if I continue to eat only Chines, but it was so good and I didn't care ;-)  In Beijing I tried so many different things and I am amazed by the quality of the food, and most amazingly I didn't have any problems with my stomach - which was a good sign ;-) . I uploaded few photos from my album, which are from different places I ...