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

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...

Impressed with Poly brand for conference headphones

I previously used my Sony XM4 headphones for calls and initially found them versatile for multiple purposes. However, as my meetings extended to several hours, I noticed they became less comfortable. To address this, I upgraded to wireless headphones from Poly, which offer significantly improved comfort. While I don’t plan to use them for music listening, my initial impression is very positive.

Flapping LDP/RSVP on Olive

I had a strange problem where the LDP and RSVP was flapping on JunOS/Olive and I think I managed to fix it by changing the driver from e1000 to i82559er and lo0.0 with 127.0.0.1.  I don't want to spend more time investigating it but if someone have similar problem at least this comment could be a good start. root@jr2>  *** MPLS *** May 21 14:27:21.472443 Session 4.4.4.4 hold timer expired in Operational state May 21 14:27:21.473451 Connection 4.4.4.4 state Open -> Closed May 21 14:27:21.473838 Session 4.4.4.4 GR state Operational -> Nonexistent May 21 14:27:21.473923 Session 4.4.4.4 state Operational -> Closing May 21 14:27:21.474054 LDP session 4.4.4.4 is down, reason: hold time expired May 21 14:27:21.474364 RPD_LDP_SESSIONDOWN: LDP session 4.4.4.4 is down, reason: hold time expired May 21 14:27:21.475567 Session 4.4.4.4 state Closing -> Nonexistent May 21 14:27:21.476180 CHANGE   317024 /52          nhid ...