How to do H.264 SVC transmission simulations?

 

Introduction

  Based on SVEF (Scalable Video-streaming Evaluation Framework [1]), I extended this framework to NS2 simulation environment. The integrated evaluation framework is called myEvalSVC. Therefore, users can evaluate their proposed network architectures or protocols for H.264 SVC transmission more realistically in NS2. Users can start by encoding raw YUV video with different encoding parameters (temporal encoding, spatial encoding, SNR encoding, or combined encoding). After that, BitStreamExtractor (provided in JSVM [2]) and F-N Stamp (provided in SVEF [2]) are used to generate an original NALU Trace file. This file is then converted to ns2 send trace file via prepare_sendtrace.awk (provided by myEvalSVC). In NS2, an agent called myEvalSVC is used to read the converted ns2 send trace file and generates the corresponding packets in the designated time. Users can design their network architectures or protocols in NS2 and evaluate the performance of SVC transmission. In the receiver side, an agent called myEvalSVC_Sink is used to receive the SVC packets and record the related information, such as receiving time, packet size, frame number, and so on. This receiver trace file can be handled by Pe2edelay (provided by myEvalSV) to calculate the packet level end to end delay or to calculate the packet loss rate. This receiver trace file is also handled by prepare_receivedtrace1.awk (provided by myEvalSVC) and prepare_receivedtrace2.exe (provided by myEvalSVC) to generate the needed file format required by SVEF. This processed file is then fed into NALU FILTER (provided by SVEF) to generate the Filtered NALU Trace. In this process, too late frames or frames that cannot be decoded are eliminated. Following, the Filtered NALU Trace is sent to BitStreamExtractor (provided by JSVM) to generated the Filtered H.264 Video (Users can think that this file is corresponding to the real data gathered by the receiver side.) Finally, this Filtered H.264 Video is decoded by JSVM Decoder to generate the Filtered YUV Video. In order to compare the PSNR, the Frame-Filler has to conceal the missing frames by copying the previous frame. Missing frames can be identified through the frame-number field of the Filtered NALU trace.

 Basically, it is a not easy job. Too many things must be known before doing simulation. So I suggest that interested users should read some tutorial papers about H.264 SVC first. Then read JSVM software manual [3] to understand the meaning of each encoding parameters. Following, please read [4] more carefully. Finally try to do each steps provided in this website. Also, add the following into your references.

 

C. H. Ke, " myEvalSVC: an Integrated Simulation Framework for Evaluation of H.264/SVC Transmission ", KSII Transactions on Internet and Information Systems, vol. 6, no. 1, pp. 378-393, Jan. 2012 (SCI)

 

Hope you can enjoy the myEvalSVC.

 

Experiment Environment Setup

  It is not easy for a beginner to set up whole simulation environment. You must install VC2008 to compile JSVM software. You also need to install python and gcc to run the programs in SVEF. More, you need to install a cygwin environment for NS2. That is not a easy job. Therefore, I came up with an idea. I can provide my working environment as an VirtualBox image [5]. So please install VirtualBox first. Then download the images (file1, file2, file3, file4, file5, file6, file7, file8, file9). These files are in winrar format. These files are so big, so please be patient to wait for download. And prepare a large space for the decompressed file (around 12G bytes). Remember one thing: the working OS is WINXP. It is under NQU license. So please change the serial number or buy a legal WINXP license before you use it.

 

Experiment Steps

1.     Encoding Raw YUV video

1.1  click the cygwin_new icon on the desktop.

 

1.2  Change the path to svc/foreman/802_11

 

 

1.3  Use the following two files to do temporal encoding. (You can encode by setting different parameters after you are familiar with [3]. In this example, the base layer is in 7.5 frames/second format (identified by TID:0). The base layer + enhancement layer1 (identified by TID:1) will produce 15 frames/second video. The base layer + enhancement layer 1 and 2 (Identified by TID:2) will produce 30 frame/second video.) Refer to [3], you can understand the meaning of each encoding parameter.

 

