scieee AI-readable full text Open interactive document viewer

Modelling of H.264 MPEG2 TS traffic source

Kľúčik, Stanislav

Abstract

This paper deals with IPTV traffic source modelling. Traffic sources are used for simulation, emulation and real network testing. This model is made as a derivation of known recorded traffic sources that are analysed and statistically processed. As the results show the proposed model causes in comparison to the known traffic source very similar network traffic parameters when used in a simulated network.

Full text

INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE Modelling of H.264 MPEG2 TS Traffic Source Stanislav KLUCIK , Martin LACKOVIC Institute of Telecommunications, Faculty of Electrical Engineering and Information Technology, Slovak University of Technology in Bratislava, Ilkovicova 3, 812 19 Bratislava, Slovakia [email protected], lacko[email protected] Abstract. This paper deals with IPTV traffic source modelling. Traffic sources are used for simulation, emulation and real network testing. This model is made as a derivation of known recorded traffic sources that are analysed and statistically processed. As the results show the proposed model causes in comparison to the known traffic source very similar network traffic parameters when used in a simulated network. Keywords H.264, IPTV, MPEG2 TS, packetization, traffic generation. 1. Introduction The aim of this work is to define a precise VBR (Variable Bit Rate) HD (High Definition) H.264 MPEG2 TS (Moving Pictures Experts Group Transport Stream) IPTV (Internet Protocol Television) traffic generator that can be used as a replacement to real traffic sources. Generators are often used for network stress testing, by network delivered QoS testing [1] or as a help for prediction of QoS parameters like one-way delay, packet losses and jitter [2]. Traffic generators have some major advantages over real traffic in creating network load. The load can be created with a small amount of effort, no content streaming rights are needed, and preparing a large test with hundreds of streams can be performed in several seconds instead of hours. More information about IPTV networks and signal delivery can be seen in [3]. Our proposed model uses the following packetization stack: MPEG2 TS streamed over RTP (Real-time Transport Protocol), UDP (Used Datagram Protocol), IPv4 (Internet Protocol version 4), and Ethernet (Ethernet II or 802.3an), [4]. This stack is often used for several reasons. MPEG2 TS is used as a container format for streaming multiplexed video, audio and data. TS has several control mechanisms that are used for stream monitoring at end stations. RTP [5] ensures a better QoS supervision and quality management in IP network. The Ethernet II or 802.3ab are considered because these types of Ethernet technologies were used in our measurements. Measurements were made at the Ethernet layer, so L2 (layer 2 of the Reference Model Open System Interconnection) headers and minimal Ethernet frame sizes are also considered. The rest of this paper is organized as follows. The second chapter describes the current state of art, IPTV stream analysis and evaluations of measurements. The third chapter is devoted to the model of the IPTV generator. The fourth and last chapter is the conclusion. 2. State of Art IPTV packet generation can be a quite complex problematic. IPTV traffic itself is a time-variant self-similar process. These traffic properties can be partially described by several modeling approaches. Some of these IPTV traffic models are working only at the packet level. In [6] an analytical two level Markovian model is described. These types of generators are often not compute intensive but their can lack of accuracy. Another approach is in the levelization of the process of IPTV packets generation. This means, that generation does not occur only at the packet level but also higher levels of creating MPEG video are involved. We created a four level traffic model were the MPEG GoP (Group of Pictures) length and structure, I (Intracoded), B (Bi-directional) and P (Predicted) frame sizes and MPEG2 TS packetization are taken into account. Also other mathematical approaches like semiMarkovian [7], wavelets [8] or multifractal analyses [9] are applicable. These models are often aiming at a special field in the overall process of generators. c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 404 INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE 2.1. IPTV Stream Parameters and Measurements IPTV streams can be distinguished by a number of parameters such as: •VBR or CBR (Constant Bit Rate), •GoP length, •static or variable GoP structure, •MPEG profile (e.g. Baseline, Main), •number of streams carried within a multiplex, •packetization. Our compressed video stream uses a common frame rate of 25 frames/s with 188 bytes long MPEG2 TS Media Frames. 7 Media Frames are encapsulated into RTP/UDP/IP/Ethernet packets. Only 7 frames are encapsulated because of Ethernet data field length limitation. 2.2. Measurements We want to thank to Slovak Telekom Inc. which provided to us IPTV traffic records. Without these records our research could not be successful. We made measurements on this real IPTV traffic with variable and fixed GoP structures. The first measurement is packet based where times between generation of packets and packet lengths were observed. The next measurement is aimed to the H.264 video structure where GoP lengths and frame sizes are inspected. From these two investigations we are able to create IPTV statistics. For packet based measurements we used the well known Wireshark program that can also run on Ubuntu Linux. We modified the settings of Wireshark so it is able to display the interarrival time with a nanosecond time resolution. This nanosecond resolution is not the same as the precision of measurement. Because normal non real time operating systems are not very usable for time sensitive signal processing or measurements, measured results are affected by a variable operating system load dependent error. Also when a real-time kernel would be used the error wouldn’t be much smaller because of minimal guaranteed system response time which is commonly bigger than 20 ms. But this error can be reduced because the processed signal is a MPEG2 TS with constant interarrival time of packets between two consecutive PCR (Program Clock Reference) transmissions. 1) IPTV Packets Interarrival Times Figure 1 shows the measured interarrival time of IPTV packets with time errors. These errors can be effectively filtered with a 1 dimensional median filter which can be used multiple times in tandem (Fig. 2). Times T1 and T2 equals. The picture shows them as two nonequal intervals but the X axes displays the packet number and the Y axes shows the interarrival time. When interarrival times are smaller, more packets have to be sent out because the 100 ms PCR interval can’t be broken. On the other hand with a higher interarrival time fewer packets need to be transmitted. Fig. 1: Measured IPTV packets interarrival time. Fig. 2: Filtration of IPTV packets interarrival time using a 1D median filter. Red line - original measured interarrival time, blue line – filtered curve. Figure 3 shows the PDF (Probability Distribution Function) of measured interarrival time of a chosen IPTV HD stream. As the figure shows the PDF can be approximated by the Inverse Gaussian PDF. Other measurements fit better to other distribution functions e.g. Johnson SB, Log-Logistic, Gamma, Burr or Lognormal. The best fitted distribution function depends on many factors when creating an IPTV stream. Therefore it cannot be said that the best fitted distribution function is one of the mentioned above. We have also made excessive measurements to evaluate an overall PDF for a mean IPTV HD stream which is made from 20 IPTV HD streams. We choose as the best fitting PDF the Burr distribution function. The best fitting PDF depends on the content and video coding. c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 405 INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE Therefore another IPTV provider can use other video coding settings. The results would vary but the selected Burr distribution function can lead to similar behavior when IPTV services provider’s streams uses VBR and GoP structure that matches to the proposed model. Fig. 3: PDF of packets interarrival time of a one chosen IPTV HD stream. Red curve shows an approximation by the Inverse Gaussian distribution. 2) IPTV GoP Structure and Frame Sizes The next section describes results obtained from disassembled IPTV HD H.264 streams. For purposes of analysis, we used 4,8 hours long IPTV records with a predefined I B B B P B B B P . . . . GoP structure with a variable length. The overall number of used frames is 429 993 that are arranged into 16 388 GoP intervals with the mean GoP length of 26,24 frames. Figure 4 shows the distribution of GoP structures in the used movies. In most cases it uses the GoP of 30 frames. Smaller GoPs are results of scene cuts in video content. The average length of GoP structure is 26,238 frames. This variable cannot be described by a known discrete PDF. Therefore we model this PDF manually and automatically. Fig. 4: Histogram of GoP lengths. Figure 5 displays the PDF of I frame sizes. This distribution can be precisely approximated by the Burr PDF. Also B and P frames can be approximated by this PDF. The Burr CDF (Cumulative Distribution Function) is defined in Eq. (1), where αand kare conFig. 5: Histogram of I frame sizes. tinuous shape parameters and βis a continuous scale parameter: CDF (x)=1−1 + x βα−k .(1) PDF of I, B and P frame sizes are approximated with Burr PDF with the following parameters: •I: k= 2,3478, α= 2,8266 and β= 180 166, •B: k= 1,0607, α= 3,2577 and β= 18 576, •P: k= 1.7858, α= 3,5889 and β= 78 457. 3. H.264 HD Generator This section describes the generator design and results. The results are compared to real IPTV H.264 HD traffic. 3.1. Generator Design The generator defines four levels of creating content. At the first the generator defines the GoP lengths. This can be considered as the fourth level. The lengths are then replaced by a defined static GoP structure of the H.264. Main profile which is the third level. These frames are after the creation of GoP structure replaced by frame sizes in bytes which is the second level. The first level is the packetization of generated frames into RTP, UDP, IP and Ethernet frames. The packetization process takes the MPEG2 TS PCR into account. Manually generated GoP lengths are using an uniform random number generator in R∈ h0,1iwhich drives an ON/OFF model. A generated real number is used as an input to the ON/OFF model. For example if the generated value is equal to 0,24015 and defined ranges for the twenty first state of the ON/OFF model are between 0,240125 and 0,24025 the generated GoP length equals to 21. The automated generation of GoP lengths is defined by the measured GoP PDF. The generator code uses a c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 406 INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE uniform random numbers generator in R∈ h0,1iwhich uses the recorded discrete GoP PDF value. The output value is used for searching the recorded GoP PDF in reverse to discover the best position of the current bar of the discrete GoP PDF. After this search a GoP length output value is generated. The generated number of the manual or automated generators is replaced by a defined GoP structure of I, B and P frames. This structure is defined as static, so it does not change during generation of IPTV packets. We used the I B B B P B B B P . . . structure. Every generated stream begins with I frames. When generating more streams in parallel they will generate at the beginning of this tests a high amount of data because of this fact. Therefore delayed stream generation should be used. Frame sizes are generated using the Burr CDF. The inverse function of the Burr CDF formula Eq. (1) is showed in Eq. (2) which is used as a generating function for I, B and P frame sizes in bytes. The CDF (x) argument is replaced by a uniform random number generator in R∈ h0,1i. The generated GoP structure is then replaced by frame sizes in bytes. These sizes take also the MPEG2 TS overhead into account. We also define minimum and maximum frame sizes in bytes for generated frames: I h782,750000i, B h188,115000iand Ph188,252000iand the occurrence of B and P frames that could be bigger than I frames to 0,5 %: x=β(1 −CDF (x)) 1 −k−1 1 α.(2) Packets are generated from the sequence of frame sizes that consist of payload and a MPEG2 header. These data have to be split into 188 bytes long chunks. Seven of these chunks are then encapsulated into packets with the 12 B RTP, 8 B UDP, 20 B IP and 38 B Ethernet overhead (Ethernet overhead includes Inter Frame Gap, Preamble, Destination Address, Source Address, Type field and Forward Error Correction). Because PCR is sent every 100 ms the interarrival time of IPTV packets have to be constant in this time. When the frame rate of an IPTV stream is 25 frames per second the 100 ms time interval equals to 2,5 frames. So the number of generated packets is a function of the number of bytes that have to be sent out and the 100 ms time interval. Then the number of packets is converted to the time between generation of packets in this manner: (100/number of packets) in milliseconds. The packet size (Ethernet frame size) of 1 394 bytes remain always the same. The comparison of measured and generated IPTV HD streams is discussed in several ways. Figure 6 shows the comparison of CDFs of measured and generated times between generations of packets. The solid line shows the CDF of measured IPTV traffic as a function of itself. The dashed line shows the CDF of generated IPTV traffic as a function of the CDF of measured traffic. As can be seen from these results the slope of lines is approximately the same and the maximal absolute difference between them is 0,1. Fig. 6: Comparison of Cumulative Distribution Functions where: solid line shows the CDF of measured IPTV HD stream and the dashed line shows the CDF of generated IPTV HD stream. Figure 7 and Fig. 8 show Lag-plots of measured and generated interarrival times of IPTV packets. The generated traffic is more concentrated around the base line as the generated traffic. This is the result of a non perfect median filtering of measured times. These times vary a bit around the mean value within a PCR interval. On the other side the generated traffic remains a constant time between generation of IPTV packets within a PCR interval. Fig. 7: Lag plot of interarrival times of chosen measured IPTV HD traffic stream with applied median filter. For the purpose of testing the model we used an in MatLab developed network simulator with QoS (Quality of Service) mechanisms applied. The testing scenario uses IPTV streams multiplexed to 366 Mb·s−1 using a FIFO switch at Head End. These streams are then transported to a switch where VoIP and Data traffic classes are merged. This switch uses the WRR (Weighted Round-Robin) method for preferring VoIP and IPTV classes. Every test uses the same VoIP and c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 407 INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE Fig. 8: Lag plot of times between generation of IPTV HD traffic packets. Fig. 9: RFC 3550 packet delay variation PDF of multiplexed 336 Mb·s−1generated (red) and real (blue) IPTV H.264 HD traffic. Fig. 10: One-way delay PDF of generated (red) and real (blue) IPTV traffic that occurred in the test network. Data classes’ sequences with different IPTV records (generated and measured). Figure 9 shows the RFC 3550 packet delay variation PDF of generated and real traffic measured between the input of the first switch in the simulated network and the output of the last switch in network. The correlation coefficient of these two curves equals to 0,99987. Also one way delay has equivalent properties with a correlation coefficient of 0,99987 (Fig. 10). In the test scenarios no IPTV packets were lost so the lost rate is not discussed. In tests where the IPTV traffic suffers transfer losses in simulation network these losses are about the same. 4. Conclusion In this paper we propose a four-level HD H.264 VBR IPTV stream generator. Real world video streams are analyzed and results are used for the model definition. Realized simulations and measurements have shown that the generator is precise and can be used in simulations and in real word testing. Acknowledgment This work is a part of research activities conducted at Slovak University of Technology Bratislava, Faculty of Electrical Engineering and Information Technology, Institute of Telecommunications, within the scope of the projects ”Grant programme to support young researchers of STU - Modeling of Traffic and Traffic Parameters in IPTV Networks”, ”Support of Center of Excellence for SMART Technologies, Systems and Services II, ITMS 26240120029, co-founded by the ERDF” and project VEGA no. 1/0106/11 ”Analysis and Proposal for Advanced Optical Access Networks in the NGN Converged Infrastructure Utilizing Fixed Transmission Media for Supporting Multimedia Services”. References [1] CHROMY, E., M. JADRON and T. BEHUL. Admission Control Methods in IP Networks. Advances in Multimedia. 2013, vol. 2013, no. 2, pp. 1– 7. ISSN 1687-5699. DOI: 10.1155/2013/918930. [2] KOVAC, A. and M. HALAS. E-Model MOS Estimate Precision Improvement and Modelling of Jitter Effects. Advances in Electrical and Electronic Engineering. 2012, vol. 10, no. 4, pp. 276–281. ISSN 1336-1376. [3] KOCKOVIC, L. and I. BARONAK. Alternatives of Providing IPTV Using IP Multimedia Subsystem. International Journal of Computers and Technology. 2012, vol. 3, no. 2, pp. 188–192. ISSN 2277-3061. [4] O’DRISCOLL, G. Next generation IPTV services and technologies. Hoboken: Wiley-Interscience, 2008. ISBN 978-0-470-16372-6. [5] RFC 3550. RTP: A Transport Protocol for RealTime Applications. Columbia University: ITUT Network Working Group, 2003. Available at: http://datatracker.ietf.org/doc/rfc3550/. [6] WAN, F., L. CAI and T. A. Gulliver. A Simple, Two-Level Markovian Traffic Model for IPTV Video Sources. In: 2008 IEEE Global c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 408 INFORMATION AND COMMUNICATION TECHNOLOGIES AND SERVICES VOLUME: 11 |NUMBER: 5 |2013 |SPECIAL ISUUE Telecommunications Conference. New Orleans: IEEE, 2008, pp. 1–5. ISBN 978-1-4244-2324-8. DOI: 10.1109/GLOCOM.2008.ECP.288. [7] KEMPKEN, S. and W. LUTHER. Modeling of H.264 high definition video traffic using discretetime semi-markov processes. In: Proceedings of the ITC 2007, Lecture Notes in Computer Science (LNCS). Ottawa: Springer-Verlag, 2007, pp. 42– 53. ISBN 978-3-540-72990-7. DOI: 10.1007/978-3540-72990-7 8. [8] DAI, M., Y. ZHANG and D. LOGUINOV. A unified traffic model for MPEG-4 and H.264 video traces. IEEE Transactions on Multimedia. 2009, vol. 11, iss. 5, pp. 1010–1023. ISSN 1520-9210. DOI: 10.1109/TMM.2009.2021802. [9] RELJIN, I., A. SAMCOVIC and B. RELJIN. H.264/AVC video compressed traces: multifractal and fractal analysis. EURASIP Journal on Applied Signal Processing. 2006, vol. 2006, no. 1, pp. 1–13. ISSN 1687-6180. DOI: 10.1155/ASP/2006/75217. About Authors Stanislav KLUCIK was born in Bratislava, Slovakia, in 1984. He received the Master degree in telecommunications in 2009 from Faculty of Electrical Engineering and Information Technology of Slovak University of Technology in Bratislava (FEI, STU). In 2012 he submitted a Ph.D. work from the field of Source and QoS traffic parameters modeling in NGN networks and his scientific research is focused on packet generators and modeling of packet networks. Nowadays he works as research at the Institute of Telecommunications of FEI STU Bratislava. Martin LACKOVIC was born in Trnava, Slovakia, in 1989. He received the Master degree in telecommunications in 2013 from Faculty of Electrical Engineering and Information Technology of Slovak University of Technology (FEI, STU) Bratislava. His scientific research is focused on modeling of packet generators, traffic parameters and networks. Nowadays he works as technician in an IT company. c 2013 ADVANCES IN ELECTRICAL AND ELECTRONIC ENGINEERING 409