INTERNET VIDEO STREAMING OVER UDP-LITE USING MPEG-4

  

INTERNET VIDEO STREAMING

OVER UDP-LITE USING MPEG-4

Composed by:

Filbert Hilman Juwono

  

0706305280

Submitted for Broadband Multimedia Course Assignment

  

Department of Electrical Engineering

Faculty of Engineering

University of Indonesia

2008

  

ABSTRACT

  Nowadays, multimedia is one of the killer applications in the internet or wireless environment. The most popular multimedia application is video streaming. It requires higher bandwidth and lower response time than text, audio, and video. The major problems are the limited bandwidth and high transmission error rates because of the delay jitter and the packet loss. The solutions are reducing the video size by using compression technique, choosing the appropriate protocol, and using the “intelligent” coder and encoder (codec).

  This paper comments about video streaming application using MPEG-4 as the codec that introduce better error resilience and UDP Lite protocol as the transport layer protocol. Then, the implementations, including the comparison between MPEG- 2 and MPEG-4 and between UDP and UDP Lite, are enclosed.

1. BACKGROUND 1.1. Multimedia and Compression Issues

  In our daily lives, information is needed indeed. Media refer to the types of information carriers, such as audio, video, images, and data. There are two classes of media: static and dynamic [1]. Static media do not have a time dimension, and their contents and meanings do not depend on presentation time, such as data, graphics, and still images. Dynamic media have a time dimension, and their meanings and correctness depend on the rate at which they are presented, such as audio and video. Multimedia refers to the combination at least two media.

  The information gadgets and technologies are developed in order to transmit information, including multimedia, in a very low bit rate. Unfortunately, the multimedia data have relatively big size. Streaming video in low bit rate may cause problems such as delay jitter or even data loss. So, data compression is needed. Data compression is the process of converting an input data stream (the source stream or the original raw data) into another data stream (the output, or the compressed, stream) that has smaller size [2].

  In this paper, it is discussed about streaming video using MPEG-4 over UDP- Lite protocol. In transmitting the data, errors can not be evaded, especially over wireless since wireless environment is mostly an error prone environment. So the codec requires a better error resilient, such as MPEG-4. UDP-Lite provides a partial checksum which allows corrupted packets to be transmitted to the receiving application [3].

1.2. Video Streaming [4]

  Streaming can be considered as the subset of webcasting. Webcasting is equivalent with the television broadcasting over the web. So, streaming deals with real-time application. The major factor why streaming is real-time is that there is no storage for data received. Buffer may be exist in the decoder but the signal essentially streams from the server to the client. The applications of streaming are: internet broadcasting, distance learning, IP-TV, video-on-demand, music-on-demand, and so on.

  There are four components in the streaming architecture: capture and encoding, serving, distribution and delivery, and media player. The capture and encode processing is getting the regular audio and video signal in television format and done. Serving processing is uploading the encoded file into a server for delivery out to the network. Distribution processing is very simple in principle. As long as there are

  IP connectivity and QoS requirements, the requested packet will arrive at the client. Last, media player is used to decode the file.

  Other terms used in transmission process are download and progressive download or sometimes called pseudo-streaming. Downloading refers to delivering all the file into local hard drive and once the entire file has been delivered, the user can play the file. Progressive download is intermediate between download and streaming. The player can play the file while the remainder is still downloading. Figure 1 shows the difference between download and streaming.

  (a) (b) Figure 1. (a) download (b) streaming

2. INTERNET LAYERING [5, 6] Network is the set of serial lines used to connect terminals to mainframe computers.

  Computer network differs from others such as telephony network due to its wide range of applications: it can deliver many types of data. On the other hand, we consider internetwork (or simply internet) as a set of independent network. A web server provides the service through the distribution of information, while the client (browser) collects the information.

  Computers communicate by sending blocks of data, where each block is called packet. Thus, the type of switching is called packet switching. The packets contain the following items: the information (called as the payload) and the header, which contains the information of the sender and the recipient of the data and where it fits to make a larger stream. The process of generating the packets is through the layers of protocol stack as shown in Figure 2.

  Figure 2. The layers of protocol stack

  The abstract objects that make up the layers of a network system are called protocols. A protocol provides a communication service that higher-level object can exchange messages.

  The lowest level is called data-link layer (see Fig. 2). This level is implemented by combination of hardware and software such as network adaptor as hardware and its driver as software. Thus, the data link layer is to provide interface between the computer and the network. The ordinary protocols of this layer are Ethernet and PPP. The next upper layer is network layer that consists of a single protocol which is Internet Protocol (IP). The main task of IP is to create packets and address them to the appropriate destination. The third layer is transport layer which have two possible protocols which are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP and UDP are sometimes called end-to-end protocols. And finally, the uppermost layer is the application layer which has various protocols such as SMTP, FTP, and Telnet. They are all based on HTTP.

