Top Banner
Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD Master of Science Thesis Stockholm, Sweden 2013
34

Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Jun 14, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Adaptive FEC-Encoding for VideoStreaming over WiFi

ANDERS BRANDERUD

Master of Science ThesisStockholm, Sweden 2013

Page 2: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD
Page 3: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Adaptive FEC-Encoding for VideoStreaming over WiFi

ANDERS BRANDERUD

Master of Science Thesis performed at

the Radio Communication Systems Group, KTH.

August 2013

Examiner: Ben Slimane

Page 4: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

KTH School of Information and Communications Technology (ICT)Radio Communication Systems (RCS)

TRITA-ICT-EX-2013:219

c⃝ Anders Branderud, August 2013

Tryck: Universitetsservice AB

Page 5: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

AbstractIn video streaming it is important that the video stream reaches theusers in time, and without errors. To retransmit lost packets in a large-scale multimedia video transmission is often unfeasible because of theretransmission delay. Because of that errors require either costly re-transmissions or causes a downgrade of performance for the receivinguser, an important goal is to minimize the number of errors that oc-curs when transmitting data during video streaming through a wire-less channel. In this paper an adaptation-algorithm is proposed, whichadapts itself in such away that the receivers of e.g. the broadcast willreceive enough packets in order to be able to FEC-decode the receiveddata in low- as well as high loss-scenarios. The algorithm adapts itselfby changing the rate of FEC-encoded redundant packets based on thecurrent packet-loss-rate of the channel, with the aim of optimizing thebandwidth-usage and providing the receiver with playable data meetingdeadlines. It adds an additional self-adaptive amount of FEC-encodedredundant packets for each FEC-encoded-session in order to guaranteethe ability of the receiver to FEC-decode the data and play the media,even under the conditions in which the inteference-level of the chan-nel increases during the transmission of each such session. Simulationsdemonstrate that in a wireless channel with a packet loss rate of 10%,using 1000 source packets per FEC-encoded unit, 12.6% redundant pack-ets are required in order to ensure a FEC-decoding-failure probability< 1

1000 .

Page 6: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

ReferatNär man streamar video är det viktigt att videostreamen når använ-darna i tid och utan fel. Att återsända förlorade paket i en storskaligöverföring av video är ofta olämpligt p.g.a. den fördröjning som åter-sändning av paket orsakar. Eftersom att fel kräver antingen kostsammaåtersändningar eller orsakar en försämring av prestandan för den mot-tagande användaren, är det ett viktigt mål att minimera antalet fel somuppstår när man överför data genom en trådlös nätverkskanal. I den-na thesis presenteras en anpassningsalgoritm, som anpassar sig själv påsådant sätt att mottagarna av t.ex. broadcast kommer att motta till-räckligt många paket för att kunna utföra en FEC-dekodning av datan iscenarion med både små och stora paketförluster. Algoritmen anpassarsig själv genom att ändra andelen av FEC-kodade redundanta paketbaserat på kanalens nuvarande andel av paketförluster, med målet attoptimera användandet av bandbredd och att förse mottagaren med upp-spelbar data inom deadlines. Andelen FEC-kodade redundanta paket ärberäknade så att datan ska kunna dekodas och spelas upp även underde förhållanden där störningsnivån i kanalen ökar under överföringen avdatan. Simuleringar, gjorda i en trådlös kanal i vilken 10% av paketenförloras, visar att det med 1000 paket av den ursprungliga datan krävsytterligare 12.6% redundanta paket per FEC-kodad enhet för att uppnåen sannolikhet för ett misslyckande av FEC-dekodningen < 1

1000 .

Page 7: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Contents

Contents iii

List of Figures ivIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vBackground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

Streaming Video FEC . . . . . . . . . . . . . . . . . . . . . . . . . . viRelated Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Adaptive FEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiAdaptive Rate Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xImplementation of the simulation . . . . . . . . . . . . . . . . . . . . . . . xii

Implementation of sender . . . . . . . . . . . . . . . . . . . . . . . . xiiSimulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv

Simulation Setup and Design . . . . . . . . . . . . . . . . . . . . . . xivSimulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi

Multihop Delay Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiCalculation of transmission of packets in a MANET-path without

FEC-code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiConclusion And Future Work . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv

Bibliography xxvii

iii

Page 8: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

List of Figures

1 Depiction of sending and receiving FEC-encoded data over wireless channel xvi2 Average inefficiency rate for the maximum loss rates with a FEC-decoding-

failure-rate < 1/1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii3 Average inefficiency rate for the maximum loss rates with a FEC-decoding

failure-rate < 1/10000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii4 FEC-decoding-failure-rate correlating to inefficiency rate . . . . . . . . . xviii5 Data overhead-comparison between dynamic and static FEC-code. . . . xix6 Minimum packet loss-rate, correlated to compensateLossFactor. Max

packet loss-rate of the channel: 50% . . . . . . . . . . . . . . . . . . . . xxi7 Inefficiency rate, correlated to compensateLossFactor. Max packet loss-

rate of the channel: 50% . . . . . . . . . . . . . . . . . . . . . . . . . . xxi8 Times of FEC-encoding and decoding . . . . . . . . . . . . . . . . . . . xxii9 Increase of the delay as the number of hops increases. Packet loss rate:

10 % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

iv

Page 9: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Introduction

In video streaming it is important that the video stream reaches the users in time,and that it reaches reaches the user without errors. To retransmit lost packets ina large-scale multimedia video transmission is often unfeasible because of that theretransmission incurred delay is unacceptable. An important goal is to minimizethe number of errors that occur when transmitting data during video streamingthrough a wireless channel, since errors require either retransmissions or causesa downgrade of performance for the receiving user. Retransmissions are costlyand also risk that the user doesn’t receive the required data in time, leading toa degraded user experience. In Wifi-transmissions there is a varying amount ofinterference, which is not always possible to know beforehand.

The higher the interference level that is in the channel, the higher is the possi-bility for the received information to be different from the sent information. FEC(Forward Error Correction)-code can be used to add redundant packets, which canbe used by the receiver to detect and recover from corrupted packets. There is atrade-off between overhead, recoverability and latency of lost packets. RedundantFEC-packets consumes extra network resources, e.g. network bandwidth, wirelessdevice power and packet-buffer memory. A static FEC-algorithm can create a lotof overhead when the error rate is low. Because of the loss-tolerant characteris-tic of video applications, the FEC is more suitable than the ARQ for the videotransmission over wireless networks [20]. In order to avoid the disadvantages of astatic FEC-algorithm and delays caused by retransmissions, this thesis proposes anadaptive FEC-rate-algorithm, which adapts the amount of FEC-redundant packetsbased on the feedback of packet loss rate.

