An Introduction To IP Video and Precision Time Protocol - : White Paper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

An Introduction to IP Video and

Precision Time Protocol


––
WHITE PAPER
WHITE PAPER

It’s hard to attend a broadcast industry trade show or read


industry news without seeing much discussion about the
enormous technological changes in the works that will impact
the broadcast industry over the next few years. Some changes
such as 4K/UHDTV, High Dynamic Range and High Frame Rate
video could be regarded as evolutionary, but the transition to
an all IP video workflow is regarded by many as a revolutionary
and disruptive technology change that will demand entirely new
skillsets and infrastructure.

The migration to IP will impact everyone across the broadcast


chain to varying degrees, including content producers,
broadcasters, content providers, content distributors and
FIGURE 1.
equipment manufacturers. However, possibly the biggest
impact will be to live production workflows.

Although many see IP Video as new technology, in fact in video production. These new workflows in turn are likely to lead to
distribution workflows, the transition from ASI to IP began new types of content to provide to viewers and with it new
almost 15 years ago and IT technology began to enable the sources of revenue. One aspect of using IP for transporting
transition to file-based workflows more than 10 years ago. In video that is often overlooked is that scalability is no longer
fact production is the last remaining stronghold for SDI and that a function of port density, but instead is merely a function of
is set to change. It is reasonable to ask why SDI remains in use bandwidth.
in live production workflows. The answer is that the technology
works very well indeed, giving outstanding image quality, with Having said this, IP does bring with it some challenges,
extremely low levels of jitter and latency as well as offering including jitter; latency; the risk of dropped packets, an inherent
an extremely “thin” unidirectional protocol that is extremely lack of synchronicity along with asymmetry which results in
easy to deploy and which makes frame accurate switching different path delays upstream and downstream. However all
inherently simple. In addition SDI is an open, non-proprietary the above are surmountable, but it does not change the fact
and universally supported standard. that IP is a complex set of bi-directional protocols requiring
a knowledge of both the source and destination before
So why would we want to move to using IP? The most deployment. It is often thought that transporting uncompressed
commonly quoted reasoning is the ability to use Commercially or lightly compressed video is the most difficult application for
Off-The-Shelf (COTS) IT-based infrastructure, which takes IP, but in fact it could be easily argued that trading floors, where
advantage of the economies of scale of the IT industry time is money demand even greater levels of performance.
when compared with the relatively small broadcast industry. Switches intended for trading room applications typically offer
In addition it offers advantages of reducing cabling cost latencies less than 250 ns, which offers more than enough
and weight. All this certainly true, but probably the biggest performance for IP video applications, where timing accuracy is
advantage is the much greater routing flexibility offered along typically around 1 µs.
with enabling new workflows such as downstream/centralized

2 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

The Application of Standards ST 2059-1 and 2059-2. Likewise, there is an AES67-2015 PTP
profile for use with audio transmitted over RTP using the AES67
In general, when we refer to video over IP in the context of any format. The first part of the SMPTE ST 2059 standard refers
video production workflow, we are referring to the distribution to “the generation and alignment of interface signals to the
of either baseband or lightly compressed video over Real Time SMPTE Epoch” (Date 1970-01-01 Time 00:00:00 TAI) and the
Protocol, commonly referred to as RTP. The advantage of using second part refers to the definition of a “SMPTE profile for use
RTP as opposed to Universal Datagram Protocol (UDP) for of IEEE 1588 Precision Time Protocol in professional broadcast
the transport layer is twofold. RTP packets are time-stamped applications”. SMPTE ST 2059-2 is designed to enable any
making the measurement of packet delay variation easier, but slave introduced into a network to become synchronized within
critically the packets also carry a sequence number, making the 5 seconds and to maintain network-based time accuracy
detection of dropped or out-of-order packets relatively straight between slaves to within 1 micro second. It should be noted
forward. that while PTP provides a mechanism to synchronize the real-
time clocks of devices on an Ethernet-based network to the
In addition to carrying Video over IP, in a live production same time, it does not make the network itself synchronous
environment it is critical to consider synchronization and (as is the case with Synchronous Ethernet also referred to as
timing. The asynchronous nature of IP has the advantage that SyncE).
many different traffic types can be carried across a network
without having to be concerned with synchronization, but this Coming back to the carriage of Video over IP, there are a
presents a challenge in the production environment where number of specific industry standards and proprietary methods
synchronization is critical to enable frame-accurate switching for its distribution. SMPTE ST 2022-6 is a standard designed
as well as synchronous video processing. To provide the to transport uncompressed SDI video, embedded audio and
necessary “genlock”, there remains the need for a precise metadata over RTP/UDP. Although it is possible to send audio
timing standard, which for both IP and Ethernet networks is on a separate flow, for example using AES67, it should be
provided in the form of the IEEE 1588-2008 Precision Time noted that the payload is always an entire SDI datagram carried
Protocol, commonly referred to as PTP version 2. This is also at constant bitrate. When audio is distributed as a separate
the basis of a recently introduced SMPTE PTP standard, flow, the bitrate of this flow must be provisioned, in addition to
specifically intended for the timing and synchronization of the bitrate required by SMPTE ST 259M, 292M or 424M.
video transmitted over RTP networks – the two part SMPTE