3. APPLICATION LAYER: MPEG-4 3.1. Overview of MPEG [1, 2, 7]

  Moving Picture Experts Group (MPEG) is a standard for audio and video compression and transmission set up by the International Standards Organization (ISO). The standard is made to code the information when used for storage and retrieval on digital storage media such as CD-ROMs, tape drives, and also telecommunication channels such as ISDN and LAN.

  In compression, the data rate is reduced at source by the compressor. The compressed data, then, is transmitted through the channel. The compression factor is defined as the ratio between the original data rate and the compressed one. The compressed data can be reviewed in the sink through the expander. The process is summarized in Figure 3.

  Figure 3. The compression system

  When the encoder is much more complex than the decoder, then the system is said asymmetrical. The MPEG works in this way. The reason is that the compression is carried once but the decompression is carried out many times. The decoder consists of three layers, to decode the audio, the video, and the system data.

  There are several MPEG standards. MPEG-1 is intended for the immediate data rates, about 1.5 Mbps (such as CD-ROM). MPEG-2 operates in higher data rates, at about 10 Mbps with increase in quality (used in cable television). MPEG-3 was intended for HDTV compression. However, it was found that it was redundant and merged with MPEG-2. MPEG-4 is intended for low data rates of less than 64 kbps.

  In MPEG, the entire movie is called video sequence. A video sequence consists of pictures, each has three components: one luminance (Y) and two chrominance (Cr and Cb). MPEG uses I, P, and B pictures. I-pictures are coded without reference to other pictures. P-pictures are predictive coded pictures, while B-pictures are bidirectionally predictive-coded pictures. Reference pictures are I- and P-pictures.

  The basic building of MPEG video compression is the macroblock, shown in Fig. 4. It consists of four 8 8 blocks of luminance, and two 8 8 matching

  • – chrominance (4:2:0 format). The macroblocks (MBs) can be divided into 4 types: I MBs, FP
  • – MBs, BP – MBs, and B – MBs. I-pictures has only I MBs, P-pictures can have I - and
  • – MBs, while B-pictures can have all types of MBs. For predictive MBs (BP, FP, and B) there are motion vectors and predictive errors. The DCT is applied to the I – MBs and predictive errors to obtain the transform coefficients, then quantized and zig-zag scanned. Finally, it can be used entropy coding and RLC or VLC.

  

Figure 4. Macroblock 4:2:0 format

3.2.

   MPEG-4 [8, 9, 10]

  The MPEG-4 (ISO 14496) presents the new features like compression efficiency, error resilience, and content-based interactivity. The MPEG-4 standard works on various bit rates, from below 64 kbps for wireless transmission up to 4 Mbps for broadcasting. Then the applications cover many areas such as streaming multimedia data over internet or LAN, broadcasting digital multimedia, and virtual meetings.

  In the conventional term, video sequence is considered as a group of frames. In MPEG-4 a video sequence is considered as a group of video objects. A video object consists of video object layers. A video object layer is a group of video object planes.

  Fig. 5 shows the object hierarchy in MPEG-4, while Fig. 6 shows the example.

  VS: Visual object Sequence

  VO: Video Object

  VOL: Video Object Layer GOV: Group of VOP

  VOP: Video Object Plane Figure 5. Object hierarchy in MPEG-4

  

Figure 6. Example of object hierarchy in MPEG-4

  MPEG-4 can code and decode a simple profile of VO using I

  • – VOP and P –

  VOP that can be concluded in Fig. 7 and Fig. 8, short header, compression efficiency tools, and transmission efficiency tools. In advanced VO, the B

  • – VOP is also used. The short header provides the compatibility between MPEG-4 and ITU- H.263. The compression efficiency tools give an option to use MBs either of 16 16 luminance and 8 8 chrominance which yield one motion vector or 8 8 luminance and 4 4 chrominance which yield four motion vectors. Also, motion vector is unrestricted. It can point to an area outside the VOP. In addition, AC/DC prediction is used to reduce correlation between adjacent I – MBs.

  Figure 7. I

  • – VOP coding and encoding
