1. Trang chủ
  2. » Luận Văn - Báo Cáo

VIDEO TRANSMISSION USING THE NS2 SIMULATOR

35 145 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • - EvalVid with GPAC - http://www2.tkn.tu-berlin.de/research/evalvid/EvalVid/docevalvid.html .

  • - J. Gross, J. Klaue, H. Karl and A. Wolisz, Cross-Layer Optimization of OFDM Transmission Systems for MPEG-4 Video Streaming.

  • - Chih-Heng, Ke, Phd candidate, EE Department, NCKU, Taiwan, How to evaluate H.263/H.264/MPEG4 video transmission using the NS2 simulator? .

  • - Velibor Markovski, Fei Xue, and Ljiljana Trajkovi´c, Simulation and analysis of packet loss in video transfers using User Datagram Protocol, 2001, p. 5 -13.

  • - Chih-Heng Ke, Ce-Kuen Shieh, Wen-Shyang Hwang and Artur Ziviani An Evaluation Framework for More Realistic Simulations of MPEG Video Transmission, 2008, p. 4 – 8.

  • - Jae Chung, Mark Claypool, NS by Example, 2007.

Nội dung

VIDEO TRANSMISSION USING THE NS2 SIMULATOR TÓM TẮT Ngày nay, video đóng vai trò quan trọng giới giải trí truyền thông Rất nhiều dịch vụ phát triển công nghệ video video streamming, video call,… Việc nhu cầu sử dụng dịch vụ ngày tăng đòi hỏi nhà cung cấp dịch vụ phải đảm bảo chất lượng, giám sát cải thiện chất lượng dịch vụ cung cấp cho người sử dụng Việc đảm bảo chất lượng video dịch vụ nêu ngày trở lên thiết hết, việc người sử dụng dịch vụ nhận video chất lượng thấp ảnh hưởng lớn đến nhà cung cấp dịch vụ Nhằm nâng cao chất lượng dịch vụ số QoS (Quality of Experience) người sử dụng, việc mô đánh giá chất lượng video cần thiết Hiện nay, có nhiều công cụ để đánh giá chất lượng video sử dụng, báo cáo sử dụng công cụ myEvalVid2, NS2 – hai công cụ mã nguồn mở để mô việc truyền video môi trường mạng internet, đánh giá chất lượng video mà người dùng nhận tính toán số gói (packet) bị trình truyền Kịch TCL mô sử dụng gói UDP (User Datagram Protocol) tạo mạng tắc nghẽn giống với mô hình mạng thực tế MỤC LỤC TÓM TẮT I II III Giới thiệu Giới thiệu công cụ NS2, myEvalVid2 Công cụ NS2 1.1 Giới thiệu 1.2 Cài đặt NS2 Công cụ myEvalVid2 2.1 Giới thiệu 2.2 Cài đặt myEval2 Mô truyền video NS2 Kịch TCL Mô 1 1 3 11 11 12 IV Tính toán số gói bị trình truyền video 18 Cơ sở lý thuyết 18 Công cụ tính toán 29 V Kết luận 32 VI Tài liệu tham khảo 33 I Giới thiệu Các ứng dụng đa phương tiện chất lượng cao môi trường mạng IP (IP network) có yêu cầu cao nghiêm ngặt việc gói tin (packet loss), chậm trễ (delay) chậm trễ jitter (delay jitter) Trong mạng IP, việc gói tin ảnh hưởng lớn đến chất lượng kết nối, chất lượng dịch vụ, thông lượng truyền liệu Những đặc điểm xác định dựa vào việc tính xác suất mà đỏi hỏi nghiên cứu, đánh giá chi tiết mô hình Báo cáo sử dụng ns-2 myevalvid2 để mô việc truyền video tính toán số gói tin bị truyền video thông qua gói UDP Trong phần giới thiệu công cụ NS2, myEvalVid2, cấu trúc liên kết (topology) cấu trúc khác có liên quan Phần trình bày kịch mô kết mô Phần trình bày sở cách thức tính toán số gói tin bị Phần kết luận cuối báo cáo Môi trường làm việc:  Ubuntu 13.10 x64  GCC, G++ 4.8.1  Ns-allinone-2.35  FFMPEG 2.1  GPAC ver 0.5.1  YUV Viewer (OpenEye ViWer v1.1) II Giới thiệu công cụ NS2 , myEvalVid2 Công cụ NS2 1.1 Giới thiệu - NS2 (Network simulator version 2) công cụ phát triển để mô kiện cách rời rạc phục vụ cho cho việc nghiên cứu mạng (networking reseach) NS công cụ hỗ trợ đắc lực việc mô trình truyền gói tin (TCP, UDP), mô router, giao thức multicast (multicast protocol) mạng wired, wireless (cục vệ tinh) Page - NS biến thể REAL network simulator (1989) phát triển nhanh chóng năm trở lại Năm 1995, NS hỗ trợ phát triển DARPA thông qua dự án VINT LBL, Xerox PARC, UCB, and USC/ISI - Hiện nay, NS phát triển thông qua hỗ trợ DARPA với SAMAN NSF với CONSER, hai phối hợp với nhà nghiên cứu khác bao gồm ACIRI NS có đóng góp từ nhà nghiên cứu khác toàn giới 1.2 Cài đặt NS2 a Download NS-ALLINONE 2.35 o Download ns-allinone 2.35 địa http://www.isi.edu/nsnam/ns/ns-build.html#allinone b Giải nén file ns-allinone-2.35.tar vừa tải cài đặt gói cần thiết khác câu lệnh: tar –xvf ns-allinone-2.35.tar.gz sudo apt-get install build-essential autoconf automake libxmu-dev c Tiến hành cài đặt o Chạy lệnh: /install o Sau trình cài đặt kết thúc có kết sau: Hình Kết thúc trình cài đặt NS2 Page d Cài đặt biến môi trường export LD_LIBRARY_PATH=/home/chloe/OpenSourceDev/nsallinone-2.35/otcl-1.14:/home/chloe/OpenSourceDev/ns-allinone2.35/lib:/usr/local/lib export TCL_LIBRARY=/home/chloe/OpenSourceDev/ns-allinone2.35/tcl8.5.10/library:/usr/lib export PATH=$PATH:/home/chloe/OpenSourceDev/ns-allinone2.35/bin:/home/chloe/OpenSourceDev/ns-allinone2.35/tcl8.5.10/unix:/home/chloe/OpenSourceDev/ns-allinone2.35/tk8.5.10/unix:/home/chloe/OpenSourceDev/ns-allinone-2.35/ns2.35:/home/chloe/OpenSourceDev/ns-allinone-2.35/nam1.15:/home/chloe/OpenSourceDev/ns-allinone-2.35/xgraph-12.2 e Cuối cùng, bạn sử dụng lệnh /validate để xác nhận việc cài đặt hoàn tất Tuy nhiên có vài test không thành công, điều không ảnh hưởng đến hệ thống Công cụ myEvalVid2 2.1 Giới thiệu công cụ myEvalVid2 - myEvalVid2 framework hoàn chỉnh thiết kế cho việc tính toán đánh giá chất lượng video truyền mạng thực mạng mô phỏng, EvalVid cung cấp đầy đủ số đánh giá video như: o Packet/frame loss rate o Packet/frame jitter o PSNR( Peak Signal Noise Ratio) o MOS( Mean Opinion Scores) - Nhiệm vụ myEvalVid2 hỗ trợ việc nghiên cứu thực hành tính toán chất lượng video mà người dùng cuối (end user) nhận mạng mô mạng thực - Tuy nhiên, myEvalVid2 mô mô hình lỗi đại diện cho lỗi việc gói xảy môi trường mạng thực Việc gây vấn đề cho nhà nghiên cứu, học viên vấn đề đánh giá chất lượng video gửi đến người dùng kịch phức tạp - Cấu trúc myEvalVid2 Framework sơ đồ Page Hình Cấu trúc myEvalVid2 o Video Source: Video source định dạng YUV QCIF (176 x 144) định dạng YUV CIF (352 x 288) 352 pixels 176 pixels 144 pixels 288 pixels QCIF CIF Hình Các định dạng myEvalVid hỗ trợ Page o Video Encoding: Hiện tại, EvalVid hỗ trợ chuẩn mã hóa MPEG4 NCTU ffmpeg Download địa chỉ:  NCTU: http://megaera.ee.nctu.edu.tw/mpeg  ffmpeg: http://ffmpeg.sourceforge.net/index.php  Trong báo cáo sử dụng ffmpeg để mã hóa video theo chuẩn MPEG4 o Video Sender (VS): Nhiệm vụ video sender (vs) sau:  Đọc liệu nén xuất từ Video Encoder  Chia frame video lớn thành đoạn nhỏ để gửi  Gửi segments thông qua gói UDP/IP môi trường mạng thực môi trường mô ( Simulated network)  Với gói UDP truyền đi, framework ghi lại timestamp, packet id, packet payload size sender trace file cách sử dụng công cụ khác tcp-dump win-dump môi trường truyền môi trường internet thực o Evalute Trace ( ET):  Dựa vào file video ban đầu dùng để truyền đi, video trace file, sender trace file receiver trace file thành phần ET tính toán thông số frame/packet , frame/packet jitter sinh file video giống video người dùng cuối nhận dựa việc tái cấu trúc video ban đầu với file nêu  Về nguyên tắc, việc video phía người dùng nhận bị frame hay “vỡ hình” xảy trình copy truyền tải frame (frame by frame) video gốc qua môi trường mạng Việc video bị frame xảy video mà người dùng nhận o Peak Signal Noise Ratio (PSNR): PSNR số thông số khách quan để đánh giá QoS (Quanlity of Service) trình truyền video  PSNR tính toán dựa điểm ảnh Y ảnh nguồn S ảnh đích D: Page  Với Vpeak =2k-1 với k số bit/pixel o Mean Opinion Score (MOS): MOS thước đo chủ quan để đo chất lượng video mức ứng dụng Thang đo sử dụng từ đến dựa PSNR Hình Những cải tiến công cụ Page - Bằng cách kết hợp NS2 myEvalVid2 với tác nhân kết nối (connecting simulation agent) MyTrafficTrace, MyUDP, MyUDPSick Chúng thiết kế với mục đích đọc video trace file sinh (generate) liệu cần thiết để đánh giá chất lượng video truyền tải đến người sử dụng o MyTrafficTrace: Được sử dụng để trích xuất loại khung (frame type) kich thước chúng (frame size) từ video trace file – đầu VS Ngoài ra, thành phần (component) chia khung video (video frame) thành thành phần (segment) nhỏ gửi chúng đến lớp UDP thấp thời điểm cài đặt kịch mô (simulation script) o MyUDP: Về bản, MyUDP mở rộng UDP cho phép xác định tên tập tin đầu (output file name) sender trace file ghi dấu thời gian (timestamp) gói tin truyền đi, số hiệu gói tin (packet id), kích thước gói tin (packet payload) Nhiệm vụ MyUDP giống nhiệm vụ công cụ TCP-DUMP, WIN-DUMP môi trường mạng thực (real network) o MyUDPSick: Tiếp nhận fragmented video frame gửi từ MyUDP đến phía người dùng Nó ghi lại timestamp, packet ID, payload size gói tin người dùng nhận file đặc biệt 2.2 Cài đặt 2.2.1 Download công cụ địa chỉ: http://140.116.164.80/~smallko/nctuns/myevalvid.tar.bz2 o Mục đích: Lấy tool compile, file myudp.cc, myudp.h, myudpsink2.cc, myudpsink2.h, mytraffictrace2.cc o Giải nén file di chuyển thư mục làm việc đến thư mục nsallinone-2.35/ns-2.35/common 2.2.2 Thêm trường frametype_ sendtime_ vào struct hdr_cmn file packet.h thêm dòng sau: int frametype_; // frame type for MPEG video transmission (Henry) double sendtime_; // send time (Henry) unsigned long int frame_pkt_id_; Page 2.2.3 Tìm đến file agent.h thêm Page vụ tạo gửi gói ACK trở lại cho tcp agent đồng thời giải phóng liệu nhận - Tác nhân UDP gắng với node kết nối đến node với tác nhân null gắn node Tác nhân null có tác dụng giải phóng gói nhận - Các thành phần “ftp”, “cbr” gắn với tác nhân tương ứng có tác dụng tạo thành phần tương ứng Như hình phía trên, “cbr” cấu hình để sinh packet với kích thước 1Kb tốc độ 1Mbps - Đường packet mô hình Hình 10 Chu trình packet Page 19 - Trong hình minh họa, “cbr” cài đặt để bắt đầu vào thời điểm 0.1 giây, kết thúc vào thời điểm 4.5 giây, “ftp” cài đặt để bắt đầu thời điểm giây dừng lại thời điểm giây Tương tự, kịch mô thực tế, tác nhân cài đặt hình - Link khái niệm quan trọng NS, người dùng tạo Duplex-link, NS tạo Simplex-link hình Page 20 Hình 11 Inserting Trace Objects Hình 12 Monitoring Queue - Dựa vào toàn sở lý thuyết phía trên, phần trình bày kịch mô báo cáo 1.1.2 Kịch mô #create a new Simulator set ns [new Simulator] #Initialize trace file set nd [open Doan.tr w] $ns trace-all $nd set nf [open Doan.nam w] $ns namtrace-all $nf #set max_fragmented_size send set max_fragmented_size 1024 #add udp header(8 bytes) and IP header (20bytes) #1024+8+24 set packetSize 1052 #create node 10 node left routers 10 node right, rleft have bw > rright bw set s0 [$ns node] set s1 [$ns node] set s2 [$ns node] set s3 [$ns node] set s4 [$ns node] set s5 [$ns node] set s6 [$ns node] set s7 [$ns node] set s8 [$ns node] set s9 [$ns node] set rleft [$ns node] set rright [$ns node] set d0 [$ns node] Page 21 set d1 [$ns node] set d2 [$ns node] set d3 [$ns node] set d4 [$ns node] set d5 [$ns node] set d6 [$ns node] set d7 [$ns node] set d8 [$ns node] set d9 [$ns node] #create link between them $ns duplex-link $s0 $rleft 1Mb 10ms DropTail orient right-down $ns duplex-link $s1 $rleft 1Mb 10ms DropTail orient right-down $ns duplex-link $s2 $rleft 1Mb 10ms DropTail orient right-down $ns duplex-link $s3 $rleft 1Mb 10ms DropTail orient right-down $ns duplex-link $s4 $rleft 1Mb 10ms DropTail orient right-down $ns duplex-link $s5 $rleft 1Mb 10ms DropTail orient right-up $ns duplex-link $s6 $rleft 1Mb 10ms DropTail orient right-up $ns duplex-link $s7 $rleft 1Mb 10ms DropTail orient right-up $ns duplex-link $s8 $rleft 1Mb 10ms DropTail orient right-up $ns duplex-link $s9 $rleft 1Mb 10ms DropTail orient right-up $ns duplex-link $rright $d0 1Mb 10ms DropTail orient right-down $ns duplex-link $rright $d1 1Mb 10ms DropTail orient right-down $ns duplex-link $rright $d2 1Mb 10ms DropTail orient right-down $ns duplex-link $rright $d3 1Mb 10ms DropTail orient right-down $ns duplex-link $rright $d4 1Mb 10ms DropTail orient right-down $ns duplex-link $rright $d5 1Mb 10ms DropTail orient right-up $ns duplex-link $rright $d6 1Mb 10ms DropTail orient right-up $ns duplex-link $rright $d7 1Mb 10ms DropTail orient right-up $ns duplex-link $rright $d8 1Mb 10ms DropTail orient right-up $ns duplex-link $rright $d9 1Mb 10ms DropTail orient right-up #Orientation of nodes: $ns duplex-link-op $s0 $rleft orient right-down $ns duplex-link-op $s1 $rleft orient right-down $ns duplex-link-op $s2 $rleft orient right-down $ns duplex-link-op $s3 $rleft orient right-down $ns duplex-link-op $s4 $rleft orient right-down $ns duplex-link-op $s5 $rleft orient right-up $ns duplex-link-op $s6 $rleft orient right-up $ns duplex-link-op $s7 $rleft orient right-up $ns duplex-link-op $s8 $rleft orient right-up $ns duplex-link-op $s9 $rleft orient right-up $ns duplex-link-op $rright $d0 orient right-down $ns duplex-link-op $rright $d1 orient right-down $ns duplex-link-op $rright $d2 orient right-down $ns duplex-link-op $rright $d3 orient right-down $ns duplex-link-op $rright $d4 orient right-down $ns duplex-link-op $rright $d5 orient right-up $ns duplex-link-op $rright $d6 orient right-up $ns duplex-link-op $rright $d7 orient right-up $ns duplex-link-op $rright $d8 orient right-up $ns duplex-link-op $rright $d9 orient right-up #create link between two routers $ns simplex-link $rright $rleft 640kb 1ms DropTail $ns simplex-link $rleft $rright 6Mb 1ms DropTail #queuePos 0.5 # Khi BW nhỏ làm header code video # reconstruction video phía người dùng gặp thông báo lỗi # ffmpeg header damaged Page 22 #set shape $rleft shape square $rright shape square $s1 shape hexagon $d1 shape hexagon #set label $ns at 0.0 "$rleft label Router1" $ns at 0.0 "$rright label Router2" $ns at 0.0 "$s1 label Source" $ns at 0.0 "$d1 label Destination" #$ns simplex-link-op $rright $rleft orient middle #create queue between two routers set qr1r2 [[$ns link $rleft $rright] queue] $qr1r2 set limit_ 15 #gioi han queue tu router > router ############################################################################# ##### # Video data will be sent from left node to right node # # # # setup normal data left 0, 2->9 right 2->9 # node -> left router set udpl0 [new Agent/UDP] $ns attach-agent $s0 $udpl0 set cbrl0 [new Application/Traffic/CBR] $cbrl0 set packetSize_ 500 $cbrl0 set interval_ 0.005 $cbrl0 attach-agent $udpl0 set nulll0 [new Agent/Null] $ns attach-agent $d0 $nulll0 $ns connect $udpl0 $nulll0 # node -> left router set udpl2 [new Agent/UDP] $ns attach-agent $s2 $udpl2 set cbrl2 [new Application/Traffic/CBR] $cbrl2 set packetSize_ 500 $cbrl2 set interval_ 0.005 $cbrl2 attach-agent $udpl2 set nulll2 [new Agent/Null] $ns attach-agent $d2 $nulll2 $ns connect $udpl2 $nulll2 # node -> left router set udpl3 [new Agent/UDP] $ns attach-agent $s3 $udpl3 set cbrl3 [new Application/Traffic/CBR] $cbrl3 set packetSize_ 500 $cbrl3 set interval_ 0.005 $cbrl3 attach-agent $udpl3 set nulll3 [new Agent/Null] $ns attach-agent $d3 $nulll3 $ns connect $udpl3 $nulll3 # node -> left router set udpl4 [new Agent/UDP] $ns attach-agent $s4 $udpl4 set cbrl4 [new Application/Traffic/CBR] $cbrl4 set packetSize_ 500 $cbrl4 set interval_ 0.005 $cbrl4 attach-agent $udpl4 Page 23 set nulll4 [new Agent/Null] $ns attach-agent $d4 $nulll4 $ns connect $udpl4 $nulll4 # node -> left router set udpl5 [new Agent/UDP] $ns attach-agent $s5 $udpl5 set cbrl5 [new Application/Traffic/CBR] $cbrl5 set packetSize_ 500 $cbrl5 set interval_ 0.005 $cbrl5 attach-agent $udpl5 set nulll5 [new Agent/Null] $ns attach-agent $d5 $nulll5 $ns connect $udpl5 $nulll5 # node -> left router set udpl6 [new Agent/UDP] $ns attach-agent $s6 $udpl6 set cbrl6 [new Application/Traffic/CBR] $cbrl6 set packetSize_ 500 $cbrl6 set interval_ 0.005 $cbrl6 attach-agent $udpl6 set nulll6 [new Agent/Null] $ns attach-agent $d6 $nulll6 $ns connect $udpl6 $nulll6 # node -> left router set udpl7 [new Agent/UDP] $ns attach-agent $s7 $udpl7 set cbrl7 [new Application/Traffic/CBR] $cbrl7 set packetSize_ 500 $cbrl7 set interval_ 0.005 $cbrl7 attach-agent $udpl7 set nulll7 [new Agent/Null] $ns attach-agent $d7 $nulll7 $ns connect $udpl7 $nulll7 # node -> left router set udpl8 [new Agent/UDP] $ns attach-agent $s8 $udpl8 set cbrl8 [new Application/Traffic/CBR] $cbrl8 set packetSize_ 500 $cbrl8 set interval_ 0.005 $cbrl8 attach-agent $udpl8 set nulll8 [new Agent/Null] $ns attach-agent $d8 $nulll8 $ns connect $udpl8 $nulll8 # node -> left router set udpl9 [new Agent/UDP] $ns attach-agent $s9 $udpl9 set cbrl9 [new Application/Traffic/CBR] $cbrl9 set packetSize_ 500 $cbrl9 set interval_ 0.005 $cbrl9 attach-agent $udpl9 set nulll9 [new Agent/Null] $ns attach-agent $d9 $nulll9 $ns connect $udpl9 $nulll9 set udp1 [new Agent/myUDP] $ns attach-agent $s1 $udp1 $udp1 set packetSize_ $packetSize $udp1 set_filename sd_a01 set null1 [new Agent/myEvalvid_Sink] $ns attach-agent $d1 $null1 $ns connect $udp1 $null1 Page 24 $null1 set_filename rd_a01 set original_file_name st_a01 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 while {[eof $original_file_id] == 0} { gets $original_file_id current_line scan $current_line "%d%s%d%d%f" no_ frametype_ length_ tmp1_ tmp2_ set time [expr int(($tmp2_ - $pre_time)*1000000.0)] if { $frametype_ == "I" } { set type_v set prio_p } if { $frametype_ == "P" } { set type_v set prio_p } if { $frametype_ == "B" } { set type_v set prio_p } if { $frametype_ == "H" } { set type_v set prio_p } puts $trace_file_id "$time $length_ $type_v $prio_p $max_fragmented_size " set pre_time $tmp2_ } close $original_file_id close $trace_file_id set end_sim_time $tmp2_ puts "Total send time: $end_sim_time" set trace_file [new Tracefile] $trace_file filename $trace_file_name set video1 [new Application/Traffic/myEvalvid] $video1 attach-agent $udp1 $video1 attach-tracefile $trace_file proc finish {} { global ns nd $ns flush-trace close $nd exec nam Doan.nam & } proc record {} { exec awk { { print $3,$5; } } sd_a01 > sendOut.dat exec awk { { print $3,$5; } } rd_a01 > reOut.dat exec xgraph sendOut.dat reOut.dat & exit } Page 25 #Setting color for streamming $udpl0 set fid_ $udp1 set fid_ #udp of video transmission $udpl2 set fid_ $udpl3 set fid_ $udpl4 set fid_ $udpl5 set fid_ $udpl6 set fid_ $udpl7 set fid_ $udpl8 set fid_ $udpl9 set fid_ $ns $ns $ns $ns $ns $ns $ns $ns $ns $ns color color color color color color color color color color "#8A0829" "#FF0000" "#700440" "#FFFF00" "#04B431" "#2E64FE" "#08088A" "#2EFE2E" "#F3F781" "#0B610B" #Setting color for node $s0 color "#8A0829" $d0 color "#8A0829" $s1 color "#FF0000" $d1 color "#FF0000" $s2 color "#700440" $d2 color "#700440" $s3 color "#FFFF00" $d3 color "#FFFF00" $s4 color "#04B431" $d4 color "#04B431" $s5 color "#2E64FE" $d5 color "#2E64FE" $s6 color "#08088A" $d6 color "#08088A" $s7 color "#2EFE2E" $d7 color "#2EFE2E" $s8 color "#F3F781" $d8 color "#F3F781" $s9 color "#0B610B" $d9 color "#0B610B" #start trans $ns at 0.1 "$cbrl0 start" #$ns at 0.2 "$cbrl1 start" $ns at 0.3 "$cbrl2 start" $ns at 0.4 "$cbrl3 start" $ns at 0.5 "$cbrl4 start" $ns at 0.6 "$cbrl5 start" $ns at 0.7 "$cbrl6 start" $ns at 0.8 "$cbrl7 start" $ns at 0.9 "$cbrl8 start" $ns at 1.0 "$cbrl9 start" #stop trans $ns at 7.1 "$cbrl0 stop" #$ns at 0.2 "$cbrl1 stop" #set at $end_sim_time $ns at 7.3 "$cbrl2 stop" $ns at 7.4 "$cbrl3 stop" Page 26 $ns $ns $ns $ns $ns $ns $ns $ns $ns $ns $ns $ns at 7.5 "$cbrl4 stop" at 7.6 "$cbrl5 stop" at 7.7 "$cbrl6 stop" at 7.8 "$cbrl7 stop" at 7.9 "$cbrl8 stop" at 7.0 "$cbrl9 stop" at 0.0 "$video1 start" at $end_sim_time "$video1 stop" at [expr $end_sim_time + 1.0] "$null1 closefile" at [expr $end_sim_time + 1.0] "finish" at [expr $end_sim_time + 1.5] "record" run - Trong kịch này, có sử awk để tách packet ID, payload size phục vụ trình đồ thị hóa Dữ liệu ghi file sendOut.dat reOut.dat thông qua thủ tục record hình - Đồ thị payload size hình Page 27 Hình 13 Payload size Graphic 1.2 Cấu trúc file trace *.tr - Sau kịch mô thực (run) sinh file NAM Trace (qua câu lệnh set nd [open Doan.tr w]), file lưu giữ toàn thông số trình truyền tải gói mô trường mô đóng vai trò trình tính toán hiệu suất trình truyền gói tin Cấu trúc trace file hình Hình 14 Cấu trúc name trace file Page 28 Công cụ tính toán - Mặc định sử dụng tool etmp4 gói myevalvid2 để tái cấu trúc sinh file video sinh file loss_a01e chứa thông tin hình Hình 15 Cấu trúc file loss_a01e - Bản chất việc tính toán đếm số packetID packet type file sd_a01 rd_a01 - etmp4 dựa vào chênh lệch gói tin gửi nhận để tính toán thông số File video người dùng nhận bị số frame đó, hình kết sau truyền video qua mô hình mô Ảnh chụp thông qua công cụ Yuv Viewer Hình 16 So sánh frame 92 Page 29 Hình 17 So sánh frame 104 - Ngoài ra, báo cáo có sử dụng công cụ viết tảng java nhằm kiểm chứng lại kết Công cụ sử dụng thông số nam trace file (*.tr) o Các dòng bắt đầu dấu “+”, có from node “1.0”, to node “13.0”, src_addr “10.0” (router 1) dst_addr “11.0” (router 2) video packet gửi o Các dòng bắt đầu chữ “d”, có from node “1.0”, to node “13.0”, src_addr “10.0” (router 1) dst_addr “11.0” (router 2) video packet gửi bị drop o Ngoài ra, công cụ đếm số packet phía trái (left side) router gửi đi, số packet toàn môi trường mô Page 30 - Để sử dụng tool yêu cầu hệ thống phải cài đặt jdk, terminal gõ lệnh: java –jar LossPacketCounter.jar Doan.tr LossPacketResult Hình 18 Kết sau thực thi file LossPacketCounter.jar Page 31 Kết in hình file LossPacketResult.dat - Ngoài ra, sau sử dụng tool etmp4 nhận số file như: o rate_r_a01e o rate_d_a01e o delay_a01e phục vụ trình nghiên cứu sau V Kết luận Trong báo cáo giới thiệu hai công cụ mã nguồn mở hỗ trợ đắc lực cho việc nghiên cứu, mô kiện xảy môi trường mạng thực tế môi trường mô thông qua công cụ NS2 myEvalVid2 Mô tả tóm tắt trình mô theo sơ đồ Báo cáo giới thiệu cách thức tính toán số tool công cụ myEvalVid2 phục vụ trình tính toán mát gói tin, chất lượng video, số PSNR, MOS, QoS Page 32 VI Tài liệu tham khảo - - - - NS, http://www.isi.edu/nsnam/ns/ AWK, http://en.wikipedia.org/wiki/AWK Standard Dev, http://en.wikipedia.org/wiki/Standard_deviation EvalVid with GPAC - http://www2.tkn.tuberlin.de/research/evalvid/EvalVid/docevalvid.html J Gross, J Klaue, H Karl and A Wolisz, Cross-Layer Optimization of OFDM Transmission Systems for MPEG-4 Video Streaming Chih-Heng, Ke, Phd candidate, EE Department, NCKU, Taiwan, How to evaluate H.263/H.264/MPEG4 video transmission using the NS2 simulator? Velibor Markovski, Fei Xue, and Ljiljana Trajkovi´c, Simulation and analysis of packet loss in video transfers using User Datagram Protocol, 2001, p -13 Chih-Heng Ke, Ce-Kuen Shieh, Wen-Shyang Hwang and Artur Ziviani An Evaluation Framework for More Realistic Simulations of MPEG Video Transmission, 2008, p – Jae Chung, Mark Claypool, NS by Example, 2007 Page 33

Ngày đăng: 30/08/2016, 20:26

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w