Source IP Dest IP
SMPTE RTP Headers SDI Payload
Address Address

FIGURE 2. SMPTE ST 2022-6 IP Packet Format (A Single IP Flow Can Carry Video, Audio and Metadata over SDI).

TEK.COM | 3
WHITE PAPER

SMPTE ST 2022-5 Row/Column FEC


P1 P2 P3 P4 P5 F R1 P1 Video Data Packets

F R1 Row FEC Packets


P6 P7 P8 P9 P10 F R2
F C1 Column FEC Packets

P11 P12 P13 P14 P15 F R3

P16 P17 P18 P19 P20 F R4


F c1 F c2 F c3 F c4 F c5

FIGURE 3.

Within the SMPTE ST 2022 family of standards, there is also SMPTE 2022-7 Seamless IP Protection Switching is enabled
provision for a method for Forward Error Correction (FEC), as by IGMP multicasts and provides a method to clean switch
defined by SMPTE ST 2022-5 and also a method for seamless RTP packets using frame numbers. It can tolerate the complete
protection switching of two SMPTE ST 2022 datagrams in order failure of one network path. With seamless (otherwise known
to provide failover protection, as defined by SMPTE ST 2022-7. as “hitless”) failover, the receiver selects packets from the main
or backup streams in order to produce an error-free output, at
SMPTE ST 2022-5 Forward Error Correction creates redundant the cost of doubling required network bandwidth. The example
row and column FEC packets which are used to correct shown below shows an error-free output even though the main
errors in the video data packets. Using FEC is a trade-off stream has suffered a total network failure.
between error recovery ability, extra bandwidth required, extra
processing needed along with the associated receiver latency
caused by the extra processing required.

Network
Failure
Sender Receiver Sender
Packet
Loss Receiver

X X3 X2
3 2 1 3 2 1 3 2 1 1
Stream IP Switch Stream IP Switch
Sender M Main Sender M Main
3 2 1 3 2 1
Packet Packet
Selection Selection
3 2 1 3 2 1 3 2 1 3 2 1
Duplicate IP Switch Duplicate IP Switch
Stream B Backup Stream B Backup

FIGURE 4. SMPTE ST 2022-7 Seamless IP Protection Switching.

4 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

Source IP Dest IP Video Payload


RTP Header
Address Address (RFC 4175)

Source IP Dest IP Audio Payload


RTP Header
Address Address (AES 67)

Source IP Dest IP Metadata Payload


RTP Header
Address Address (IETF Draft)

FIGURE 5. VSF TR-03 IP Packet Formats. Dedicated IP Flows Carry Video, Audio and Metadata Essence.

Source IP Dest IP Video Payload


MPEG-2 TS
Address Address (SMPTE RDD 37)

Source IP Dest IP Audio Payload


MPEG-2 TS
Address Address (SMPTE 302)

Source IP Dest IP Metadata Payload


MPEG-2 TS
Address Address (SMPTE 2038)

FIGURE 6. ASPEN IP Packet Formats. Dedicated IP Flows Carry Video, Audio and Metadata Essence over TS.