The transmission efficiency tools refer to error resilience. The tools include: resynchronization, data partitioning, header extention code, and reversible VLCs.

  • Resynchronization Encoder inserts unique markers in the bitstream. If error occurs, the decoder can skip the remaining bits until the next marker and restart the decoding from that point.
  • Data partitioning

  The data is partitioned into two. First, the data contains coding mode information for each MB, the second is data of DC coefficient (intra MBs) and motion vector (inter MBs). The very important is the first partition. If the first partition is recovered it is usually possible for the decoder to reconstructing the packet even the second partition is damaged due to transmission error.

  • Header extention code

  The header is added redundant header information so the corruption in the header information will be reduced.

  • Reversible VLCs

  First, the decoder decodes the packet in forward direction, if an error occurs, the packet is decoded in the reverse direction starting from next synchronization marker.

4. TRANSPORT LAYER: UDP-LITE 4.1. UDP [11]

  When delay is a major factor determining the performance of the applications, such as real time communication, on-line games, use UDP as the transport protocol. UDP has advantages when used in that kind of application:

  • The data rate is defined by the sending application.
  • Incoming packets are delivered immediately to the receiving application, even if they arrive out of order.
  • Lost packets will not cause the retransmissions by the transport layer.
  • For validation purposes, the Internet checksum can verify the UDP headers and the data payload.

  Fig. 9 shows the UDP headers. When using IPv4, the checksum is optional. The checksum functions to protect the packets against misrouted. If the checksum is discarded. If the checksum is disabled, it can cause the packets to be misdelivered when there is an error occurred in the network or transport header.

  Figure 9. UDP headers

  A packet with bit errors will cause a glitch in the video, while a lost packet will cause inconvenience pause or noticeable disturbance. Then we prefer to the first scenario, thus it is needed a transport protocol with flexible checksum that can allow corrupted packet transmitted: UDP-Lite.

4.2. UDP –Lite [11, 12]

  UDP Lite provides partial checksum where packets with few bit errors are still acceptable. This method can be reached by dividing packet into two parts: sensitive and insensitive. Errors in the sensitive part will cause a dropped packet while errors in the insensitive part will be fine.

  The difference between UDP and UDP Lite is that in UDP Lite header shows the information about how many bytes the sensitive part from the beginning. Thus, there is redundant information in UDP header. The “length” in the UDP is replaced by “coverage” in the UDP Lite as shown in Fig 10.

  The link layer also has important rule. The packet with error in insensitive part that has passed the transport protocol should not be dropped by the lower layer. UDP Lite must be supported by a partial link layer checksum or the link layer checksum is ignored.

  Figure 10. UDP Lite headers

  With MPEG-4 video coding, the I - and P

  • – VOP consist of important information. Thus, losing those VOP will affect the picture. It is better to let the error

  VOPs to be delivered than discarded. UDP Lite can be used to implement this. In addition, the MPEG-4 has error resilience tool that can be very useful.

  However, there are 2 major disadvantages of UDP Lite, which are [13]: Backward incompatibility with traditional UDP

  • Changing the “length” in UDP header to “coverage” in the UDP Lite header causes the UDP applications incorrectly interpret the UDP Lite header.
  • UDP Lite does not provide flexibility to the application layer on how corrupted packets are handled. It will be a problem when the application does not have error- resilient tools.

  Lack of flexibility for the application layer to handle corrupted packets

5. IMPLEMENTATION [3] 5.1. Comparison between MPEG-1, MPEG-2, and MPEG-4

  The tests for comparing the quality among the various MPEG standards have been done in Aberdeen University. The videos used were taken from London Symphony Orchestra. The specifications for the encoding were:

  • DV format

  Dual PowerPC Mac G4 processor 1 GHz

  • PAL format 720 576
  • >Codec: Cleaner 6

  The performance was taken from 5 movies presented. The lengths of the movies were between 30 seconds to 2 minutes. The grade given varied from 1 to 5 where 1 indicated very annoying video (poor quality) and 5 indicated excellent in quality. The mean grade from all participants is given in Fig. 10.

  From Fig. 11 it can be seen that MPEG-4 is better than other MPEG. In addition there was another test taken to show the quality difference between MPEG-2 and MPEG-4 with lower bit rate as shown in Fig. 12. In Fig. 11a shows movie that used MPEG-2 at 1 Mbps, it shows some inconvenience due to the artifacts and blurs. Conversely, in Fig. 11b, using MPEG-4 with lower bit rate 700 kbps, it shows more convenience picture. MPEG-2 at 1000 kbps needs 4.5 MB disk space while for the same quality video in MPEG-4 at 700 kbps needs only 3.2 MB.

  Figure 11. Subjecive assessment from Aberdeen University (a)

  (b) Figure 12. (a) MPEG-2 @ 1 Mbps (b) MPEG-4 @ 700 kbps