The main contribution of this thesis is working adaptive FEC-rate-algorithms,which adapts the amount of redundant FEC-encoded packets with a small proba-bility of FEC-decoding-failure of the received data.

Two algorithms are implemented and tested. One of these algorithms, AlgorithmAdaptive Rate Video, is optimal when packet loss exhibits spike-like characteristics;while the second, Algorithm Adaptive Rate Video, is optimal for a loss model, inwhich the loss rate is constant or continuously changing. Different simulations wereperformed in the discrete network simulator called NS-3 [1] testing the algorithmsfor their respective loss model. Furthermore, simulations were performed in orderto find out the difference in the rate of FEC-redundant packets required betweenensuring a FEC-decoding failure rate less than 1/1000 compared to 1/10000 fora varying amount of source packets per FEC-encoded unit of data. The purposeof this was to find out which amount of source packet that requires the least rateof FEC-redundant data for the specified FEC-decoding-failure-rates. Simulationswere performed in the constant loss model varying a variable called compensateLoss-Factor. This value is set to enable FEC-decoding of the FEC-unit, despite packetloss rate-increases up to a certain limit during the transmission of the next FEC-encoded-unit of data. Simulation results show how increasing this value correlatesto the rate of FEC-redundant packets and to the rate of FEC-decoding-failures.

Page 10: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

The remainder of this thesis follows the following structure: In the section Re-lated Works prominent related work in the area of FEC over Wifi is reviewed. In thesection Implementation of the simulation describes some of the implementation ofhow the sender sends and FEC-encodes the data and the receiver receives and FEC-decode the data. In the Adaptive Rate video-section, my FEC adaptation model isdescribed. In the section Simulation Results the results of the FEC adaptation sim-ulations in the discrete-event network simulator for Internet systems are presented.In the section Multihop Delay Analysis there is a theoretical analysis of time delayof transmission without FEC in multihop MANET. Finally, the section ConclusionAnd Future Work contains final words, contributions and suggested future work.

Background

Streaming Video FEC

AL-FEC (application-FEC) codes are critical to many applications. It helps torecover from symbol erasures (rather than errors): i.e. a symbol either arriveswithout any error or is altogether lost. By lowering the code rate, i.e, the ratiobetween the number of source symbols and the number of encoding symbols (i.e.number of source symbols + number of repair symbols) - a big number of extrasymbols that can be added, which will ensure that we can perform FEC-decodingcovering for a variable number of packet loss rates.

LDPC-codes uses a dedicated matrix, which is called a "parity check matrix", atthe encoding and decoding ends. This matrix defines relationships (or constraints)that are between the various encoding symbols (i.e., source symbols and repairsymbols). These symbols are later used by the decoder to reconstruct the originalk source symbols if some of them are missing. These codes are systematic, whichmeans that the encoding symbols include source symbols and repair symbols. Thesender and the receiver use the same matrix [22],

FEC-encoding and decoding can be done block per block, independently. Aparity check matrix is used for this, that forms a system of linear equations betweenthe source and repair symbols of a given block, where the basic operator is XOR.

An advantage with FEC-codes is that they often integrate the application con-straints and the codes can often be produced dynamically, just on time, with theexact encoding block size and redundancy amount needed; which is essential for theadaptation-algorithm proposed in this thesis.

In the simulations of this thesis the aim is to find an adaptive FEC-code rate-algoritm, which produces the least possible overhead of redundant data. An im-plementation LDPC-staircase-code is available in the AL-FEC libary [15] and isa reliable implementation. In Performance Analysis of a High-Performance Real-Time Application with Several AL-FEC Schemes [13] it was found that under highpacket loss conditions, the 2D-parity and RSE-codes no longer perform well in termsof the recovery capability and real-time performance. On the opposite, the LDPC-Staircase codes was shown to enable DVTS (Digital Video Transport System) to

Page 11: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

achieve almost optimal performance [13]. The LDPC-implementation was chosenbased on these reasons.

The packet erasure code take care of fading mitigation, which is very importantwhen there is mobile users in challenging propagation environments.

Related Works

Adaptive FEC

A considerable number of papers detail simulations employing adaptive FEC-code,and here we will list some of them and their contributions.

Ahn et al. [2] adapts the FEC-code based on the arrival of acknowledgment pack-ets without any specific information such as SNR (Signal to Noise Ratio) or BERfrom the receivers. The simulation indicated that the algorithm performs betterthan any static FEC-algorithm and some conventional dynamic hybrid FEC/ARQalgorithms when wireless channels are modeled with two-state Markov chain, chaoticmap, and traces collected from real sensor networks.

In [10] multi-source streaming is used for the design of a large-scale P2P stream-ing architecture. The authors focus on improving the dependability of multi-sourcevideo streaming instead of the more prevalent point-to-point streaming. They designand implement a dynamic FEC (D-FEC) protocol for multi-source video streaming,which has the ability to dynamically switch between 4 different FEC techniques toadapt to varying network conditions. The loss rate is varied during the experiment- first randomly, then quickly increasing and decreasing, followed by bursty, andfinally it is steeply increased (up to 12% lost) - in order to test the efficiency of thedifferent FEC-schemes in a highly loss-prone network. The loss rate-information isprovided by the receivers. The same tests are conducted with two different videocontent of different bit rates, 1200 Kbit/s and 2500 Kbit/s. The objective is to testhow this affects the performance of the FEC-schemes. The D-FEC algorithm is asefficient as the best adaptive FEC-protocol when the conditions exhibited by thenetwork remains stable. However, it performs poorly when the network conditionsaren’t stable enough.

In [14] the authors propose a rate allocation scheme to be used with FEC tominimize the probability of packet lost in a bursty channel. They combine pathdiversification and adaptive FEC, and show an effective way to combat bursty lossbehaviour. Several senders are providing the stream if necessary in order to streamthe video with the required bandwidth.

In [9] the transmission takes place over TCP. The performance gain is foundto be biggest when the encoded video frame size is reasonably small, in which theresults show an improvement of 12 percent for a frame size of 2 kilobyte. For thelarger frame size of 10 kilobyte the results show an improvement of 3 percent.

In the paper An Enhanced Adaptive FEC Mechanism for Video Delivery overWireless Networks [11], an Enhanced Adaptive FEC (EAFEC)-algorithm is pro-posed. It is implemented in the Access Point (AP). The FEC-code-size is deter-

Page 12: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

mined by the AP, based on both network traffic load and wireless channel state.The algorithm decides on the FEC-code–size based on the queue length in the accesspoint, which indicates the network traffic load; and based on the packet retrans-mission times, which indicates wireless channel state. The algorithm is tuning theFEC-data in a way so that it doesn’t create more traffic to the network in an alreadycongested scenario. The results of the paper, based on simulations in the softwareNS-2, shows that the proposed algorithm improves system performance.

