[IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA...

4
Network Coding for Streaming Video over P2P Networks Francisco de Asís López-Fuentes, Cesar Cabrera-Medina 1 Departamento de Tecnologías de la Información Universidad Autónoma Metropolitana Cuajimalpa (UAM-C) Mexico City, Mexico [email protected] AbstractIn this contribution we simulate network coding and evaluate its benefits for streaming video over P2P networks. Network coding has emerged as a promise technique in the information theory field. This novel technique has shown several benefits in the communication networks related to throughput, security and resources optimization. In this work, we implement network coding for a multi-source P2P scenario. The video is encoded in the sources, while the intermediate nodes implement network coding before forwarding the encoded packets to the end nodes. The received packets are decoded in each receiving peer in order to recovery the original video. Our scheme is implemented under the H.264/MPEG-4 AVC compression standard and using the network simulator (NS-2). We evaluate our scheme in terms of overall throughput, packet loss and video quality. Results show that these parameters can be improved in P2P video streaming systems by using network coding. Keywords - peer-to-peer networks; network coding; video streaming. I. INTRODUCTION 1 Video streaming typically requires high data rate, low- latency, or high throughput in order to offer video quality to the viewers. However, traditional transmission techniques, based on a method known as store-and-forward, are not capable of supporting such applications. This traditional transmission technique introduces a delay at the input to each link along the packet’s route, which can affect the video quality to the viewers. New media distribution techniques and schemes need to be introduced to deal with these problems. In recent years, peer-to-peer (P2P) networks have emerged as a promising infrastructure to stream video over the Internet. A P2P overlay network is built by a group of nodes located in a physical network. No dedicated infrastructure is required by the P2P systems. In these systems, each peer can take the roles of both server and client at the same time. Therefore, all available resources are provided by the peers. However, due its limited capacities, many peers could be required as source peers during a video streaming session. To face these challenges, several video streaming applications involve schemes with multiple sources. Multiple sources [14], [15] help to alleviate the unpredictability congestion in the Internet and it has been proposed as an alternative to provide smooth video delivery. 1 Posgrado en Ciencias y Tecnología de la Información Universidad Autónoma Metropolitana-Unidad Iztapalapa. On the other hand, network coding paradigm has been developed in parallel to the P2P technologies. This new technique allows the intermediates nodes to encode the received packets to immediately forward them to the end nodes. This new approach has generated a considerable debate against the traditional technique of “storing and forwarding”. Several studies have found that network coding improves the throughput, scalability and robustness of a system [3], [4]. Sensors networks [5], [6] and security [7] are some areas of the communications networks impacted by network coding. In this work, we evaluate network coding for streaming video over P2P networks. Our Network coding implementation realized in the intermediate nodes is based on the model introduced by Chou et al. in [9]. Our simulations use different video sequences under the CIF (Common Intermediate Format) video format, which defines video sequence with a resolution of 352x288. All video sequences used in these experiments were compressed using the H.264/MPEG-4AVC standard. We use the UDP (User Datagram Protocol) as the communication protocol among all peers. We evaluate the performance of our P2P system with network coding for streaming video in terms of packets loss, throughput and video quality. In our experiments, we use two different P2P schemes: traditional P2P network and a P2P network with network coding. Our results show that network coding improves the throughput, decreases the packet loss and improve the video quality in the receivers. This paper is organized as follows. Section II introduces the main idea of network coding. Then, we describe our video streaming scheme with network coding over P2P networks in Section III. The performance of our model is evaluated in Section IV. This paper concludes in Section V. II. NETWORK CODING CONCEPT Network coding [1] is a novel technique in the field of information theory, and has been proposed to face the problem of network information flow in the communication networks. Information flow is in general not optimal to regard the information to be multicast as a fluid, rather, by employing coding at the intermediates nodes on the networks, to increase the flow without exceeding the channel capacity. The network can be represented as a directed graph G = (V, E), where the network nodes are represented by V, and the edges E represent the communication channels. The channel capacity is of one data unit per unit time. The source node is a node without 2013 IEEE International Symposium on Multimedia 978-0-7695-5140-1/13 $26.00 © 2013 IEEE DOI 10.1109/ISM.2013.63 329 2013 IEEE International Symposium on Multimedia 978-0-7695-5140-1/13 $26.00 © 2013 IEEE DOI 10.1109/ISM.2013.63 329

Transcript of [IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA...

Page 1: [IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA (2013.12.9-2013.12.11)] 2013 IEEE International Symposium on Multimedia - Network Coding for Streaming

Network Coding for Streaming Video over P2P Networks

Francisco de Asís López-Fuentes, Cesar Cabrera-Medina1

Departamento de Tecnologías de la Información Universidad Autónoma Metropolitana Cuajimalpa (UAM-C)

Mexico City, Mexico [email protected]

Abstract— In this contribution we simulate network coding and evaluate its benefits for streaming video over P2P networks. Network coding has emerged as a promise technique in the information theory field. This novel technique has shown several benefits in the communication networks related to throughput, security and resources optimization. In this work, we implement network coding for a multi-source P2P scenario. The video is encoded in the sources, while the intermediate nodes implement network coding beforeforwarding the encoded packets to the end nodes. The received packets are decoded in each receiving peer in order to recovery the original video. Our scheme is implemented under the H.264/MPEG-4 AVC compression standard and using the network simulator (NS-2). We evaluate our scheme in terms of overall throughput, packet loss and video quality. Results show that these parameters can be improved in P2P video streaming systems by using network coding.

Keywords - peer-to-peer networks; network coding; video streaming.

I. INTRODUCTION1

Video streaming typically requires high data rate, low-latency, or high throughput in order to offer video quality to the viewers. However, traditional transmission techniques, based on a method known as store-and-forward, are not capable of supporting such applications. This traditional transmission technique introduces a delay at the input to each link along the packet’s route, which can affect the video quality to the viewers. New media distribution techniques and schemes need to be introduced to deal with these problems. In recent years, peer-to-peer (P2P) networks have emerged as a promising infrastructure to stream video over the Internet. A P2P overlay network is built by a group of nodes located in a physical network. No dedicated infrastructure is required by the P2P systems. In these systems, each peer can take the roles of both server and client at the same time. Therefore, all available resources are provided by the peers. However, due its limited capacities,many peers could be required as source peers during a video streaming session. To face these challenges, several video streaming applications involve schemes with multiple sources. Multiple sources [14], [15] help to alleviate the unpredictability congestion in the Internet and it has been proposed as an alternative to provide smooth video delivery.

1 Posgrado en Ciencias y Tecnología de la Información – Universidad Autónoma Metropolitana-Unidad Iztapalapa.

On the other hand, network coding paradigm has been developed in parallel to the P2P technologies. This new technique allows the intermediates nodes to encode the received packets to immediately forward them to the end nodes. This new approach has generated a considerable debate against the traditional technique of “storing and forwarding”. Several studies have found that network coding improves the throughput, scalability and robustness of a system [3], [4]. Sensors networks [5], [6] and security [7] are some areas of the communications networks impacted by network coding.

In this work, we evaluate network coding for streaming video over P2P networks. Our Network coding implementation realized in the intermediate nodes is based on the model introduced by Chou et al. in [9]. Our simulations use different video sequences under the CIF (Common Intermediate Format) video format, which defines video sequence with a resolution of 352x288. All video sequences used in these experiments were compressed using the H.264/MPEG-4AVC standard. We use the UDP (User Datagram Protocol) as the communication protocol among all peers. We evaluate the performance of our P2P system with network coding for streaming video in terms of packets loss, throughput and video quality. In our experiments, we use two different P2P schemes: traditional P2P network and a P2P network with network coding. Our results show that network coding improves the throughput, decreases the packet loss and improve the video quality in the receivers.

This paper is organized as follows. Section II introduces the main idea of network coding. Then, we describe our video streaming scheme with network coding over P2P networks in Section III. The performance of our model is evaluated in Section IV. This paper concludes in Section V.

II. NETWORK CODING CONCEPT Network coding [1] is a novel technique in the field of

information theory, and has been proposed to face the problem of network information flow in the communication networks. Information flow is in general not optimal to regard the information to be multicast as a fluid, rather, by employing coding at the intermediates nodes on the networks, to increase the flow without exceeding the channel capacity. The network can be represented as a directed graph G = (V, E), where the network nodes are represented by V, and the edges E represent the communication channels. The channel capacity is of one data unit per unit time. The source node is a node without

2013 IEEE International Symposium on Multimedia

978-0-7695-5140-1/13 $26.00 © 2013 IEEE

DOI 10.1109/ISM.2013.63

329

2013 IEEE International Symposium on Multimedia

978-0-7695-5140-1/13 $26.00 © 2013 IEEE

DOI 10.1109/ISM.2013.63

329

Page 2: [IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA (2013.12.9-2013.12.11)] 2013 IEEE International Symposium on Multimedia - Network Coding for Streaming

any incoming edge. Network coding is inspired by the max-flow min-cut theorem which states that [2]: “The maximum amount of flow through the source to the destination equals the minimum capacity required to remove from the network flows that cannot pass from source to destination”.

In a single-source multicast session, source node s ϵ Stransmits information at rate R to all receivers t ϵ T, and the maximum multicast information rate in this scenario can be achieved only by allowing coding at intermediate nodes [1]. This optimal multicast rate can be given by finding the capacity through the Max-Flow Min-Cut Theorem above described, which relates the maximum information flow through a network to the minimum cut capacity.

In order to illustrate the network coding concept Figure 1 shows a scenario for a butterfly network with a source node and two receiver nodes. Figure 1a) shows the capacity of each edge. We can observe that the values of the maximum flow of the source S to any receiver, either R1 or R2 are equal to two. Therefore, in Figure 1b), the source S can send two bits b1 and b2 to R1 and R2 simultaneously. In this scheme, each intermediate node only replicates and sends out the bit(s) received from upstream. On the other hand, Figure 1c) shows the same network configuration, only that now network coding is implemented. Here, operator �denotes the sum modulo 2. Thus, the receiver R1 can recover the two bits b1 and b2. Only that b2 must be retrieved from 21 bb � . Similarly, R2 can recover the two bits. In this example, network coding is applied in the node 3. Another important point to highlight is that the rate multicast increases, because for traditional transmission is 1 bit/time unit, while applying network coding the rate increases to 2 bits/time unit.