1.4  You can open temporal_main.cfg under svc/foreman/802_11. (This file is under c:\cygwin_new\home\Administrator\svc\foreman\802_11)

OutputFile         temporal.264

FrameRate          30.0

FramesToBeEncoded  300

GOPSize       4

BaseLayerMode 2

IntraPeriod   4

 

SearchMode    4

SearchRange   32

NumLayers     1

LayerCfg      temporal_layer0.cfg

 

InputFile   foreman_cif.yuv

SourceWidth  352

SourceHeight 288

FrameRateIn  30

FrameRateOut 30

 

1.5   Encode the raw YUV with the temporal_main.cfg

 

 

1.6  After encoding, you can find temporal.264 and temporal_encoding.txt. You can open the temporal_encoding.txt to know the encoding process. (This file is under c:\cygwin_new\home\Administrator\svc\foreman\802_11)

JSVM 9.19.8 Encoder

 

profile & level info:

=====================

DQ=  0:  Main @ Level 1.3

 

AU     0: I    T0 L0 Q0   QP 29   Y 37.2503  U 40.7950  V 43.6207     51944 bit

AU     4: I    T0 L0 Q0   QP 29   Y 37.2076  U 40.8874  V 43.6978     52992 bit

AU     2: B    T1 L0 Q0   QP 33   Y 36.4711  U 40.7747  V 43.6246      5888 bit

AU     1: B    T2 L0 Q0   QP 34   Y 36.5085  U 40.7194  V 43.5171      2656 bit

AU     3: B    T2 L0 Q0   QP 34   Y 36.2345  U 40.7445  V 43.7011      2864 bit

AU     8: I    T0 L0 Q0   QP 29   Y 37.1513  U 40.8102  V 43.6118     53712 bit

AU     6: B    T1 L0 Q0   QP 33   Y 36.4171  U 40.7556  V 43.7445      5264 bit

AU     5: B    T2 L0 Q0   QP 34   Y 36.2476  U 40.8070  V 43.7491      2912 bit

AU     7: B    T2 L0 Q0   QP 34   Y 36.2146  U 40.6977  V 43.4703      2632 bit

……………………………………………………………………………………………………………………………………………..

 

2.     Decode the temporal.264 and record the decoding process into temporal_originaldecoderoutput.txt. We need some information in it.

 

 

3.     Use the JSVM BitStreamExtractor to generate the original NALU trace file (temporal_originaltrace.txt)

 

 

The part of content in temporal_originaltrace.txt looks like

Start-Pos.     Length  LId  TId  QId   Packet-Type     Discardable  Truncatable

==========  ======  ===  ===  ===  ============  ===========  ===========

0x00000000      97    0    0    0  StreamHeader          No          No

0x00000061      13    0    0    0  ParameterSet          No          No

0x0000006e       8    0    0    0  ParameterSet          No          No

0x00000076      18    0    0    0     SliceData          No          No

0x00000088    6484    0    0    0     SliceData          No          No

0x000019dc      18    0    0    0     SliceData          No          No

0x000019ee    6615    0    0    0     SliceData          No          No

0x000033c5      18    0    1    0     SliceData          Yes          No

0x000033d7     727    0    1    0     SliceData         Yes          No

0x000036ae      17    0    2    0     SliceData         Yes          No

0x000036bf     323    0    2    0     SliceData         Yes          No

……………………………………………………………………………………………………………………………………….

 

4.     Use f-nstamp to add the frame-number in temporal_originaltrace.txt. (It will generate temporal_originaltrace-frameno.txt)

 

0x00000000      97    0    0    0  StreamHeader          No          No      -1            0

0x00000061      13    0    0    0  ParameterSet          No          No      -1            0

0x0000006e       8    0    0    0  ParameterSet          No          No      -1            0

0x00000076      18    0    0    0     SliceData          No          No       0            0

0x00000088    6484    0    0    0     SliceData          No          No       0            0