In the paper Performance Analysis of a High-Performance Real-Time Applica-tion with Several AL-FEC Schemes [13], three FEC schemes for the erasure channelare tested in experiments: 2D parity check codes, Reed-Solomon over GF(28 ) codes,and LDPC (Low-Density Parity-Check)-staircase codes, all of them being currentlystandardized within IETF. It is found that although Application Layer ForwardError Correction (AL-FEC) is a useful technique for protecting against packet loss,the playback quality is to a large extent sensitive to the AL-FEC code/codec fea-tures and the way they are used. It is found that the LDPC-staircase (2

3 of sourcesymbols, 1

3 of repair symbols)-codes are good choices in terms of recovery capabil-ities, real-time performance and processing load, no matter the incoming packetloss rate. It was found that under high packet loss conditions, the 2D-parity andRSE-codes no longer perform well in terms of the recovery capability and real-timeperformance. On the opposite, the LDPC-Staircase codes was shown to enableDVTS (Digital Video Transport System) to achieve almost optimal performance[13].

In [3] the authors propose an adaptive H-ARQ MAC-layer protocol , in whichdifferent levels of FEC encodings are used based on different channel conditions.Each receiver notifies the multicast transmitter of the required rate of FEC-enodedpackets by using a modified RTS/CTS-exchange protocol. Results shows that theprotocol can deliver its promised performances.

In the paper Performance Analysis of the AeroTP Transport Protocol for Highly-Dynamic Airborne Telemetry Networks [18] measurements are done using the AeroTPmulti-mode transport protocol, which is shown in experiments to perform better re-sults than the traditional TCP and UDP. It utilizes five different transfer modes,one of them being fully-reliable connection using ARQ, and another one being quasi-reliable FEC-code. The quasi-reliable FEC-code provides statistical reliability. Thelink was made unreliable by introducing losses using an error model varying bit-errorprobabilities ranging from 0 to 0.0001 for each of the protocols. Each simulationcase was run 20 times and the results were averaged to obtain the data needed forcomparison. It was shown that for very high FEC-strengths (128 and 256 words per1500-byte packet), there was virtually no decrease in performance with the error-rates tested, however the performance was decreased at low error rates due to thehigh level of overhead - i.e. more FEC-code used than needed. All of the errorswere corrected using a FEC-strength higher than 96 words/packet or greater.

In the paper Adaptive FEC-Based Packet Loss Resilience Scheme for Support-ing Voice Communication over Ad hoc Wireless Networks [6], packet-level media-dependent FEC is used at the application layer combined with multipath trans-

Page 13: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

port in order to improve the voice quality. The algorithm in the paper combinesthe strengths of layered coding and multiple description (MD) coding in order tosupport error resilient voice communication over Ad hoc wireless networks. Theimportant sub-stream of the voice stream is protected with adaptive FEC-coding,which adapts based on the loss-rate in the network, and it is transmitted over twomaximally node-disjoint paths. Their schemes achieves a significant improvementin terms of reduced control overhead , reduced frame loss rate and minimum end-to-end delay; and the perceived voice quality was almost twice as good as existingapproaches when the paper was written in 2008.

In [7] an Adaptive Cross-Layer FEC mechanism (ACFEC) is proposed to en-hance the quality of video transmission over 802.11 Wireless Local Area Networks(WLANs) is proposed. It utilizes the functionalities of different layers. The ARQ-function is applied on the MAC layer to detect lost packets. It cooperates withthe UDP-protocol, and the redundancy rates of the FEC-code are adaptively basedon the loss information received by ARQ. The experimental results from the NS2-simulation performed in the paper, demonstrates that the proposed ACFEC-mechanismresults in a better PSNR under light load and high load-conditions in the channel.

In [24] Networks two approaches are presented: Adaptive FEC With Priorityto Intra frames (AFEC_PI) and Adaptive FEC with Both Intra and Inter frames(AFEC_BI). The first approach generates FEC packets only for Intra framesand the second approach makes FEC-packets for all frames, but applies differentiallevel according to the types of frames. Experimental results show that AFEC_BIincreases PSNR more than AFEC_PI at a low error rate; and that AFEC_PIimproves video quality and generate fewer FEC packets compared to the traditionalpacket-level FEC.

In [19] the authors investigate a distributed fine grain adaptive FEC (FGA-FEC) scheme that is used for scalable video streaming to heterogeneous users overa congested multihop network. The initial coding rate is based on the on the highestuser request and aggregated network condition; and intermediate nodes adapt theFGA-FEC encoded bitstream in order to satisfy heterogenous nodes. The algorithmthey propose is shown to be able to greatly reduce computation at the same timeas providing near optimal video quality, measured in terms of PSNR.

In [12] the authors propose an intelligent FEC-mechanism, Enhanced AdaptiveFEC (EAFEC), which dynamically add FEC-packets based on the network trafficload and wireless channel state. The Access Point (AP) dynamically determines therate of redundant FEC packets based on the queue length and packet transmissiontime. The results shows that it achieve similar video quality to a static FEC-algorithm without sending unnecessary FEC-packets.

In [8] the authors propose an Adaptive Cross-Layer FEC mechanism (ACFEC)in order to enhance the quality of video transmission over WLANs. Their proposedACFEC mechanism utilizes the functionalities of different layers. ARQ is used todetect lost packets. The amount of redundant FEC-packets are adaptively decidedbased on the loss information. The results demonstrate that the ACFEC mechanismis able to adaptively adjust the rate of redundant FEC-packets and performs well

Page 14: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

in temporary and persistent channel fluctuations.In [5] the authors propose an adaptive FEC-algorithm for video transmission

over error-prone and bandwidth-constrained wireless IP networks. It accomplishesthis by adjusting the optimal amount of FEC-redundant packets to reach a balancebetween the QoS of video transmission and the utilization ratio of the wirelessbandwidth. The algorithm predicts the total playable frame rate and the effectiveutilization ratio of FEC for a given packet loss. They reach a suboptimal amount ofFEC redundant packets that causes thhe QoS of the video stream and the utilizationratio of FEC to approximate the maximum. A network estimator at the sender isdesigned to estimate the wireless channel conditions based on the number of receivedACK packets.

The approach used in this thesis is better than the approach of many papersdescribing adaptive FEC in these ways:

In multicastIEEE802.11 does not support the exchangnig of ACK’s with multiple recipi-ents. Thus, the approaches of above relying on ACK’s to decide the currentloss probability of the channel, will not work in this scenario.