III. P2P VIDEO STREAMING MODEL Our reference P2P scheme in Figure 2 is shown for four

source, three receivers and two intermediate nodes. The receiver nodes work as peers, and distribute the received content together. Thus, receivers 1, 2 and 3 take the role of both a server and of a client at the same time. This scenario is used to deploy our multicast schemes. Bottleneck problems are most likely to be present in this scenario. Therefore, we can evaluate the systems robustness by applying network coding techniques. Two multicast schemes are deployed over the P2P network. The first scheme does not use network coding, and the intermediates nodes act as in the traditional networks. Second scheme applies network coding in the intermediate nodes of the network. In Figure 2, the intermediate nodes 1 and 2perform a linear combination of packets, which are stored in its buffers. On the other hand, receivers 1, 2 and 3 store and forward the received packets. They are also responsible for decoding and reconstructing the original video.

Our network coding scheme follows the concept introduced in [9], which use a new package format consisting of a global coding vector and the payload. The payload is divided into fields of size 28 or 216, that is to say, each symbol is 8 or 16 bits. An acyclic graph is assumed for this scheme, where each edge is of unit capacity and also has a source S and set of receivers T. Each edge emanating from a node carries a symbol that is a linear combination of the symbols on the edges that are incoming edges to node. Therefore, there is a global encoding vector along the edges. Each node receives packets that are linear combinations of the source packages and stores them in an array. In the scheme proposed by Chou et al. [9], each node sends packets obtained as a random linear combination of packets stored in its buffer. So within each package is a global coding vector of dimension h. Any receiver can then recover the source vectors using Gaussian elimination on the vectors in its received packets. Packets arrive at the receiving nodes on the incoming edges, and they may find related packages, that is to say, with the same source vector. This type of packages is known as packets of the same generation, where h represents the size of the generation. All packages of the same generation are labeled with the same generation number. The