0x000019dc      18    0    0    0     SliceData          No          No       5            0

0x000019ee    6615    0    0    0     SliceData          No          No       5            0

0x000033c5      18    0    1    0     SliceData         Yes          No       3            0

0x000033d7     727    0    1    0     SliceData         Yes          No       3            0

0x000033d7     727    0    1    0     SliceData         Yes          No       3            0

0x000036ae      17    0    2    0     SliceData         Yes          No       2            0

0x000036bf     323    0    2    0     SliceData         Yes          No       2            0

……………………………………………………………………………………………………………………………………………………………………………….

p.s. the last second field is frame-number and the last one is to save the sending time or receiving time in the future.

 

5.     Copy temporal_originaltrace-frameno.txt to C:\cygwin\home\Administrator\mysvc\802_11. (I use two cygwin versions in my simulation environment. C:\cygwin is used to do simulation. C:\cygwin_new is used to do video encoding, decoding, and trace files handling.)

6.     Click cygwin icon on the desktop and change the path to mysvc/802_11.

   

 

7.     Prepare the sending trace needed by SVEF with the aid of prepare_sendtrace.awk.

 

#This file is prepare_sendtrace.awk

BEGIN{

  time=500; # It means that this SVC video starts transmission at 0.5 second.

           # If you want to start transmission at 1.0 second, change the value to 1000.

  i=0;

}

{

  if($6=="SliceData"){

    printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%ld\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,time);

    if(i==0) {

       i=1;

    } else {

      time+=1000.0/30.0;

      i=0;

    }

  } else {

    printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,0);

  }

}

END{

}

After executing this command, you will find sent.txt under C:\cygwin\home\Administrator\mysvc\802_11.

0x00000000    97    0      0      0      StreamHeader        No   No   -1     0

0x00000061    13    0      0      0      ParameterSet     No   No   -1     0

0x0000006e    8      0      0      0      ParameterSet     No   No   -1     0

0x00000076    18    0      0      0      SliceData         No   No   0      500

0x00000088    6484        0      0      0      SliceData     No   No   0      500

0x000019dc    18    0      0      0      SliceData         No   No   5      533

0x000019ee    6615        0      0      0      SliceData     No   No   5      533

0x000033c5     18    0      1      0      SliceData         Yes   No   3      566

0x000033d7    727  0      1      0      SliceData         Yes   No   3      566

………………………………………………………………………………………………………………………

 

8.     Prepare the NS2 sending trace needed by myEvalSVC agent with the aid of prepare_ns2sendtrace.awk.

BEGIN{

  i=0;

  FrameSize=0;

      time=0.0; // just set 0.0 here. The actual start transmission time depends on TCL setting.

}

{

  StartPos=$1;

  Length=$2;

  LId=$3;

  TId=$4;

  QId=$5;

  PacketType=$6;

  Discardable=$7;

  Truncatable=$8;

  FrameNo=$9;

  SentTime=$10;

  if(i==0 && PacketType=="SliceData") {

    FrameSize=(Length+12);

    i=1;

  }else if (i==1 && PacketType=="SliceData") {

    FrameSize+=(Length+12);

    printf("%f\t%s\t%s\t%s\t%s\t%s\n", time, FrameSize, LId, TId, QId, FrameNo);

    time+=1.0/30.0;

    i=0;

    FrameSize=0;

  }

}

END{

 

}

After executing this command, you will find ns2send under C:\cygwin\home\Administrator\mysvc\802_11.

0.000000 6526        0      0      0      0

0.033333 6657        0      0      0      5

0.066667 769      0      1      0      3

0.100000 364      0      2      0      2

0.133333 390      0      2      0      4

……………………………………………………….

 

9.     NS2 Simulation

9.1  Simulation Scenario: The following example demonstrates the SVC transmission over 802.11 and 802.11e. There are three wireless nodes, i.e. n0, n1, n2. n0 sends the SVC (with video service), CBR (with best effort service), ftp (with best effort service), CBR (with background service) to n1, n1, n2, n2 respectively. The datarate_ (used to send data packets) and basicrate_ (used to send control packets, such as ACK) are both set to 1Mbps.

 