Less network bandwidthLess network bandwidth is used for the packets that are used to determine theloss rate. In the approaches proposed by many papers, ACK’s are sent by thereceiver for each received packet. In the approach of this thesis, many fewerpackets are sent compared to utilizing the ACK-approach. Only a few packetswith loss rate information (how many depends on the current loss rate of thechannel) are required to be sent per each FEC-unit of data transmitted. In thisthesis only two packets per FEC-unit were sent; but this is easily adaptableand to reach the best results the amount should be decided based upon thecurrent loss rate of the wireless channel.

The approach presented in this thesis has the advantage that it can be used inMANET, which isn’t the case for approaches using AP’s.

Adaptive Rate VideoA static algorithm for choosing the rate of FEC-encoded redundant packets cancreate a lot of overhead when the error rate is low. To reduce delays caused byretransmissions, we propose adaptive algorithms which choose the rate of FEC-encoded redundant packets dynamically. The proposed algorithms aim to decreaseretransmissions, optimize throughput and decrease overhead.

In the following I propose two algorithms, one algorithm, AlgorithmAdaptPacketLossRatePeak, is optimal when packet loss exhibits spike-like charac-teristics; while the second, Algorithm 2, is optimal for a loss model, in which theloss rate is constant or continuously changing. The motivation for developing twoalgorithms came from the following fact: To utilize Algorithm 1 when the loss rate

Page 15: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

is continuously changing causes a lot of overhead, because of the unnecessary highrate of FEC-redundant packets that it uses in this case. On the other hand, notquickly adapting the rate of FEC-redundant packets at the occassions when thepacket loss exhibits spike-like characteristics, causes many FEC-decoding failures.

In the case of when we are dealing with a loss rate exhibiting spike-like charac-teristics, we are using Algorithm 1:

Input: lossRate and compensateLossFactorOutput: codeRateif lossRate > lossRateForPreviousFECUnitTransmission then

newLossRate = lossRate *2 ;if (newLossRate - lossRate) <= compensateLossFactor then

newLossRate += compensateLossFactor ;endif newLossRate > MAX_LOST_RATE then

newLossRate = MAX_LOST_RATE ;end

endelse

newLossRate = lossRate+ compensateLossFactor ;endcodeRate = getCodeRateBasedOnLossRate (newLossRate);

Algorithm 1: Adaptation algorithm For Spike-Like Packet Loss

In Algorithm 1 the chosen rate of FEC-encoded redundant packets, denotedcodeRate in the algorithm, is set to enable FEC-decoding of the FEC-unit in thecases when the packet loss rate increases up to 100% during its transmission. Anillustrative example: If the packet loss rate is reported to be 15%, codeRate ischosen for FEC-encoding the data to enable FEC-decoding in the cases the packetloss rate increase up to 15 ∗ 2 = 30% during the transmission of the FEC-encodedunit. The rationale behind this approach is the findings of scenarios in which thepacket loss exhibited spike-like characteristics in experimental traces [4]. Thus, theadaptation-algorithm reacts quickly to sudden increases in packet loss.

The function GetCodeRateBasedOnLossRate, retrieves a packet loss rate-specificvalue from an array for the given loss rate. These values have been decided withthe criteria to ensure success of the FEC-decoding with a high probability. Thealgorithms use a value that is assigned at the start of the data transmission (com-pensateLossFactor). This value is set to enable FEC-decoding of the FEC-unit,despite packet loss rate-increases up to a certain limit during the transmission ofthe next FEC-encoded-unit of data. To exemplify, assigning it to the value 5 meansthat the sender will always at least add an amount of redundant packets compensat-ing for a loss rate-increase of 5% during the transmission of the next FEC-encodedunit of data. In this example: If the receiver reported a loss rate of 10%, the sender

Page 16: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

will at least add an amount of redundant packets which enables the data to beFEC-decoded in a channel with a loss rate up to 10 + 5 = 15%.

When the packet loss rate changes continuously, we are using Algorithm 2:

Input: lossRate and compensateLossFactorOutput: codeRatenewLossRate = lossRate + compensateLossFactor ;if newLossRate > MAX_LOST_RATE then

newLossRate = MAX_LOST_RATE ;endcodeRate = getCodeRateBasedOnLossRate (newLossRate);

Algorithm 2: Adaptation Algorithm For Continuously Changing Packet Loss

Implementation of the simulationThe implementation of the simulations were written in C++ and the discrete eventnetwork simulator called NS-3 provided sockets and packets are used for sending,transmission and receiving of packets. The OpenFEC-library are used for FEC-encoding and FEC-decoding the data. The simulation consists of a sender and areceiver.

Implementation of senderThe sender is initiated with the parameters of the following list:

• Initial rate of redundant FEC-encoded packets

• Packet size (symbol size)

• compensateLossFactor, described in

• Value defining whether the packets should be sent randomly or sequentially.

• Value defining which loss-model that is used. This is further elaborated on inthe Adaptive Rate Video section.

The sender reads in data files from a specified folder into an array (current-DataBufferGlobal) of the size of the number of files. Algorithm 3 describes thefunctionality of the sender. The adaptation-algorithms used are described in sec-tion . ?? is calculated by the receiver and is sent from the receiver to the senderduring each FEC-decoding of a FEC-unit of data. It is further described in theSimulation Results-section. The function FecEncodeData utilizes the FEC-librarycalled OpenFEC in order to FEC-encode the data. Each file is encoded intoRoundUpToClosestEqualOrHigherInteger( file size

symbolSize) number of symbols. AddHead-ersAndSendDataOfCurrentFecUnit is a function that for each packet adds a header

Page 17: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Input: rateOfRedundantPkts, symbolSize,compensateLossRate,nrOfFiles,lossRate,nrOfSrcSymbols,symbolNr,kindOfLossModel

for fecUnitNr = 0→ nrOfFiles dobufferOfOriginalData = currentDataBufferGlobal[i];

if fecUnitNr! = 0 thenif kindOfLossModel == CONSTANT_LOSS_MODEL_GLOBALthen

rateOfRedundantPkts =AdaptationAlgoForContinuousLossModel(lossRate,compensateLossRate)

endelse

rateOfRedundantPkts =AdaptationAlgoForSpikeLikePacketLoss(lossRate,compensateLossRate)

endendnrOfTotalSymbols = nrOfSrcSymbols / rateOfRedundantPktsencodedDataBuffer = FecEncodeData (bufferOfOriginalData,rateOfRedundantPkts, symbolSize,nrOfSrcSymbols,nrOfTotalSymbols)AddHeadersAndSendDataOfCurrentFecUnit(fecUnitNr,encodedDataBuffer,rateOfRedundantPkts,symbolSize,nrOfSrcSymbols,nrOfTotalSymbols, symbolNr)

