View
235
Download
5
Embed Size (px)
Citation preview
1
LAB 4. Video Transmission over WLAN/GPRS
2
Goal 嘗試使用WLAN/GPRS傳送 Video 瞭解WLAN/GPRS網路特性 瞭解WLAN/GPRS對於 Video傳輸之影響 增進對於網路特性及多媒體傳輸的基本認識
3
MPEG-4 STANDARD Consists of 6 parts:
1. Systems ISO/IEC 14496-12. Visual ISO/IEC 14496-33. Audio ISO/IEC 14496-2 : AAC, CELP, …4. DMIF (Delivery Multimedia Integration Framework)
ISO/IEC 14496-65. Reference Software ISO/IEC 14496-5: it is a
software for the tools defined in standard 14496-1,2,3 and 6 (e.g. audio encoding software).
6. Conformance defines conformance conditions for bit streams and devices; this part is used to test MPEG-4 implementations .
4
MPEG Evolution
5
Differences between MPEG2 and MPEG4
Video data in MPEG-2 are compressed by JPEG pictures Video data in MPEG-4 is a hybrid coding based and object
based coding Bitrate range of MPEG-2 is 4 -80 MBit per second Bitrate range of MPEG-4 is 10 Kbit up to 1 Gbit per second No interaction is possible in MPEG-2 Interaction is possible in MPEG-4
6
What is MPEG-4 The scene is built by independent objects
7
MPEG-4 and 3GPP 3GPP is based on MPEG4
8
MPEG-4 Resource DivX
http://www.divx.com/ Xvid
http://www.xvid.org/ Ffmpeg
http://ffmpeg.sourceforge.net/ Mpeg4IP
http://mpeg4ip.sourceforge.net/
9
Video 傳輸實驗步驟 (1) 採用 Xvid Mpeg4 codec 實作 兩端執行實驗程式 BuffaloAV 首先對視訊設備做初始化
[Video][Init]
10
Video 傳輸實驗步驟 (2) 初始化過程中,會要求設定視訊格式
解析度可調整視訊大小,此處設為 320x240 圖素深度 ( 位元 ) 及壓縮請設為 RGB24 底下跳出的對話盒,會因廠牌及驅動程式而有所不同
11
Video 傳輸實驗步驟 (3) 初始化成功後,程式底部的訊息視窗會顯示 Initialize captur
e camera ok ,並且顯示視訊畫面
12
Video 傳輸實驗步驟 (4) 進行連線 : 按 [Video][Connect]
跳出底下對話盒 , IP 欄請輸入對方的 IP Video Port 兩端均設為一樣
13
Video 傳輸實驗步驟 (5) Connect 後,可由訊息視窗看到程式已經啟動相關的
Encode, Decode, Recv Threads
最後,按 [Video][Send/Recv] 即可進行傳輸
14
Video 傳輸實驗步驟 (6)
15
程式流程說明 兩端以點對點 , UDP 傳送封
包
之前 Video Connection Dialog 即在設定雙方的 IP 及用來溝通的 Port
16
程式流程說明
FrameCallbackProc VideoEncodeThread
Internet
VideoRecvThread VideoDecodeThread
17
練習 (1) 利用 WLAN/GRPS 連線,進行 Video 傳輸 修改程式,傳輸加上 frame number 編號,以觀察 pa
cket loss 情形 作法:
修改資料結構 FrameFormat ,加上 frameNum typedef struct { short width; short height; }FrameFormat;
每次 sendto 時 frameNum 遞增, recvfrom 時再顯示 frameNum ,以觀察封包傳遞狀況
18
練習 (2) 比較 WLAN 與 GPRS 的封包遺失狀況
同上述作法,修改資料結構 FrameFormat ,加上 time
觀察 WLAN 與 GPRS 的封包傳遞延遲狀況