9.2  Simulation Script: test_svc.tcl

proc getopt {argc argv} {

        global opt

        lappend optlist nn

        for {set i 0} {$i < $argc} {incr i} {

                set opt($i) [lindex $argv $i]

        }

}

getopt $argc $argv

#opt(0)-> 0:dcf 1:edcf

#===================================

#     Simulation parameters setup

#===================================

set val(chan)   Channel/WirelessChannel    ;# channel type

set val(prop)   Propagation/TwoRayGround   ;# radio-propagation model

set val(netif)  Phy/WirelessPhy            ;# network interface type

if {$opt(0) > 0} {

      set val(mac)            Mac/802_11e                ;# MAC type

        set val(ifq)            Queue/DTail/PriQ       ;# interface queue type

        Mac/802_11e set dataRate_  1Mb

        Mac/802_11e set basicRate_ 1Mb

} else {

      set val(mac)            Mac/802_11                ;# MAC type

      set val(ifq)            Queue/DropTail/PriQueue   ;# interface queue type

      Mac/802_11 set dataRate_  1Mb

    Mac/802_11 set basicRate_ 1Mb

}

 

set val(ll)      LL                         ;# link layer type

set val(ant)    Antenna/OmniAntenna        ;# antenna model

set val(ifqlen)  50                         ;# max packet in ifq

set val(nn)     3                          ;# number of mobilenodes

set val(rp)     DSDV                       ;# routing protocol

set val(x)      400                        ;# X dimension of topography

set val(y)      500                        ;# Y dimension of topography

set val(stop)   50.0                       ;# time of simulation end

 

#===================================

#        Initialization       

#===================================

#Create a ns simulator

set ns [new Simulator]

 

#Setup topography object