endAlgorithm 3: Function for FEC-encoding and Sending FEC-encoded Units ofData

and after this sends the respective packets to the receiver. The header contains fe-cUnitNr, symbolNr, nrOfTotalSymbols, rateOfRedundantPkts, symbolSize and nrOf-SrcSymbols.

Implementation of receiver

The algorithm 4 describes the functionality of the receiver, which receives FEC-encoded packets and FEC-decodes FEC-encoded units of data. When a packet isreceived, its data is extracted and stored in a data structure which contains allof the currently received data for a certain number of FEC-encoded units. Thisis needed, so that we can FEC-decode one or more FEC-encodeds unit in parallelwith receiving the packets of other FEC-encoded units of data. When the packetof the FEC-unit that weren’t lost during transmission have been received, a FEC-decoding-attempt is performed. Statistics related to the decoding of this FEC-unitare recorded to a text file containing information about whether the decoding wassuccessful, information of the parameters used in the FEC-decoded unit (e.g. symbolsize, number of source symbols), transmission times), current loss rate, and other

Page 18: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

nrOfPacketsReceived = 0HIGHEST_FEC_UNIT_NR_DECODED_GLOBAL=0while true do

currentPacket = ListenToSocketForNewPkt()nrOfPacketsReceived++currentFecUnit =ExtractV alueOfPktHeader(currentPacket, FEC_UNIT_GLOBAL)currentFecUnitModulo = currentFecUnit %NR_OF_PARALLEL_FEC_UNITS_GLOBAL currentSymbolNr= ExtractValueOfPktHeader(currentPacket,SY MBOL_NR_GLOBAL)packetForCurrentFecUnitGlobal[currentFecUnitModulo][currentSymbolNr]= ExtractDataOfPkt (currentPacket)if currentFecUnit >HIGHEST_FEC_UNIT_NR_DECODED_GLOBAL OR (currentFecUnit == 0 AND nrOfPacketsReceived == 1 ) then

ExtractPktHeaderAndPutIntoGlobalFecUnitHeaderValues ()endif currentFecUnit >HIGHEST_FEC_UNIT_NR_DECODED_GLOBAL then

lastFecUnitModulo = (currentFecUnit -1 )%NR_OF_PARALLEL_FEC_UNITS_GLOBALDecodeFECUnit (lastFecUnitModulo,nrOfSrcSymbolsGlobal[lastFecUnitModulo],nrOfTotalSymbolsGlobal[lastFecUnitModulo],symbolSizeGlobal[lastFecUnitModulo],rateOfRedundantPkts[lastFecUnitModulo])HIGHEST_FEC_UNIT_NR_DECODED_GLOBAL++

endend

Algorithm 4: Function for Receiving and FEC-decoding FEC-encoded Units ofData

statistics used in the section Simulation Results.

Simulation Results

Simulation Setup and Design

Design choices

Network protocol - UDP is chosen over TCP. Using the TCP-protocol creates lim-itations for an adaptive FEC-code, because of the combination of the increasing

Page 19: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

congestion due to the redundant packets of FEC-encoded data and TCP’s conges-tion control. TCP/IP doesn’t work well on networks with a high bandwidth delayproduct. For analytical proof, please refer to [16, 17].

802.11g - In the simulations we use 802.11g, which provides transmission ratesof the 802.11a at the 2.4 GHz band, and thus provides interoperability with IEEE802.11 and IEEE 802.11b-devices. 802.11-standards family and it is backward com-patible to the old IEEE 802.11 and IEE 802.11b-specifications. In [21] the resultsprove that the new physical layer-features in it, supports improved channel capacity,mostly when all stations are using the IEEE 802.11g wireless interface.

General description of the simulations

All simulations were performed in the NS-3 network simulator [?] with UDP astransport layer [16, 17], 802.11g as link layer [21] and using two different loss models:

1. A loss model in which the interference level changes continuously.

2. A loss model in which the packet loss exhibits spike-like characteristics

The packet loss rate was monitored by the application deployed on the re-ceiver(s), by keeping track of and examining the meta data of the received packets.The meta data contains the number of the FEC-encoded unit, the packet numberwithin the FEC-encoded unit and the number of source packets (i.e. packets con-taining original data) and repair packets. Our metric of calculating the packet lossrate is presented in Equation General description of the simulations. If Total isthe total number of packets in the current FEC-encoded unit, and Received is thenumber of packets received in the current FEC-encoded units, then:

LossRate = Total −Received

Received(1)

The data to be sent was encoded into a number of separate FEC-encoded units.Each FEC-encoded unit consists of source packets and a varying amount of equallysized redundant FEC-encoded packets - further described in each simulation’s sepa-rate section. The packets were sent in a random order while discarding the specifiedpercentage of packets randomly. The average InefficiencyRate depicted on thex-axis for this and subsequent graphs is calculated as follows:

InefficiencyRate = SentPackets− LostPackets

SourcePackets(2)

Figure 1 depicts the sender, receiver and the wireless transmission channel.In the wireless transmission channel either a continuous interference model or ainterference model exhibiting peaks is applied. These loss models are described inthe Adaptive Rate Video-section

Page 20: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 1. Depiction of sending and receiving FEC-encoded data over wireless chan-nel

Simulation Results

FEC-Decoding Algorithm

A prominent goal of the simulation was to find the optimal balance between lowprobability of FEC-decoding-failure and a minimal amount of FEC-redundant data.100, 000 iterations were performed, except for in the simulation depicted in FigureFEC-decoding-failure-rate correlating to inefficiency rate, in which 1, 000, 000 iter-ations were performed. 1, 000, 000 iterations were required in order to decide theamount of required redundant packets needed to ensure a FEC-decoding failure< 10−5.

Table 1. Parameters for testing the FEC-decoding algorithm

Parameter Value(s)Size per FEC-unit 30, 100, 300, 1000

source packetsPacket size 1 kB

Nr. of FEC-units transmitted 105, 106

FEC-decoding failure rate < 10−3, 10−4, 10−5

Packet loss rate 10%

Simulations were performed to find out the difference in the rate of FEC-redundant packets required between ensuring a FEC-decoding failure rate less than1/1000 compared to 1/10000 for a varying amount of source packets per FEC-unit.The purpose was to find out which amount of source packet that requires the leastrate of FEC-redundant data for the specified FEC-decoding-failure-rates.