Figure 1. Example of a communication network. a) capacity of the edges, b) traditional approach and c) approach with network coding Figure 2. Our P2P distribution scheme

Intermediate nodes

330330

Page 3: [IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA (2013.12.9-2013.12.11)] 2013 IEEE International Symposium on Multimedia - Network Coding for Streaming

policy used by Chou et al. consists in “emptying the current generation before reaching the next generation”. This policy indicates that we must attend the packets of a same generation that existed before to attend to other packets of a different generation.

III. SIMULATION AND EVALUATION Our simulation is implemented on the Network Simulator

NS-2, which is a discrete event simulator targeted at networking research [10]. Several simulations of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks can be supported by this simulator. NS-2 is divided into two hierarchies, the compilation written in C++ and the interpreter in OTcl. Both hierarchies are closely linked. Our simulation scenario issimilar to scheme shown in Figure 2. Video sequences used in our simulations are represented in each source node. All receiver nodes expect to receive all video sequences.

We use the following simulation parameters. The edges delay is 10 ms, the buffers size in each node is 819 Kb, and UDP is the transport protocol. A dense mode version is used in the routing protocol. This protocol works as follows. Initially, the protocol assumes that all nodes in the network are receivers of multicast traffic and therefore packets are transmitted across the network. Each node that receives such traffic, but not requires it, sends a test message via the interface where it is received. This process is known as tree pruning and runs every few minutes. To simulate the video traffic in our experiments, we have used the video traffic generated from the EvalVid project (a video quality evaluation tool). EvalVid is a research project carried out by the TKN group at the Faculty of Electrical Engineering and Computer Science at the Technische Universität Berlin [11]. The video traffic generation in the NS-2 simulator follows the next steps: First, we use uncompressed video sequences in CIF format (352x288), which are available from [8]. This video sequences are sampled in a videoconferencing format (format: 4:2:0). After this, we compress the video files according to the H.264/MPEG-4 AVC standard. To this end, the videos sequences were encoded to 30 frames per second with a variable bit rate using the JM 17.1 software [12]. Then, the video frames are packaged using the Real-Time Protocol (RTP). The MP4Box software is used to carry through this task [13]. The size of each packet is 1024 bytes. Next, a trace file is generated in order to be used in the NS-2 network simulator. This file is created using the mp4trace software, which is part of the EvalVid project [11]. Finally, a traffic source is generated in NS-2 declaring an UDP shipping agent and a receiving agent within the simulator.