A second method for transporting video over IP networks is Another method for carrying video over IP in common usage
defined by the Video Services Forum as VSF TR-03. This is the Evertz ASPEN format (submitted to SMPTE as RDD 37),
differs from SMPTE ST 2022-6, in that it separates video, audio which has some similarity to TR-03 in that separate IP flows are
and metadata elements into separate IP flows using RTP/UDP. dedicated to carrying video, audio and metadata elements, but
Advantages claimed for this method are inherent avoidance in the case of ASPEN, these elements are carried on an MPEG-
of audio embedding or wasted bandwidth associated with 2 Transport Stream (TS) over RTP/UDP. Similar advantages
carrying only video over SDI over IP. PTP synchronization is are claimed for ASPEN when compared to SMPTE ST 2022-6.
accommodated through support of both IEEE 1588 default PTP synchronization is supported by offering compatibility with
profile as well as the SMPTE ST 2059-2 profile. A related SMPTE ST 2059-2.
standard, TR-04 defines how SMPTE ST 2022-6 media flows
can be used in an interoperable manner within the context of a
TR-03 environment.

TEK.COM | 5
WHITE PAPER

12G into 10G Won’t Go – Light applications, others would argue that it is overly complex for
the application and is better suited to its intended contribution
Compression application. Block transform codecs (MPEG-2, H.264, HEVC
The practical and affordable deployment of 4K/UHD is likely etc.) deliver high levels of compression at the expense of
to lead to the adoption of light compression methods for use high levels of complexity and latency. The wavelet-based
with 10GigE Ethernet. Although 10-bit High Dynamic Range codecs deliver lower levels of compression for high quality or
(HDR) has minimal impact on bitrate, the adoption of 12-bit lossless applications, but with much lower levels of complexity
HDR results in an approximately 20% increase in required and associated latency. There are three methods commonly
bandwidth. It is perhaps obvious that High Frame Rate (100/120 proposed for use in production applications and all are relatively
fps) requires light compression to be used with 10GigE simple and light weight wavelet compression algorithms. They
networks. All these new technology conspire to drive adoption are the Sony Low Latency Video CODEC – LLVC (submitted to
of light compression methods in order to fit ever more data into SMPTE as RDD 34); the Intopix Tiny CODEC – TICO (submitted
a 10G pipe. All compression methods are a trade-off between to SMPTE as RDD 35); and VC-2 – also known as Dirac Pro,
latency, compression ratio and picture quality. In live production which developed by BBC research and development and is
applications only low levels of compression (typically 4:1) are standardized as SMPTE ST 2042. All these wavelet CODECs
required, whilst conversely, latency needs to be low and the are intra-coded and are designed to deliver extremely high-
picture quality needs to be of the highest order. Although some quality video at low levels of compression and with low latency.
have proposed the use of JPEG 2000 for use in production

Wavelet Predict DC Partition Scale Variable


Quantise Length
Transform Coefficients Into Slices Coefficients
Coding

FIGURE 7. VC-2 Signal Processing Chain.

6 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

Keeping PTP Simple