Figure 2 the amount of source packets of a FEC-encoded unit is inversely pro-portional to the average inefficiency rate for decoding. It is demonstrated that anincrease of the amount of source packets results in a decrease of the inefficiency rate.In order to ensure a FEC-decoding failure rate < 1/1000, 30 source packets causesan inefficiency rate of 66%, 100 packets, 28%, 300 packets, 11% and 1000 packetsresults in an inefficiency rate of 1.7%.

Also in Figure 3 the amount of source packets of a FEC-encoded unit is in-

Page 21: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 2. Average inefficiency rate for the maximum loss rates with a FEC-decoding-failure-rate < 1/1000

versely proportional to the average inefficiency rate for decoding. The decreaseof inefficiency rate between ensuring a FEC-decoding failure rate less than 1/1000compared to 1/10000, for 30, 100, 300, 1000 source packets are 21%, 11.3%, 5%,0.3%, respectively.

Simulations were performed in order to find out the balance between the rate ofFEC-encoded redundant packets and the rate of FEC-decoding-failures for a FEC-encoded unit of 300 source packets. The results, depicted in Figure 4, demonstratesthat the decoding failure rate is proportional to the inefficiency rate. It was foundthat decreasing the rate of FEC-decoding failures from 10−2, via 10−3, via 10−4, to10−5, causes an increase of the inefficiency rate with 2.3%, an additional 5.7% andan additional 14.7%, respectively. For a FEC-encoded unit of 300 source packets ofsize 1 kB and a packet loss-rate of 10%, using 42 percent FEC-encoded redundantpackets (causing an inefficiency rate of less than 28 percent), yields a FEC-decoding-failure rate that is less than 10−5. This means that transmitting 105 · 1 · 300kB =3 · · · 1010B = 30GB causes an average of 0 or 1 FEC-decoding-failures.

We have conducted the following simulations in order to evaluate how well proac-tive FEC performs in the presence of dynamically varying channel conditions. Thisincludes to find out how much FEC-encoded redundant data that is required inorder to minimize the FEC-decoding failure rate below a specified value.

Parameters for Adaptation Algorithms

This subsection specifies the parameters that were used in performing the subse-quent simulations.

Page 22: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 3. Average inefficiency rate for the maximum loss rates with a FEC-decodingfailure-rate < 1/10000

Figure 4. FEC-decoding-failure-rate correlating to inefficiency rate

Page 23: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Table 2. FEC-encoding and transmission-parameters

Parameter Value(s)Size per FEC-unit 230 to 260 source pack-

etsPacket size 1 kB (+header)

Nr. of FEC-units transmitted 100Transmission rate 5 Mbps

FEC-decoding failure rate < 1/100

Continuous Loss Model

The simulations of this section were performed in a wireless channel with a lossmodel exhibiting continuous changes of the loss rate. The sender utilized the algo-rithm 2 in order to determine the amount of FEC-redundant packets for the nextFEC-unit to be sent.

Figure 5. Data overhead-comparison between dynamic and static FEC-code.

The packet lost of the channel varied between 0 tomaximum loss rate. Maximumloss rate is depicted on the x-axis.

To illustrate the graph we provide the following example: A FEC-encoded unit

Page 24: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

of the size 250 kB is sent, encoded with the code-rate of 0.8; and at the time ofFEC-encoding, the packet loss rate was lastly reported to be 10%. 250 kB of dataare divided into 250 1kB-sized symbols. Based on the code-rate-value, 63 repairsymbols are created. The inefficiency rate is (313− (313 ∗ 0, 1))/250 = 1.124.

For the values of max loss-rate assigned to 10, 20, 30, 40 and 50 (%), ourdynamic adaptation-algorithm 2 was found to give 18.3, 33.1, 36.2, 54.7, 74.8 percentimprovement, respectively, over using a static algorithm that chooses to use the rateof redundant FEC-encoded packets corresponding to the highest potential packetloss rate of the channel.

Three of the simulations described in the figure use more repair packets thanneeded. This allows the receiver to FEC-decode the FEC-encoded data also duringchannel conditions in which the packet loss rate increases with 5, 10 respective 15% during the data transmission.

These results shows that there is a good performance-gain to win in form ofreduced overhead by adapting the FEC-code rate based on the current loss rate ina channel exhibiting a loss model with continuous changes of the interference level.

Loss model exhibiting spike-like characteristics

The simulations of this section were performed in a wireless channel with a lossmodel exhibiting spike-like characteristics. The sender utilized the algorithm 1 inorder to determine the amount of FEC-redundant packets for the next FEC-unit tobe sent. The simulations were performed in a loss model exhibiting peaks with amax packet loss-rate of 50%, exhibiting several peaks from 0 to maximum loss-rateduring the transmission of the inital packets of several FEC-encoded units.

Figure 6 depicts the minimum value of loss rate for which the decoding failedfor one or more FEC-units for different values assigned to compensateLossFactor.compensateLossFactor, depicted on the x-axis, is a value correlating to the minimumamount of redundant FEC-encoded packets added in order to safeguard againstpacket loss rate increases during the next FEC-encoded-unit of data. It is furtherdescribed in Section .Assigning compensateLossFactor to 30 (i.e. compensate forminimum increase of 30% of the loss rate during the transmission of the currentFEC-encoded unit) resulted in 0 decoding-failures.

Numerous simulations, some of which are described in section , showed thatdecoding failures which don’t show up in a small number of iterations, show upwhen a larger number of iterations are performed; thus, our results show that thisconfiguration will likely result in a small amount of decoding-failures when per-forming more iterations. These simulations show that, using the described scenario,it is possible to minimize the probability of FEC-decoding failures by using theadaptation-algorithm described in Section , including assigning compensateLoss-Factor to 30. Figure 7 shows that assigning this value results in an amount ofused redundant packets corresponding to an inefficiency ratio of 100% . The totalaverage packet loss rate in the simulations was between 25 to 27 %.

Page 25: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 6. Minimum packet loss-rate, correlated to compensateLossFactor. Maxpacket loss-rate of the channel: 50%

Figure 7. Inefficiency rate, correlated to compensateLossFactor. Max packet loss-rate of the channel: 50%

FEC Encoding/Decoding Time Measurements

Table 8 contains measurements performed of the FEC-library OpenFEC used toFEC-encode and decode the data. Initializing, encoding and decoding 100 FEC-units with 30 packets (assuming the above inefficiency ratios) in each took 100 ·(0.0007+0.0002+0.0002) = 0.11 seconds; while initializing, encoding and decoding1 FEC-unit of 3000 packets took 0.022 + 0.0004 + 0.076 = 0.0984 seconds.

Page 26: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 8. Times of FEC-encoding and decoding

Multihop Delay AnalysisIn this section we analyze the time delay for video transmission in a standard Wi-Fitransmission mode.