set topo       [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

 

#Open the NS trace file

set tracefile [open out.tr w]

$ns trace-all $tracefile

 

set chan [new $val(chan)];#Create wireless channel

 

#===================================

#     Mobile node parameter setup

#===================================

$ns node-config -adhocRouting  $val(rp) \

                -llType        $val(ll) \

                -macType       $val(mac) \

                -ifqType       $val(ifq) \

                -ifqLen        $val(ifqlen) \

                -antType       $val(ant) \

                -propType      $val(prop) \

                -phyType       $val(netif) \

                -channel       $chan \

                -topoInstance  $topo \

                -agentTrace    OFF \

                -routerTrace   OFF \

                -macTrace      OFF \

                -movementTrace OFF

 

#===================================

#        Nodes Definition       

#===================================

#Create 3 nodes

set n0 [$ns node]

$n0 set X_ 200

$n0 set Y_ 400

$n0 set Z_ 0.0

$ns initial_node_pos $n0 20

set n1 [$ns node]

$n1 set X_ 300

$n1 set Y_ 400

$n1 set Z_ 0.0

$ns initial_node_pos $n1 20

set n2 [$ns node]

$n2 set X_ 200

$n2 set Y_ 350

$n2 set Z_ 0.0

$ns initial_node_pos $n2 20

 

#===================================================

 

set max_fragmented_size 1480

# 20: IP header length

set packetSize [expr $max_fragmented_size+20]

 

set src_udp1 [new Agent/UDP]

$src_udp1 set packetSize_ $packetSize

set dst_udp1 [new Agent/myEvalSVC_Sink]

$ns attach-agent $n0 $src_udp1

$ns attach-agent $n1 $dst_udp1

$ns connect $src_udp1 $dst_udp1

$dst_udp1 set_filename rd

 

set original_file_name ns2send

set trace_file_name video1.dat

set original_file_id [open $original_file_name r]

set trace_file_id [open $trace_file_name w]

 

set pre_time 0

 

while {[eof $original_file_id] == 0} {

    gets $original_file_id current_line

    

    scan $current_line "%f%d%d%d%d%d" t_ size_ lid_ tid_ qid_ fno_

    set time [expr int(($t_ - $pre_time)*1000000.0)]

   

# map all SVC packets to video service in 802.11e

    if { $tid_ == 0 } {

      set prio_p 1

    }

   

    if { $tid_ == 1 } {

      set prio_p 1

    }

   

    if { $tid_ == 2 } {

      set prio_p 1

    }

   

    puts  $trace_file_id "$time $size_ $lid_ $tid_ $qid_ $fno_ $prio_p $max_fragmented_size"

    set pre_time $t_

}

 

close $original_file_id

close $trace_file_id

 

set trace_file [new Tracefile]

$trace_file filename $trace_file_name

set video1 [new Application/Traffic/myEvalSVC]

$video1 attach-agent $src_udp1

$video1 attach-tracefile $trace_file

 

if {$opt(0) > 0} {

 set n0_ifq [$n0 set ifq_(0)]

 

 $ns at 0.0 "record_qlen"

 set fqlen [open queuelength.txt w]

 

 proc record_qlen {} {

        global ns n0_ifq fqlen

        set time 0.01

        set now [$ns now]

        set qlen0 0

        set qlen1 0

        set qlen2 0

        set qlen3 0

        puts $fqlen "$now [$n0_ifq set qlen0]  [$n0_ifq set qlen1]  [$n0_ifq set qlen2]  [$n0_ifq set qlen3]  "

        $ns at [expr $now+$time] "record_qlen"

 }

}

 

#===================================================

set src_udp2 [new Agent/UDP]

$src_udp2 set packetSize_   1500

#map to best effort service in 802.11e

$src_udp2 set prio_ 2

set dst_udp2 [new Agent/Null]

$ns attach-agent $n0 $src_udp2

$ns attach-agent $n1 $dst_udp2

$ns connect $src_udp2 $dst_udp2

set traffic0 [new Application/Traffic/CBR]

$traffic0 set    packetSize_     1000

$traffic0 set   rate_               0.2Mb

$traffic0 set   random_         true

$traffic0 attach-agent $src_udp2

 

set src_tcp1 [new Agent/TCP/Reno]

#map to best effort service in 802.11e

$src_tcp1 set prio_ 2

set dst_tcp1 [new Agent/TCPSink]

$ns attach-agent $n0 $dst_tcp1

$ns attach-agent $n2 $src_tcp1

set ftp1 [new Application/FTP]

$ftp1 attach-agent $src_tcp1

$ns connect $src_tcp1 $dst_tcp1

 

#===================================================

set src_udp3 [new Agent/UDP]

$src_udp3 set packetSize_  1500

#map to background service in 802.11e

$src_udp3 set prio_ 3

set dst_udp3 [new Agent/Null]

$ns attach-agent $n0 $src_udp3

$ns attach-agent $n2 $dst_udp3

$ns connect $src_udp3 $dst_udp3

set traffic1 [new Application/Traffic/CBR]

$traffic1 set    packetSize_     1000

$traffic1 set   rate_               0.3Mb

$traffic1 set   random_         true

$traffic1 attach-agent $src_udp3

 

$ns at 0.1 "$traffic0 start"

$ns at 0.1 "$traffic1 start"

$ns at 0.1 "$ftp1 start"

$ns at 0.5 "$video1 start" #SVC Transmission at 0.5 second

 

$ns at 30.0 "$video1 stop"

$ns at 30.0 "$traffic0 stop"

$ns at 30.0 "$traffic1 stop"

$ns at 30.0 "$ftp1 stop"

 

#===================================

#        Termination       

#===================================

#Define a 'finish' procedure

proc finish {} {

    global ns tracefile namfile

    $ns flush-trace

    close $tracefile

    exit 0

}

for {set i 0} {$i < $val(nn) } { incr i } {

    $ns at $val(stop) "\$n$i reset"

}

$ns at $val(stop) "finish"

$ns at $val(stop) "puts \"done\" ; $ns halt"

$ns run

 

9.3  Do the 802.11 environment simulation. (0 means DCF simulation)

10 

After simulation, you will find rd under C:\cygwin\home\Administrator\mysvc\802_11

0.533067         0                1500             0                0                0                0                0.500000       

0.547104         0                1500             0                0                0                1                0.500000       

0.561322         0                1500             0                0                0                2                0.500000       

0.575379         0                1500             0                0                0                3                0.500000       

0.582464         0                626              0                0                0                4                0.500000       

0.606598         5                1500             0                0                0                5                0.533333       

0.620676         5                1500             0                0                0                6                0.533333       

0.634453         5                1500             0                0                0                7                0.533333       

0.648270         5                1500             0                0                0                8                0.533333       

0.656424         5                757              0                0                0                9                0.533333       

0.684527         3                789              0                1                0                10               0.566667       

0.709970         2                384              0                2                0                11               0.600000

…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

p.s. The first field is receiving time, the second is frame-number, the third is packet size, the fourth is lid, the fifth is tid, the sixth is qid, the seventh is packet id, the last one is sending time.

 

9.4  If you want to get the packet end to end delay, you can use Pe2edelay.awk to get this performance matrix.

BEGIN{

  i=0;

}

{

  receivedtime=$1;

  frameno=$2;

  framesize=$3;

  lid=$4;

  tid=$5;

  qid=$6;

  pktid=$7;

  sendtime=$8;

  Pe2edelay[pktid]=receivedtime-sendtime;

  if(pktid>i)

    i=pktid;

}

END{

  for(j=0;j<i;j++)

    if(Pe2edelay[j]>0)

      printf("%-16d %-16f\n", j, Pe2edelay[j]);

}

11

 

0                0.033067       

1                0.047104       

2                0.061322       

3                0.075379       

4                0.082464       

…………………………………………………………………………..

p.s. the first field is packet id, and the second is the packet end to end delay (in second).

 

9.5  Convert the rd file to the format required for SVEF file.

12

 

13

After these two steps, you can get received.txt. This file is the receiver trace file required for SVEF.

0x00000076      18    0    0    0     SliceData          No          No         0       582

0x00000088    6484    0    0    0     SliceData          No          No         0       582

0x000019dc      18    0    0    0     SliceData          No          No         5       656

0x000019ee    6615    0    0    0     SliceData          No          No         5       656

0x000033c5      18    0    1    0     SliceData         Yes          No         3       684

0x000033d7     727    0    1    0     SliceData         Yes          No         3       684

0x000036ae      17    0    2    0     SliceData         Yes          No         2       709

0x000036bf     323    0    2    0     SliceData         Yes          No         2       709

…………………………………………………………………………………………………………………………………………………………………………………

The last field is the frame receiving time.

Please copy the sent.txt and receiver to C:\cygwin_new\home\Administrator\svc\foreman\802_11

(The simulation part is finished. Then we need to do post-processing in cygwin_new environment.)

 

9.6  Open cygwin_new window and change the path to svc/foreman/802_11

 

9.7  Based on temporal_originaltrace-frameno.txt and received file, nalufilter will discard too late frames and frames that cannot be decoded due to frame dependencies.

14 

5000 means 5000 miliseconds for play out buffer. 30 means 30 frames per second for the processed video.

After execution, you can see that 312 packets are deleted due to unsatisfied dependencies.

 

9.8   The current version of JSVM (9.19.8) cannot decode video streams affected by out of order, corrupted, or missing NALUs. Therefore, SVEF uses filtered packet trace file to extract the corresponding packets in original h.264 video file by means of BitStreamExtractorStatic. (You can think that processed video file corresponds to the actually useful data received at the receiving side.)

15

………………………………………………………………………………

17

From above figure, you can see which frame is kept and which frame is discarded.

 

9.9  Decode the temporal-filtered.264 file.

 16

………………………………………………………………………………………………………………………………

18

Only 41 frames can be decoded.

 

9.10     We need the same number of video frames when we want to calculate the PSNR of original YUV and receiving YUV file. So we need to conceal the missing frames by copying the previous frame.

19 

152064 is for CIF format (It is equal to 352*288*1.5). If the format is QCIF, it has to be 38016 (176*144*1.5). 300 means that total frames in original YUV file. In the above figure, you can also see that the missing frames are replaced by what frame number.

 

9.11     Now you can compare the PSNR.

 20

The average Luminance PSNR is 15.8376.

 

0      37,2503   40,7950   43,6207

1      27,6731   40,1556   42,0585

2      27,4544   40,0148   42,0433

3      27,8110   40,1550   42,2511

4      28,1726   40,2869   42,6626

5      29,0368   40,3301   42,7237

6      29,7231   40,2825   42,5730

7      29,0411   40,4100   42,8522

8      27,7465   40,3977   42,6972

……………………………………………………..

The first field is frame number, the second is Y-PSNR(luminance), the third is U-PSNR, and the fourth is V-PSNR.

 

10.   Evaluate the SVC transmission over 802.11e. (1: EDCF)

21

 

Do the similar steps as those steps in 9.

Then you can get the average Y-PSNR for SVC over 802.11e.

22

From the above results, you can see that the PSNR for SVC transmission over 802.11e is better than that over 802.11 (24.0118 vs. 15.8376).

 

11.  Finally you can run yuvviewer to visually compare the performance.

23

 

Note 1.

If you want to combine SVEF with different simulators, it will not be difficult. Just need to write or re-rewrite three programs. The first one is the packet generator. This program has to read the traffic trace file and generate the corresponding packets at the pre-defined time. The fields needed in traffic trace file are sending time, size, DId, TId, UID, and frame number. Following table is an example of traffic trace file. First record means that the program needs to generate 6536 bytes data at 0.0 with DId=0, TId=0, UId=0, and frame number = 0 to the lower layer. (If the lower layer does not support fragmentation, you have to write this function in your packet generator program.)

0.000000 6526        0      0      0      0

0.033333 6657        0      0      0      5

0.066667 769      0      1      0      3

………………………………………………………

 

  Then the udp program needs to be re-written to add the packet id and sending time for each sent out packet. The information can be stored in the packet header. In NS2, I put them in common header.

  In the receiver side, you have to re-write the receiving program. Save the receiving time, frame number, packet size, DId, TId, UID, frame number, and sending time for each received packet into the receiver trace file. The following table is one of receiver trace file example.

0.512676         0                1500             0                0                0                0                0.500000       

0.534798         0                1500             0                0                0                1                0.500000       

0.547818         0                1500             0                0                0                2                0.500000       

……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………

 

  After doing these jobs, you can do the simulation with your own simulator. Because the remaining work can be done with the aid of SVEF and some tool programs of myEvalSVC framework.

 

Note 2.

  Linux version (Fedora 16) virtual box is now provided. (File1, File 2, File3). The password for root is "fedora". The normal account for running the myEvalSVC is "ns2", and the password is "ns2". One thing has to be mentioned before running the provided example. JSVM H.264/SVC encoder is something strange. So user is suggested to run the encoding process under windows platform. For the remaining parts, they are good.

 

References

1.     SVEF (http://svef.netgroup.uniroma2.it/)

2.     SVC Reference Software (http://ip.hhi.de/imagecom_G1/savce/downloads/SVC-Reference-Software.htm

3.     JSVM Software manual (http://evalsvc.googlecode.com/files/SoftwareManual.doc)

4.     “SVEF: an Open-Source Experimental Evaluation Framework for H.264 Scalable Video Streaming” (http://zioproto.ninux.org/download/publications/svef.pdf)

5.     VirtualBox (http://www.virtualbox.org/)

 

Last modified: 2012/02/02

 

Contact Information

Chih-Heng Ke

Department of Computer Science and Information Engineering, National Quemoy University, Taiwan

Email: smallko@gmail.com