The adoption of video over IP along with the use of PTP to
synchronize the real-time clocks of different network nodes
GM
infers that any such network requires a network time server, in
Domain 1' Domain 2
order to provide the PTP genlock functionality equivalent to that M M
delivered by a Sync Pulse Generator (SPG) in SDI networks.
S S
Any logical grouping of clocks that are synchronized together
are referred to as a PTP domain. It should be noted that clock
in one domain may not be synchronized to clocks in another
domain.
FIGURE 8. PTP Domains Synchronized to a Common Grandmaster.
This PTP network time server is generally referred to as
a PTP Grandmaster, with a device that derives its timing
synchronization from PTP being referred to as a PTP Slave.
to the Grandmaster in order to determine the reverse path
A Master is a device that provides the time in a given PTP
propagation delay between the Slave and the Grandmaster.
domain and a Slave is a device that synchronizes to a Master. A
A Delay Response message is sent by the Grandmaster and
Grandmaster is a Master that is providing the ultimate source of
contains the time of receipt of the Delay Request message by
clock synchronization in a network. In the context of broadcast
the Grandmaster.
applications, PTP Grandmasters are usually synchronized to
GPS, GLONASS or both, in order to derive accurate time-
As defined, PTP is a method for distributing time over a
code relative to the 1970 Epoch. It should be noted that PTP
network, with a single Grandmaster providing the source of
Grandmasters always use the 1970 Epoch. To enable legacy
time, to synchronize one or more Slaves. The Grandmaster
equipment support, the Tektronix SPG8000A hybrid PTP
periodically transmits Sync and Follow-up messages, which
Grandmaster and SDI SPG is able to phase its baseband timing
the slaves use to derive the time. In an ideal World the network
outputs relative to either the 1970 or 1958 Epoch dates.
delay could be programmed into each slave which could then
be offset to the time in the received packet to derive the correct
Within any PTP domain there are a number of message
time. Such symmetry can only be relied upon in point-to-point
types used to establish time within that network. Announce
IP links. Unfortunately, the delay in switched/routed IP networks
messages are used to establish the synchronization hierarchy
is both variable and asymmetric, so the Slave devices must
and provide the clock status and clock criteria used to
periodically send Delay Request messages to the Grandmaster.
determine which clock becomes the Grandmaster. Sync and
The Grandmaster accurately time stamps these messages on
Follow-up messages are transmitted by the Grandmaster and
receipt and the time of receipt is sent back to the Slave in a
are used by Slaves to derive the time. Delay Request messages
Delay Response message.
are a request for timing information and are sent from the Slave

TEK.COM | 7
WHITE PAPER

Master Clock @ 11:00 Slave Clock @ 11:05


Sent 11:00 T1
Sync Time
T2-T1 = Message
T2 ARR 11:06
Master_To_Slave Δt (Timestamped @ 11:00
= 6 Mins Sync Follow Up therefore Propagation Delay = 1 min)
Message

T3 Sent 11:06
Delay Request
Message
ARR 11:02 T4

T4-T3 =
Master_To_Slave Δt Delay Response
= -4 Mins Message
(Timestamped @ 11:02)

PTP Master-Slave Messages

Offset = (Master_To_Slave Δt – Slave_To_Master Δt)/2 = 5 Mins


Oneway Delay = (Master_To_Slave Δt + Slave_To_Master Δt)/2 = 1 Min

FIGURE 9. Deriving the Correct Time in a PTP Network.

Using the diagram above as a reference, the Slave is now able If the propagation delay in both directions is in fact different,
to calculate the difference between its own clock and that of the then the slave is offset to “correct” for this by adjusting its
Grandmaster using the Master-to-Slave sync packet delay (T2- clock to a value of half the asymmetry. The clock’s control loop
T1) and Slave-to-Master delay request packet-delay (T4-T3). adjusts the slave time to make the Master-to-Slave and Slave-
The Offset (Slave Time – Master Time) = [(T2-T1)-(T4-T3)]/2 and to-Master propagation delays appear to be equal. That is, the
the Oneway delay = [(T2-T1)+(T4-T3)]/2. For the slave time to be control loop adjusts the slave time such that T2-T1 = T4-T3.
now correct, the propagation delay in both directions must be
equal.

8 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

Accuracy and Reliability is Key – Grandmaster Failover


The BMCA In order to establish an automatic main and backup
Grandmaster fail over the Priority 2 field is used to identify main
One reason for PTP’s suitability to broadcast applications is
and backup clocks between two or more otherwise identical
the resilience provided by the use of the Best Master Clock
redundant Grandmasters as follows:
Algorithm (BMCA). The BMCA allows the most accurate Master
to automatically take over the duties of Grandmaster when the
• Main Grandmaster
previous Grandmaster loses its GPS lock, gets disconnected (Priority Field 1 = 128; Priority Field 2 = 127)
from the network, or is unable to act as Grandmaster for any • Backup Grandmaster
reason. (Priority Field 1 =128; Priority Field 2 = 128)

