An Adaptive Video Streaming Platform with Adaptive Channel Coding
Advisor: Prof. Dapeng Oliver Wu
|| Introduction || Experiment 1 || Experiment 2 || Experiment 3 || Experiment 4 || Download || Useful Links ||
¡¡
¡¡
The goal
of this project is to
provide the methods and framework for a general multimedia wireless
test-bed. The test-bed is built with GNU
Radio and Universal
Software Radio Peripheral (USRP). In Multimedia
Communications and Networking Laboratory (MCN) at University
of Florida, there are some works have been done for the test-bed,
including Real-world
Transmission with GNU Radio and USRP and Cross-layer
wireless video testbed.
In this project, I continue to do some related works on it, especially
in providing approach to plugin cross layered codec and framework of
modular adaptive codec for multimedia wireless test-bed.
The following is the testbed architecture:
To
implement adaptive control in the testbed architecture, we need to
design a flexible framework and a universal well-defined codec
interface. In this project, I use Python and C/C++ combined programming
to implement some very simple but workable sample softwares in several
experiments:
Experiment
1: Send live video stream data via GNU Radio and USRP
Experiment
2: Send video stream data via wireless channel without MAC
Experiment 3:
Send video data via wireless channel with channel coding
Experiment
4: Send data via wireless channel with RCPC channel coding
The purpose of the
experiment 1 is to build a simple but flexible video data transpotation
system. In experiment 2, the CSMA/CD MAC layer is removed from the
transportation system so that it works more efficiently
in point-to-point wireless transport which doesn't need CSMA/CD MAC
layer. In experiment 3, I provide a general mechanism to add custmized
codec (or modulation) modules into the transport system. Finally, I
add a RCPC channel codec module into the transport system in experiment
4.
You can download source codes in the experiment sections, and you can follow the result links of these experiments to interact with flash clips to know
how I do the experiment as well. Also you can go to the download section to
download all the demonstration flash clips and all source codes in one
file. Lastly, you can find some information in useful links section.
Experiment 1: Send Video Data by a TCP/IP tunnel (with MAC Layer ENABLED) based on GNU Radio and USRP
The purpose of this experiment is to show how a simple video transport system works on GNU Radio and USRP boards. The
experiment builds a wireless TCP/IP tunnel between two Linux PCs based
on GNU Radio and USRP, and sends video data on it.
As
a foundation of the wireless testbed, the data transportation mechanism
must be flexible and easy to use. I choose TCP/IP as the core of the
data transportation mechanism so that all TCP/IP based applications can
send and receive data by it. So I start my work based on tunnel.py,
which is a GNU Radio example python program building a wireless TCP/IP
tunnel among nodes on a CSMA/CD transmission medium. Program tunnel.py
uses binary exponential back-off(BEB) algorithm as its MAC mechanism.
In
this experiment, I have two Linux PCs with GNU Radio 3.3.0 installed on
it. There is a example program
GNU_RADIO_BASE_DIRECTORY/gnuradio-examples/python/digital/tunnel.py,
which I will use to set up the wireless TCP/IP channel between the two
PCs. I use VLC
media player as the video stream data sender and
receiver, in fact you can use any TCP/IP based video
capture/replay/streaming software instead of VLC media player.
In
this experiment, I didn't write any new program code, I just use
tunnel.py to perform all the data transportation. But according to my
experience, we should be very careful to adjust the USRP parameters to
get them work. Here is my tunnel.py command lines, which make sure the
USRP boards work well in our laboratory.
computer | Host A | Host B |
computer name | ted-unbuntu | mcn-Dell-DM051 |
Wired IP | 10.227.180.87 | 10.227.180.217 |
USRP serial no. | 466d8a34 | 466d8b7e |
Tx | Daughter Board B 908M | Daughter Board B 922M |
Rx | Daughter Board A 921.975M | Daughter Board A 908.020M |
Wireless IP | 192.168.200.1 | 192.168.200.2 |
tunnel.py command line for default 100K bps bitrate | sudo ./tunnel.py --tx-freq=908M --rx-freq=921975000 -T B -R A --tx-amplitude=1 --rx-gain=15 | sudo ./tunnel.py --tx-freq=922M --rx-freq=908020000 -T B -R A --tx-amplitude=1 --rx-gain=15 |
command line for 500K bps bitrate | sudo ./tunnel.py --tx-freq=908M --rx-freq=921975000 -T B -R A --tx-amplitude=1 --rx-gain=15 --bitrate=500000 | sudo ./tunnel.py --tx-freq=922M --rx-freq=908020000 -T B -R A --tx-amplitude=1 --rx-gain=15 --bitrate=500000 |
You
should adjust all the parameters to get them work in your own
circumstance. For your convenience, I provide the source files you can
download here.
The following is the demonstration in flash clip,
which I create using WINK.
You can interact with it to have a look at
what I do in my experiment. Please be very patient to wait for the
flash clip loading, typically you have to wait more than 1 minute when
you are on a 1Mbps ADSL link. To get acceptable display, I recommend
you use a large screen which has at least 1366 pixels in width
resolution. When you play the flash clip, you can click the green
buttons if necessary. You may also need to know some concept about
X-Window
to know what the demonstration is showing.
Click to look at the the result of experiment 1.
The result of experiment 1 indicates that video stream goes well over GNU Radio and USRP boards.
¡¡
Experiment 2: Send video stream data via wireless channel without MAC
In
experiment 1, I have set up a wireless channel between host A and host
B, which supports TCP/IP tunnel over it. As a default aspect, between
IP layer and PHY layer there is a MAC layer, which enables CSMA/CD on a
broadcast medium and allows multiple nodes access the medium
simultaneously. In our wirless testbed, we hope provide a flexible
framework for research purpose on wireless communication, for example,
sometime we want to remove MAC from the system to acquire better
performance in a point-to-point wireless communication system.
In this experiment, I modify the tunnel.py and rename it as
tun_nomac.py, in which I remove the MAC mechanism. Without MAC
mechanism, I don't need to worry about the tx amplitute, rx gain and
threshold required by CSMA/CD, so that I can set these parameters very
freely to get much better performance in our lab's circumstance. For
example, I can set a higher rx gain to improve demodulation capacity
without worrying about the CSMA/CD threshold.
You can download the source
code and decompress the files, then run the program
tun_nomac.py with some suitable command line options to get best
performance in your own circumstance.
The following are the demonstration flash clips, enjoy it!
Result of experioment 2-1: Compare the performance between with and without CSMA/CD MAC.
Result of experioment 2-2: Transport video data by non-MAC channel.
As the result of experiment 2-1 shows, in point-to-point environment, the performance of wireless channel without MAC is better than one with MAC. I will use the non-MAC channel as the base of the experiment 3 and experiment 4.
Experiment 3: Send video data via wireless channel with channel coding
To do
research work on wireless communication, we often need to add our own
channel coding module to the system. Here I write a very simple example
program to show how to write a channel codec module and invoke it from
the testbed wireless framework. In this experiment, I use SWIG to wrap the C/C++
codec module code into framework Python code, please refer to SWIG
manual to learn how it works and how to use it.
You can download source code,
decompress all the files to a directory and then run the following
commands to build the programs:
swig -c++ -python pycodec.i
python setupcodec.py build_ext --inplace
And then, run the program tun_nomac_codec.py on both Linux PCs to setup
a wireless channel with channel coding between the PCs.
The following is the demonstration of using ping command to test the
wireless channel with channel coding.
¡¡
Experiment 4: Send data via wireless channel with RCPC channel coding
The following is the demonstration.
¡¡
You can download all the demonstration flash clips in one file, and you can also download all the source files.
Here
are some useful links:
Python:
Python Programming
Language ¨C Official Website
X-Window:
X
Window System
VLC:
Official page for
VLC media player, the Open Source video framework!
SWIG:
Simplified Wrapper and
Interface Generator
WINK:
WINK Homepage