Cross-layer wireless video testbed
Project members: Zhifeng Chen, Jun Xu
Advisor: Prof. Dapeng Oliver Wu
|| Introduction || Background || Result || Download || Future Work || Useful Links ||
ĦĦ
This is an open source cross-layer wireless video development platform and testbed for researchers, including us, to verify their own algorithms at the most flexibility. We put all source codes with necessary information here. So, It can be downloaded freely for any non-commercial use, and interested readers may repeat this demo by going through this webpage.
We are deploying our research works on QoS of wireless video by cross-layer design and results will come very soon. All our research works will be verified in the real world wireless environment but not just by simply making some assumptions. That will be the major difference to distinguish our research works from others.
ĦĦ
Why this project?
Both Multimedia and mobile communications have experienced massive growth and commercial success in the recent years. As the convergence of these two kinds of technologies, mobile multimedia communications is expected to achieve unprecedented growth and worldwide success. However, both the energy constraint in mobile devices and the limited bandwidth resource and time-varying characteristic of wireless channel bring up challenges for multimedia system design to meet certain QoS requirement. To support multimedia transmission over wireless channels, it is important to consider cross-layer design to support end-to-end QoS. For example, application layer need to know the transmit power, bandwidth and channel quality of physical layer to adaptively select the optimal coding algorithm. In turn, physical layer should be flexible enough to adjust its parameters, such as the transmit power, modulation, channel coding rate, etc according to user defined QoS level from application level, All of them should be tuned together with parameters in application layer, like source data rate, quantization parameter, motion estimation complexity, etc. Therefore, in a cross-layer design, the control parameters in all layer should be tunable on-the-fly.
However, most of current wireless video research works test their algorithms based on commercial WiFi products, which are not flexible enough to support the cross-layer design algorithms. To build up a research level cross-layer wireless video testbed become imperative. That is the motivation for us to trig this project. In this project, we build up this open source cross-layer wireless video testbed, where people, including us, may verify their cross-layer design algorithms at the most flexibility.
Why GNU Radio and USRP?
Software Defined Radio (SDR) is the technique of getting code as close to the antenna as possible. It turns radio hardware problems into software problems, that is, instead of hardware, the software defines the transmitted waveforms, and demodulates the received waveforms. Software Defined Radio (SDR) is a revolution in radio design, especially for the cross-layer design of multimedia transmission over wireless channels with different Quality of Service (QoS) assurance. Due to its ability to create radios that change on the fly, it is very suitable for testing dynamic wireless video performance under software-controlled parameters.
GNU Radio is a free software toolkit for learning about, building, and deploying Software Defined Radios, and is now an official GNU project. GNU Radio is a signal processing package, which is distributed under the terms of the GNU General Public License. GNU Radio also provides functions to support implementing spectrum analyzer, an oscilloscope, concurrent multi-channel receiver and an ever-growing collection of modulators and demodulators. (here is the detail function/Library list.) So, in this project, we choose GNU Radio as our development environment.
Universal Software Radio Peripheral (USRP) is a high-speed USB-based board for making software radios. The USRP has an open design, with freely available schematics and drivers, and free software to integrate with GNU Radio.
Why H.264/T264?
T264 is a simple open source H.264 codec, and can be implemented in embedded system. T264 use SSE programming technology, so it can be used to decode H.264 in real time. We will implement this demo with JM and x264 in the near future.
ĦĦ
The system diagram is showed as Figure 1:
Figure1: streaming stored H.264 video over USRP
ĦĦ
Since both GNU Radio and H.264 codec put a very high workload at CPU, so actually we need a dual core PC to deal with GNU Radio process and H.264 decoder process. In our next project with real-time H.264 encoding, we need two dual-core PCs as showed in Figure 2.
Since our current GNU Radio environment is setup in two PCs both with a single core, and considering it is more convenient for most users to decode H.264 and display in real-time in a Windows environment, in our demo setup, we use three PCs, among which two PCs with Linux OS and one PC with Windows OS. So, in this demo we use UDP/IP socket, instead of Linux socket interface, to connect GNU Radio receiver process in Linux and H.264 decoder process on Windows. With all source code and standard socket programming, it is very easy to transplant our current demo to the one showed above. We will work on this later.
In the first Linux PC, H.264 file is read frame by frame from hard disk, and then each frame is packed with packet sequence number as the application layer header. The application layer packets are sent to data link layer and physical layer, where preamble, access code, CRC, etc. information are assembled. For more information in data link layer and physical layer, please refer to the experiment 1 in project 3. As the last step in PC1, the assembled packets are modulated with GMSK and sent to USRP through USB interface. USRP then transmit each packet in 900MHz ISM band.
The second Linux PC read data from USRP through USB interface, which are demodulated with GMSK. Then the received link layer packets are dissembled into application layer packets with packet sequence number. For more information in data link layer and physical layer, please refer to the experiment 1 in project 3. As the last step of the second Linux PC, all correctly received packets are sent to H.264 decoder in Windows PC through UDP/IP socket. The H.264 decoder performs as a UDP server and display terminal, which receives packets from the second Linux PC, decodes H.264 in real-time, and displays the decoded video sequences.
Demo setup from youtube:
ĦĦ
To run this demo, it is better to have prerequisite knowledge and experience as below:
Knowledge:
Wireless communications, Digital Signal Processing, Video coding/H.264 codec
Experience:
Software: Linux, Python, C++, Socket programming
Hardware: Radio Frequency (RF) experience
Download full files in winzip format here: full_files.zip
Download full files in gz format here (for Linux): full_files.tar.gz
Source code:
Before run these codes, you may read the readme file here.
Transmitter:
tx_H264.py: which send H.264 packets through USRP in transmitter side.
test.264: this is a H.264 encoded file
Receiver:
rx_H264.py: which receive H.264 packets through USRP in receiver side and send the correctly received packets to H.264 decoder
H.264 decoder:
For H.264 decoder and display source code, we will transplant them into Linux OS. Then we will release H.264 decoder source code here:)
Test files:
client_UDP.py sever_UDP.py test_H264.py
These files are served to ensure the UDP/IP socket work normally before running the wireless transmitter and receiver.
You may first test the UDP connection between Linux and Windows with client_UDP.py and sever_UDP.py. They are OS independent, so either one can be run under Linux or Windows OS. In Windows OS you need to install python interpreter first. Here is the updated webpage for python: http://www.python.org/download/. Note that after install python in Windows PC, you may also add python path into Environment Variables.
After the connection work normally, you may need to test H.264 decoder before a wireless transmission. You can use test_H264.py with Ethernet connection before using the USRP connection.
The system diagram is showed as below:
Figure 2: streaming real-time encoded H.264 video over USRP
Since both GNU Radio and H.264 codec put a very high workload at CPU, so, we need two dual core PCs to deal with GNU Radio process and H.264 codec process.
There are two processes running in PC1. The first process captures raw video data from camera and encodes the raw data into H.264 format frame by frame. Then the coded frames are sent to process 2 through Linux socket. The second process receives the data from first process and then packs each frame with packet sequence number as application layer header. Then the application layer packets are sent to data link layer and physical layer, where preamble, access code, CRC, etc. information are assembled. For more information in data link layer and physical layer, please refer to the experiment 1 in project 3. As the last step in PC1, the assembled packets are modulated with GMSK and sent to USRP through USB interface. USRP then transmit each packet in 900MHz ISM band.
There are two processes running in PC2. The first process reads data received from USRP, which are demodulated with GMSK. Then the received link layer packets are dissembled into application layer packets with packet sequence number. For more information in data link layer and physical layer, please refer to the experiment 1 in project 3. As the last step of first process in PC2, all correctly received packets are sent to second process through Linux socket for decoding and display. The second process receives packets from the first process, decodes H.264 in real-time, and displays the decoded video sequence.
ĦĦ
Here are some useful links which I used during my development.
Pyhton:
Byte of Python: very suitable for
Python beginner
http://swaroopch.info/text/Byte_of_Python:Main_Page
Dive Into Python
--Python from novice to pro
http://diveintopython.org/
Python Library Reference
http://docs.python.org/lib/
http://www.python.org/doc/current/lib/lib.html
GNU Radio:
GNU Radio official website
http://www.gnu.org/software/gnuradio/
step by step
http://www.nd.edu/~jnl/sdr/docs/
GNU Radio module usage
http://webpages.charter.net/cswiger/modules.html
USRP:
USRP board
http://www.comsec.com/wiki?UniversalSoftwareRadioPeripheral
Boards Price list
http://www.ettus.com/custom.html
H.264:
H.264 decoder optimization exploiting
SIMD instructions
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1413088
ĦĦ
Visitor Locations:
The location of each visit is based on the IP address of the computer used.