If both identical Masters are locked to GPS, they will have the
The BMC Algorithm runs on all clocks in a network and uses
same clock quality, so the lowest Priority Two Field value will
a number of criteria to determine which Master should be
select which is the Grandmaster. If the Main clock loses GPS
Grandmaster including the following in priority order:
lock, then the Backup clock becomes the Better Master and will
take over as Grandmaster.
1. User Definable Priority 1 Field (the lowest value <= 128 wins)
2. Clock Class (e.g. GPS vs free running)
It is worth noting that if any GPS synchronized Master loses
3. Clock Accuracy
GPS lock, it will of-course itself become free running and will be
4. Clock Variance (jitter and wander) reliant upon its own internal local oscillator. However good this
5. User Definable Priority 2 Field (the lowest value <= 128 wins) oscillator is, over an extended period of time it will drift, even if
6. Clock Source Port ID (usually the Ethernet MAC Address) slightly relative to the GPS clock. Once GPS lock re-acquired,
unless the Master’s local oscillator phase-lock loop (PLL) is
driven slowly to re-synchronize with the GPS clock, then the
system can suffer from what is known as “Sync Shock” when
the Master’s clock frequency suddenly changes. Whilst this
may be acceptable in some IT applications, this is of course
Power On,
Reset highly undesirable in a video production application. In the
case of the SPG8000A, the “Stay Genlock” feature is designed
specifically to avoid the problem of Sync Shock through careful
control of the PLL.
Listen

Announce message from No announce message from


better master better master
No announce message from Domain 1
better master
PF1 = 128 GM GM PF1 = 128
Slave Grandmaster PF2 = 127 (main) (backup) PF2 = 128

Announce message from


better master
S S S S S

Determining Master/Slave Clock State


FIGURE 10. Determining Master/Slave Clock State. FIGURE 11. Configuration of Main/Backup Grandmasters for Automatic Failover.

TEK.COM | 9
WHITE PAPER

Although in theory it is possible to use a Master with software-


based time-stamping, in the case of live video production
applications, it is highly unlikely that such a device could
be devised with the necessary clock accuracy required for Transport Type
synchronous video processing. A hardware time-stamped
Grandmaster device such as the SPG8000A is locked to
Reserved Version
GPS (or GLONASS or both to provide greater constellation
resilience), with the Grandmaster’s local oscillator being Length
phase-locked to the GPS reference. This local oscillator is the
reference clock used with dedicated hardware for the precise
Domain
timestamp of the incoming PTP messages and PTP sync
packets. A dedicated hardware approach is unaffected by Reserved
operating system behavior or network traffic latency.
Flags
PTP Clock Types
Ordinary Clocks are those devices that are at either end of a Correction Field
network and are not switches or routers. A Slave Only clock
never acts as a master, whereas a Master/Slave clock can act
as either and a Preferred Grandmaster is configured to never Reserved
become slave.

Source Port
It is vital that switches and routers in any IP video network that
relies upon PTP for synchronization are “PTP Aware”. That is
they are able to account for their own queuing delay, to ensure Sequence ID
downstream timing accuracy. This can be achieved in one of
two ways. The first is by the switch acting as a transparent Control
clock which hardware time stamps Sync and Delay Request Log
messages on arrival and departure and adds the difference to a
correction field in the message.
Time Stamp
The second way for a switch or router to account for its own
queuing delay is to act as a Boundary Clock, which receives
time from a Master on one slave port and provides one or more
Master (not Grandmaster) ports to downstream Slaves in a PTP
FIGURE 12. Sync/Delay Request Message Format.
Domain and in doing so, removes the effect of its own queue.

10 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

PTP Domain 1
PTP Grand Master – Ordinary Clock
M
Sync Message

Sync Message (with correction)

S
Router – Transparent Clock
Camera – Ordinary Clock (Slave)
Sync Message (with correction)
S

PTP Master - Boundary Clock PTP Domain 2


M Sync Message

S
Camera – Ordinary Clock (Slave)

FIGURE 13. PTP Clock Types in a Network.

TEK.COM | 11
WHITE PAPER

Summary of this paper, IT infrastructure began to be adopted almost