5.2. MPEG-4 in UDP and UDP Lite

  Next test was done to show bit rate and loss for streaming MPEG-4 video. The LAN environment used Darwin Streaming Server (DSS). DSS uses RTP/UDP packets to the clients. RTP (Real-time Transport Proctocol) is the application layer protocol that usually runs in the top of UDP. The test equipments include:

  Server: a DualPC Processor Mac 1 GHz, Mac OS v1.2

  • Client: PIV 2 GHz, Windows XP Professional 

  Fig. 13 shows the results of running DSS of a video to the client. The video was encoded by using Quicktime Pro 6, an MPEG-4 video codec. The frame rates was 25 fps. The more the compression rates the more the packet loss and the more the bit rates sent.

  Figure 13. Streaming delivery of sample video The performances in UDP and UDP Lite are indicated by the probability of the packet loss as shown below. H D

  P UDP BER

  1

  1 P (1) H

  1

  

1

P P (2) UDP LITE BER

  where:

  H = header of packet [bytes] D = data payload [bytes]

  By looking at the formulas above, the only difference between (1) and (2) is the existence of D. Then, in UDP when the data payload increases, the probability of a packet being lost increases as well. Fortunately, it does not in UDP Lite. Look at Fig.

  14. When UDP Lite is functioned along with RTP, the header adds 12 bytes more. But, it does not affect the loss rate significantly.

  Figure 14. Payload length vs loss rate

  The packets were also analyzed using TCPDUMP to see the contents of the headers and data sizes of MPEG-4 on IP/UDP/RTP as shown in Fig. 15 when streaming the movie “Starwars” (Look at Fig.12) at 350 kbps.

  Figure 15. Content of headers 5.3.

   Multimedia Packets in UDP and UDP Lite For streaming the video “Starwars” it is used H = 40 bytes and D = 1400 bytes.

  • 5

  Comparing the performance using Eq. (1) and (2) by giving BER = 10 yields H D

  P UDP BER

  1

  1 P 5 40 1400 1 1 10 0.014 1.4% and H

  P UDP LITE BER

  1

  1 P 5 40 1 1 10 0.0004 0.04%

  The results above show that the UDP Lite has smaller probability of loss packet compared to UDP with the same BER. The overall comparison is shown in Fig. 16.

  • 2 When BER is 10 the loss rate in UDP is about 1, whereas in UDP Lite is about 0.35.

  Then, UDP Lite succeeds delivering about 65% of the packets.

  Figure 16. Video packet loss rate UDP vs UDP Lite for D = 1400 bytes

  Another example is shown for audio coding from PCM coding with the sample frequency 8 kHz with a payload 640 bytes. That is shown in Fig. 17 below. Audio

  • 5 -4 packets in UDP Lite reach about 1% loss when BER 10 and in UDP when BER 10 .

  When the payload size is small, UDP and UDP Lite the ratio of loss rate are almost the same.

  Figure 17. Audio packet loss rate UDP vs UDP Lite for D = 640 bytes The comparison in quality between UDP and UDP-Lite using MPEG-4 was shown by Singh et. al [14] as in Fig. 18 and 19.

  Figure 18. UDP vs UDP-Lite (1) UDP UDP-Lite Figure 19. UDP vs UDP-Lite (2)

UDP UDP-Lite

6. CONCLUSION AND FURTHER WORKS 6.1. Conclusion

  UDP Lite has an advantage compared to UDP when speaking about data packet transmission. UDP Lite has a partial checksum that allows the packet containing errors in insensitive part to be sent. Combination between UDP Lite and MPEG-4 will yield satisfactory result although the data payload is large. UDP Lite provides the flexibility in delivering corrupted packet while MPEG-4 has the error resilience tool in order to handle the transmission error.

6.2. Further Work [15]

  Other protocol like SCTP (Stream Control Transmission Protocol) and DCCP (Datagram Congestion Control Protocol) can be applied to see the differences compared to TCP, UDP and UDP Lite. UDP Lite can be seen as UDP --, SCTP can be viewed as TCP ++, and DCCP as UDP ++.