Calculation of transmission of packets in a MANET-path withoutFEC-codeIn this scenario there are Hopnum hops between the first node and the last nodein the MANET-structure. No FEC-code is used, so the receiver must request re-transmissions for all lost packets. The packet loss-rate is lRate. All SrcP kts, numberof packets of the playable segment, to maximize the performance in a MANET-structure this will be a small number per playable segment, are required in orderto play the segment. Thus, the first node will perform at least lRate · SrcP kts

retransmissions.Assume that the distance between two nodes is d. Assume that the channel

transmission rate is tRate. The length of each packet is sP kt bytes. The transmissiontime of one source packet is then:

tT ransmissionP erP kt = sP kt ·d

tRate

The transmission time of one playable segment without retransmissions betweentwo nodes is:

tNoRetransmit = tT ransmissionP erP kt · SrcP kts

The minimum transmission time of all packets from the first node to the lastnode in the MANET-path follows this pattern:

ttotalT ransmissionIncludingDelay =

tNoRetransmit · (lRate + l2Rate + ... + lHopnum−1Rate + lHopnum

Rate )

This equation demonstates that the delay - caused by the retransmissions - of thetransmission exponentially increases as the number of hops increases.

Figure 9 depicts the exponential growth of the delay as the number of hopsincreases when the packet loss rate of the wireless channel is 10%.

Page 27: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Figure 9. Increase of the delay as the number of hops increases. Packet loss rate:10 %

The time for the retransmission requests are neglected and the number of re-transmissions required specified above is less than what is required in the real sce-nario (in which also a percentage of the retransmitted packets are lost, causing ahigher delay) .

The simulations in Figure 2 of section demonstrated that in a wireless channelwith a constant packet loss rate of 10%, using 1000 source packets per FEC-encodedunit, 12.6% redundant packets are required in order to ensure a probability for FEC-decoding-failure < 1

1000 . This means that transmitting 103·1·1000kB = 3 · · · 108B =300MB of data (and additionally the redundant packets) causes an average of 0 or1 FEC-decoding-failures, and thus only 0 or 1 retransmissions.

As demonstrated by the above calculations, and for the FEC-based protocol -the simulations of section , adding an extra hop in a MANET-path causes standardWiFi-MANET a significant extra exponential delay, while the extra delay neededfor the FEC-based-protocol is small and bounded.

Conclusion And Future WorkIn video streaming it is important that the video stream reaches the users in time,and without errors. To retransmit lost packets in a large-scale multimedia videotransmission is often unfeasible because of the retransmission delay. Becasue of thaterrors require either costly retransmissions or causes a downgrade of performancefor the receiving user, an important goal is to minimize the number of errors thatoccurs when transmitting data during video streaming through a wireless channel.In this thesis an adaptation-algorithm was proposed, which adapts itself in such

Page 28: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

away that the receivers of e.g. the broadcast will receive enough packets in orderto be able to FEC-decode the received data in low- as well as high loss-scenarios.Simulations demonstrate that in a wireless channel with a packet loss rate of 10%,using 1000 source packets per FEC-encoded unit, 12.6% redundant packets arerequired in order to ensure a FEC-decoding-failure probability < 1

1000 .Comparisons were made of how the FEC-unit-size affects the amount of re-

dundant FEC-encoded packets required to minimize the aforementioned rate ofFEC-decoding failures. These results are very important in any transmission overa wireless channel when making decisions of which FEC-unit-size to choose to min-imize the amount of redundant data sent. It is also important when making adecision between the trade-off of the amount of redundant FEC-encoded packetsversus the FEC-decoding failure rate.

Two versions of the adaptation-algorithms were proposed, one to be used whenthe loss-rate pattern is exhibiting spike-like characteristics, and one in which it ismostly constant and/or does small changes. Simulations that were performed usingthe later loss-model show that there is a good performance-gain to win in formof reduced overhead by using adaptive rate of FEC-encoded redunant packets ascompared to using a constant rate of FEC-encoded redundant packets. Simulationsin a loss-model exhibiting spike-like characteristics, shows that it is possible tominimize the FEC-decoding-failure-probability to a value < 1/100 using a certainconfiguration outlined in the section . This results in an amount of used redundantpackets corresponding to an inefficiency ratio of numberofsentpackets−numberoflostpackets

numberofsourcesymbolsof 100%.

The proposed FEC-adaptive algorithm is useful to solve a number of problems.When sending video point-to-point over a wireless channel, the transmission shouldbe done with as high throughput as possible. It is difficult to support diverse appli-cations with an appropriate QoS in MANET, since it has a highly dynamic networkwith a varying topology and traffic load conditions and limitations in its commu-nication bandwidth and processing power capacity [23]. It is important to be ableto provide QoS, in order for a MANET-protocol to be suitable for video streaming,since the customers viewing video have quality requirements. Doing small adap-tions on the proposed adaptive FEC-algorithm, we can ensure the fulfillment ofthese requirements.

Future work

FEC-adaptation based on loss rate

We proposed an Algorithm 1, which is optimal when packet loss exhibits spike-likecharacteristics; and a second algorithm, Algorithm 2, which is optimal for a lossmodel, in which the loss rate is constant or continuously changing. The motivationfor developing two algorithms came from the following fact: To utilize Algorithm1 when the loss rate is continuously changing causes a lot of overhead, becauseof the unnecessary high rate of FEC-redundant packets that it uses in this case.

Page 29: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

On the other hand, not quickly adapting the rate of FEC-redundant packets at theoccassions when the packet loss exhibits spike-like characteristics, causes many FEC-decoding failures. Therefore, future work is to create and implement an algorithmto record statistics of the loss rate-pattern of the channel; and to based on this makea decision of what algorithm to use for deciding with which rate of FEC-redundantpackets to encode the next FEC-unit.

Adaptation of additional parameters

Additional parameters that can be adapted fulfilling the constraints outlined inSection are transmission rate and modulation. Increased data doesn’t necessarilyresult in an higher throughput, but only when the channel conditions are good. Thechannel condition can vary dramatically in a WLAN due to multi-path interference,movements of stations, etc; and to accommodate varying channel conditions, a rateadaption is commonly used, which dynamically adjusts the modulation mode andthe data rate in order to optimize the performance in changing channel conditions.

Furthermore, the number of source packets which are used per FEC-encodedunit can dynamically be adapted. Section outlines results of testing the FEC-decoding-algorithm. These simulations were performed to find the optimal balancebetween low probability of FEC-decoding-failure and a minimal amount of FEC-redundant data; and can be used when deciding on which amount of source packetsto use.

Point-to-multipoint broadcast optimization