Our simulation uses YUV video sequences, which are processed following the instructions previously described in order to obtain a trace file with all frames of the video sequences. All frames are packaged in accordance with UDP. To encode the source packages x1,...,xh, using network coding all packets must have the same size. Although the

maximum size of packets is 1024 bytes, due to UDP protocol, we can obtain packets with different size. Then, we need to search series of packets with same size to encode in the source node and obtain the packets y(e1),…,y(eh).These encoded packets are stored in the same buffer as the origin packets xn, and sent to intermediate nodes. Encoded packets are received and queued in the buffer of the intermediate nodes. Once received two packets, they are combined using XOR operation, and the new obtained packet is sent to next node in the network. Once the packets arrive to the buffers of the receiving nodes, the next step is to decode. For this task, we apply the method of Gaussian elimination. Decode is realized by an extern module to the NS-2 simulator. We use the following video sequences:Akiyo (300 frames), Foreman (300 frames), Container (300 frames) and Hall Monitor (300 frames), which are located in sources 1, 2, 3 and 4, respectively. In this scheme all receiving nodes act as peers because they receive and forward part of the encoded contents.

Our P2P scheme is evaluated in terms of throughput, video quality and packet loss. PSNR (peak-signal-noise-ratio) is used as the video quality metric. Figure 3 shows the average system performance. These measurements are realized in node 1 for a bit rate of 500 Kbps. We can see that the average throughput is higher if network coding is applied while the bandwidth is below 1.7 Kbps, after this threshold, the average throughput is similar in both cases (with network coding and without network coding).

Video quality constitutes our second parameter to be evaluated. We use the peak-signal-to-noise-ratio (PSNR) as the quality metric. For this experiment, the Foreman, Akiyo,Container and Hall Monitor video sequences are encoded at different bit rate using the JM software [12]. The bit rates used for encoding these video sequences are 16, 64, 200, 500 and 1000 kbps. We measure the PSNR in the three receiving nodes (receiver 1, receiver 2 and receiver 3). We measure the PSNR in the three receiving nodes. However, in this paper, the PSNRs obtained in the receiver 2 are shown only in Figure 4. We can see how the Container video sequences reach a higher PSNR when network coding is applied than if is used a traditional video transmission

Figure 3. Average system throughput comparison

331331

Page 4: [IEEE 2013 IEEE International Symposium on Multimedia (ISM) - Anaheim, CA, USA (2013.12.9-2013.12.11)] 2013 IEEE International Symposium on Multimedia - Network Coding for Streaming

without network coding. The results shown that for small values of bits rate in the compressed videos, the PSNR obtained from P2P system with network coding is higher than a conventional P2P system without network coding. As the bit rate is increased, the difference in PSNR values is decreased. However, at no time the SNR values obtained from the traditional scheme outweigh the values obtained from the scheme with network coding. Poor quality or PSNR reduction on the system is largely due to the amount of lost packets. The PSNR values obtained for the other video sequences and receiving nodes have a similar behavior, and these are not presented in this paper. From these findings, we can argue that video quality can be improved by using network coding when a packet loss event occurs in a P2P network.