fifteen years ago for compressed video distribution using
Although the transition to IP is seen by some as inevitable, MPEG-2 transport streams over IP. IT infrastructure is also in
not all equipment is available with IP interfaces. It must also industry-wide use as the distribution and control component for
be considered that the investment in SDI equipment has been file-based workflows. In both these cases, Tektronix provided
so considerable, that the use of hybrid IP/SDI networks is technology support for early adopters; with TS over IP test
likely for the foreseeable future. For broadcast applications, equipment as well as with the first file-based QC tool on the
it is essential that the PTP Grandmaster such as the Tektronix market.
SPG8000A provides support for the application specific video
and audio PTP profiles, such as SMPTE 2059 and AES67, as As such, Tektronix was involved with the earliest adopters of
well traditional SPG features including black burst, tri-level and compressed video over IP and file-based QC and continues
SDI out. All the above protocols must be referenced to the to be closely engaged with these latest developments with
same GPS clock, or such a hybrid IP/SDI network would be baseband video over IP.
inoperable. It must also be considered that a broadcast live
production network is entirely reliant on a stable reference and We are at the beginning of a long term transition to IT-based
any timing and synchronization devices “must work”. infrastructure and those involved in the production and facility
side of video have little experience with the new technology,
Although many equipment vendors have IP enabled equipment but conversely are extremely experienced using SDI and all
at an early stage of development, both equipment vendors the issues associated with its use. This coupled with a huge
developing IP video equipment and broadcasters and investment in existing technology and workflows implies that
other content providers producing content are reliant on the transition will take place gradually, making it likely that
the availability now of an accurate and reliable timing and hybrid SDI/IP infrastructure will be in place for some years.
synchronization solution. Such production facilities will require equipment that is able to
operate seamlessly and reliably in such a hybrid environment.
Although the concept of carrying uncompressed (or lightly The companies best placed to provide equipment that meets
compressed) video over IP is perceived as being very new, and those requirements are those who have experience both of
indeed revolutionary, the precedent for the broad adoption of the challenges of the live production environment, as well as
IT infrastructure for live production facilities has in fact been extensive experience of the challenges associated with the
in place for many years. As was mentioned at the beginning distribution of video over IP networks.

12 | TEK.COM
An Introduction to IP Video and Precision Time Protocol

TEK.COM | 13
Contact Information:
Australia 1 800 709 465
Austria 00800 2255 4835
Balkans, Israel, South Africa and other ISE Countries +41 52 675 3777
Belgium 00800 2255 4835
Brazil +55 (11) 3759 7627
Canada 1 800 833 9200
Central East Europe / Baltics +41 52 675 3777
Central Europe / Greece +41 52 675 3777
Denmark +45 80 88 1401
Finland +41 52 675 3777
France 00800 2255 4835
Germany 00800 2255 4835
Hong Kong 400 820 5835
India 000 800 650 1835
Indonesia 007 803 601 5249
Italy 00800 2255 4835
Japan 81 (3) 6714 3010
Luxembourg +41 52 675 3777
Malaysia 1 800 22 55835
Mexico, Central/South America and Caribbean 52 (55) 56 04 50 90
Middle East, Asia, and North Africa +41 52 675 3777
The Netherlands 00800 2255 4835
New Zealand 0800 800 238
Norway 800 16098
People’s Republic of China 400 820 5835
Philippines 1 800 1601 0077
Poland +41 52 675 3777
Portugal 80 08 12370
Republic of Korea 001 800 8255 2835
Russia / CIS +7 (495) 6647564
Singapore 800 6011 473
South Africa +41 52 675 3777
Spain 00800 2255 4835
Sweden 00800 2255 4835
Switzerland 00800 2255 4835
Taiwan 886 (2) 2656 6688
Thailand 1 800 011 931
United Kingdom / Ireland 00800 2255 4835
USA 1 800 833 9200
Vietnam 12060128
Rev. 012916

Find more valuable resources at TEK.COM

Copyright © 2016, Tektronix. All rights reserved. Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that
in all previously published material. Specification and price change privileges reserved. TEKTRONIX and TEK are registered trademarks of Tektronix, Inc. All other trade names
referenced are the service marks, trademarks or registered trademarks of their respective companies.
01/16 EA 2CW-60360-0

You might also like