There is another usage in which there is a set of receivers whom are not connectedin MANET and whom receive the packets through broadcast. In this scenario, thereceiver send acknowledgements for each received FEC-encoded unit of redundantpackets, containing information about the packet loss rate. When we are broad-casting video to many receivers using the proposed FEC-adaptation-algorithm, it isimpossible to adapt to each client individually, but we need to find a way to satisfythe constraints promised to the users joining the broadcast. E.g. if the promise ofthe broadcaster is that each client should receive a stream with a probability rate< 1

10000 for FEC-decoding-failures, there is a requirement that the rate of FEC-redundant packets is adapted in such a way that the promise of the broadcaster isfulfilled. Thus this rate must be adapted to the receiver which has the worse packetloss, in order to ensure that it will be able to decode the FEC-encoded units sent toit. This may cause that other receivers which are affected by less interference andthus receives a larger rate of the sent packets receives a lot of redundant packets;however, this is unavoidable in this scenario.

Page 30: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD
Page 31: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

Bibliography

[1] What is ns-3 @http://www.nsnam.org/overview/what-is-ns-3/, July 2013.

[2] J. S. Ahn, S. W. Hong, and J. Heidemann. An adaptive FEC code controlalgorithm for mobile wireless sensor networks. Journal of Communicationsand Networks, 7(4):489–499, Dec. 2005.

[3] Anas Basalamah and Takuro Sato. Adaptive fec reliable multicast mac protocolfor wlan. In Proceedings of the 66th IEEE Vehicular Technology Conference,VTC Fall 2007, 30 September - 3 October 2007, Baltimore, MD, USA, pages244–248. IEEE, 2007.

[4] R. Chandra, S. Karanth, T. Moscibroda, V. Navda, J. Padhye, R. Ramjee, andL. Ravindranath. Dircast: A practical and efficient wi-fi multicast system. InNetwork Protocols, 2009. ICNP 2009. 17th IEEE International Conference on,pages 161–170. IEEE, 2009.

[5] Jiao Feng, Chi Xuefen, Peng Li, Wang Yining, and Lin Guan. Adaptive fecalgorithm based on prediction of video quality and bandwidth utilization ratio.Advanced Information Networking and Applications, International Conferenceon, 0:182–188, 2009.

[6] V. R. Gandikota, B. R. Tamma, and C. S. R. Murthy. Adaptive fec-basedpacket loss resilience scheme for supporting voice communication over ad hocwireless networks. IEEE Transactions on Mobile Computing, 7:1184–1199,2008.

[7] L. Han, S. Park, S. Kang, and H. Peter. An adaptive fec mechanism using cross-layer approach to enhance quality of video transmission over 802.11 WLANs.TIIS, 4(3):341–357, 2010.

[8] Nur Ziadah Harun, Osman Ghazali, and Baharudin Osman. Impact of weightvalues in hybrid and adaptive fec mechanism over wireless network. In Pro-ceedings of the 2010 Second International Conference on Network Applications,Protocols and Services, NETAPPS ’10, pages 42–47, Washington, DC, USA,2010. IEEE Computer Society.

xxvii

Page 32: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

[9] M. Johanson. Adaptive forward error correction for real-time internet video.In Packet Video Workshop, April 2003.

[10] Cédric Lamoriniere, Abdelhamid Nafaa, and Liam Murphy. Dynamic switch-ing between adaptive fec protocols for reliable multi-source streaming. In Pro-ceedings of the 28th IEEE conference on Global telecommunications, GLOBE-COM’09, pages 5388–5393, Piscataway, NJ, USA, 2009. IEEE Press.

[11] C. H. Lin, C. H. Ke, C. K. Shieh, and N. K. Chilamkurti. An enhanced adap-tive fec mechanism for video delivery over wireless networks. In Internationalconference on Networking and Services, pages 106–111, Silicon Valley, USA,July 2006.

[12] Cheng-Han Lin, Chih-Heng Ke, Ce-Kuen Shieh, and Naveen K. Chilamkurti.xan enhanced adaptive fec mechanism for video delivery over wireless networks.In Proceedings of the International conference on Networking and Services,ICNS ’06, pages 106–, Washington, DC, USA, 2006. IEEE Computer Society.

[13] K. Matsuzono, J. Detchart, M. Cunche, V. Roca, and H. Asaeda. PerformanceAnalysis of a High-Performance Real-Time Application with Several AL-FECSchemes. In the 35th IEEE Conference on Local Computer Networks, Colorado,USA, July 2010.

[14] Thinh Nguyen and Avideh Zakhor. Distributed video streaming with forwarderror correction, 2002.

[15] OpenFEC organization. Application-level forward erasure correction (Open-FEC).

[16] K. Park and W. Wang. AFEC: An adaptive forward error-correction protocolfor end-to-end transport of real-time traffic. In IEEE IC3N, pages 196–205,1997.

[17] K. Park and W. Wang. Qos-sensitive transport of real-time mpeg video usingadaptive forward error correction. In IEEE Multimedia Systems, pages 426–432, 1999.

[18] K. S. Pathapati, A. Nguyen, J. P. Rohrer, and J. P.G. Sterbenz. Performanceanalysis of the AeroTP transport protocol for highly-dynamic airborne teleme-try networks. In Proceedings of the International Telemetering Conference,NV, USA, Oct. 2011.

[19] Yufeng Shan, John W. Woods, and Shivkumar Kalyanaraman. Distributed finegrain adaptive-fec scheme for scalable video streaming.

[20] A. Nafaa T. Taleb and L. Murphy. Forward error correction strategies formedia streaming over wireless networks. IEEE Communications Magazine,46(1):72–79, 2008.

Page 33: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD

[21] D. Vassis, G. Kormentzos, Rouskas A, and I. Maglogiannis. The ieee 802.11gstandard for high data rate wlans. IEEE Networks, 19(3):21–26, 2005.

[22] V.Roca and more. Low density parity check (ldpc) staircase and triangle for-ward error correction (fec) schemes.

[23] P. Y. Wang, Yemini Y, D. Florissi, and P. Florissi. QoSME: Towards qosmanagement and guarantees. In Proceedings international Conference on In-formation Technology, pages 868–875, Bhubaneswar, India, Dec. 2000.

[24] Jun Hwang Yejin Sohn and Seung-Seok Kang. Adaptive packet-level fec algo-rithm for improving the video quality over ieee 802.11 networks. InternationalJournal of Software Engineering and Its Applications, 6(3), 07 2012.

Page 34: Adaptive FEC-Encoding for Video Streaming over WiFikth.diva-portal.org/smash/get/diva2:874698/FULLTEXT01.pdf · Adaptive FEC-Encoding for Video Streaming over WiFi ANDERS BRANDERUD