Computer engineers learn early on that a core set of protocols are critical to networks. Some of the most important protocols include Internet Protocol (IP), Transaction Control Protocol (TCP), Address Resolution Protocol (ARP) and Internet Control Message Protocol (ICMP). These protocols are critical to broadcasters as well because many broadcast facilities now rely on computer networks.
As broadcasters continue to expand their use of networking technology, another set of protocols — User Datagram Protocol (UDP) and Real-time Transfer Protocol (RTP) — are becoming important when streaming video over IP networks. Let's look at a typical protocol stack for the transmission of MPEG transport streams over Ethernet.
Ethernet is both a protocol and a hardware specification. The Ethernet specification details the electrical signals and voltages on the wire (or the RF transmission scheme in wireless applications), as well as defines the way Ethernet packets are built and what the Ethernet headers contain.
One important aspect of Ethernet is the description of how physical devices are addressed. Ethernet addresses, which are inserted into each Ethernet packet header, are different from IP addresses. An Ethernet address refers to a particular physical device. This is significantly different from IP addresses, where the end user can assign a particular IP address to any IP network device.
IP is a core protocol that moves datagrams from one device to another. A datagram is defined as a self-contained, independent entity of data carrying sufficient information to be routed from the source to the destination computer without reliance on earlier exchanges between this source and destination computer and the transporting network.
There are several possibilities for the layer below the IP layer (Ethernet and ATM are two examples), and these possibilities employ different addressing schemes. Therefore, it is the job of the IP layer to interface to these lower layers, while presenting a uniform network-addressing scheme to the layers above it. The IP layer prepares data sent to it by higher protocols for transmission across a specific network, taking into account things such as the packet length, hardware addressing structure and how data should be split across multiple packets.
Today, Ethernet is the dominant electrical and physical networking technology, but IP works just as well with token ring and ATM as it does with Ethernet.
User Datagram Protocol
UDP sends datagrams from one application running on a computer to an application running on another computer. UDP signals that the payload in a UDP packet is destined for a particular application by using port numbers. For example, port 80 is typically used for HTTP in Web applications. The UDP header includes a source and destination port number.
There is one particularly important thing to know about UDP. Nothing in the UDP guarantees that packets sent across the network will reach the other end. In fact, UDP explicitly does not check to see that packets have been received. The upside is that UDP is an extremely lightweight protocol to implement, and it is fast. Furthermore, it does not introduce delays by requesting and subsequently receiving lost packets.
UDP was developed because there are some use cases where checking on the delivery of each packet is not practical. For example, in a multicast service, a server may send data to hundreds or thousands of clients. Checking with each client to see that every packet has been received would be prohibitive.
The size of UDP packets can vary, and in some cases, UDP packets can be large. This brings up the issue of fairness. Large UDP packets may hog bandwidth on a network, causing other traffic to suffer. For this reason, and for other security reasons, some system administrators do not permit UDP traffic to cross their firewalls. This can cause headaches for broadcasters that attempt to use UDP to distribute video over the Internet.
Real-time Transport Protocol
As the name implies, RTP is a protocol intended for the transmission of data in real time.
As with other protocols described in this article, RTP contains a payload and an associated header. The RTP header contains two significant items. The first is a sequence number. This number is incremented for each RTP packet that is transmitted during a session. If you are an RTP receiver and you miss a sequence number, you know that a packet has been dropped. It is then up to the receiving application to decide what to do. RTP includes a retransmission mechanism within a sub-part called the RTP Control Protocol (RTCP), but in many video applications, retransmission is not an option. By the time a receiver notices that a packet has been dropped, requests a replacement packet, and decodes and prepares the content for display, it is too late. In this case, forward error correction or concealment may be reasonable alternatives, because neither of these require retransmission of lost packets.
RTP provides one other facility that is critical for the reconstruction of real-time data: a timestamp field. Clearly, when a video feed is presented to a computer for streaming, that feed is isochronous. It comes in at a fixed rate, but when these packets are sent over the Internet, the interpacket arrival time can vary tremendously depending on congestion, routing and many other factors. The RTP timestamp allows a receiving application with sufficient buffering to recreate the stream with the same pacing as was present at the transmitter.
Many computer protocols build on one another. The process starts with an application passing data to a network protocol stack. The top protocol in the stack takes this data and puts it into the payload section of a packet. It then adds a header to the packet. The header typically contains information about the payload, information about the source and destination of the packet, or both.
Figure 1 shows how this encapsulation process works. Starting with a streaming application, video and audio is MPEG-compressed and put into MPEG transport stream packets. As part of the process of creating the MPEG transport stream packets, headers are created which, among other things, describe the video and audio contained within the MPEG transport stream packets. These MPEG transport stream packets are placed in the payload portion of RTP packets.
All of the MPEG content, including the MPEG headers, is enclosed in the payload section of the RTP packets. The RTP packets, including headers, are then encapsulated in the payload section of a UDP packet, and UDP headers are added. The UDP headers are simple and include information about the source port, the destination port, packet length and a checksum. The process continues.
UDP packets are inserted into the payload section of IP packets, and IP headers are added. The IP headers, among other things, contain the sender and receiver's IP addresses. Finally, the IP packets are inserted into Ethernet packets, and Ethernet headers are added. The Ethernet headers contain the source and destination MAC addresses.
This may seem like an inefficient way of getting an MPEG stream from one place to another, but each layer has a job to do. In a well-designed system, it should be possible to replace one layer with another that performs a similar function without having to rebuild the entire system.
As broadcasters build more IT-based facilities, certain core protocols are emerging as the critical protocols for our industry. Encapsulation is the key that will allow us to change and adapt these protocols as our industry matures in this area.
Brad Gilmer is executive director of the Advanced Media Workflow Association, executive director of the Video Services Forum and president of Gilmer & Associates.
Send questions and comments to:firstname.lastname@example.org