Our experiments show that all video sequences present a high percentage of packet loss in all receiver nodes when network coding is not used (see Figure 5). However, some video sequences are received free of packet loss by the receiver nodes when the network coding is implemented inthe video streaming sessions.

VI. CONCLUSIONS We presented and evaluated a P2P network using

network coding for video delivery to a set of receiving nodes. Our network coding scheme does not require a centralized knowledge of the network and introduces a new package format, which contains a global coding vector and the payload. The video packets are streamed via UDP connections. We evaluated our multi-source scheme using the network simulator NS-2. Different video sequences were compressed under the H.264/MPEG-4 AVC standard and evaluated in this simulator. Mainly, we are interested in evaluating the overall throughput, video quality and packet loss in a P2P network using network coding techniques. Our results show that if network coding is not used, the number of lost packet is increased in the P2P network and the video quality (PSNR) is proportionally reduced. From these findings, we can argue that a P2P scheme with network coding achieves a promising performance in terms of throughput, video quality and packet compared with atraditional P2P networks without network coding.

REFERENCES

[1] R. Ahlswede, N. Cai, S-Y. Li and R. W. Yeung, “Network Information Flow,” IEEE Transaction on Information Theory. vol. 46, No. 4, July 2000, pp.1204-1216, doi:10.1109/18.850663.

[2] B. Bollobas, “Graph Theory, An Introductory Course,” Springer-Verlag. New York, NY. 1979.

[3] C. Gkantsidis and P. R. Rodriguez, “Network Coding for Large Scale Content Distribution,” IEEE INFOCOM 2005, IEEE Press, March 2005, pp. 2235-2245, doi: 10.1109/INFCOM.2005.1498511 .

[4] J. K. Sundararajan, D. Shah, M. Medard, M. Mitzenmacher and J. Barros, “Network Coding meets TCP,” IEEE INFOCOMM 2009,IEEE Press, April 2009, pp. 280-288, doi: 10.1109/INFCOM.2009.5061931

[5] L. Keller, E. Atsan, K. Argyraki and C. Fragouli, “SenseCode:Network Coding for Reliable Sensor Networks,” Technical Report2009, EPFL. Last updated July, 2010.

[6] O. Gnawali, R. Fonseca, K. Jamieson, D. Moss and P. Levis, “Collection tree protocol,” 7th ACM Conf. on Embedded Networked Sensor Systems (SenSys), ACM Press, November 2009, pp. 1-14, doi: 10.1145/1644038.1644040

[7] L. Lima, S. Gheorghiu, J. Barros, M. Medard, and A. Toledo-López, “Secure Network Coding for Multi-Resolution Wireless Video Streaming,” IEEE Journal of Selected Areas in Communications, vol.28, No. 3, April 2010, pp. 377-388, doi: 10.1109/JSAC.2010.100409.

[8] Video sequences, http://www.tkn.tu-berlin.de/research/evalvid/cif. html.

[9] P. Chou, Y. Wu, and K. Jain, “Practical Network Coding,” 51st

Allerton Conference Communication, Control and Computing, October 2003, Monticello, IL., USA.

[10] S. Mccanne, S. Floyd, and K. Fall, “The Network Simulator, ns-2,”http://www.isi.edu/nsnam/ns.

[11] EvalVid - A Video Quality Evaluation Tool. http://www.tkn.tuberlin. de/research/evalvid/

[12] JM v.17.1 Software, Fraunhofer Heinrich-Hertz-Institut, http://ip.hhi.de/index.htm.

[13] MP4Box software, http://www.tkn.tu-berlin.de/research/evalvid/ [14] T. Nguyen and A. Zakhor, “Multiple Sender Distributed Video

Streaming,” IEEE Transactions on Multimedia. vol. 6, No. 2, April 2004, pp. 315-326, doi: 10.1109/TMM.2003.822790.

[15] F. A. López-Fuentes and E. Steinbach, “Multi-source video multicast in peer-to-peer networks,” Proc. of the IEEE InternationalSymposium on Parallel and Distributed Processing (IPDPS 08), IEEE Press, April 2008, pp. 1-8, doi: 10.1109/IPDPS.2008.4536196.

Figure 5. Packet loss comparison

Figure 4. Average PSNR comparison

332332