(Alpha Version)
VITOW is a project to convey HD video using off-the-shelf Wifi dongles. Reliability is achieved by means of LDPC-Staircase coding at the expense of adding delay.
This project uses code or has been inspired from:
Unlike wifibroadcast, which is focused on live transmission, VITOW is meant to be used by non delay sensitive applications that require high-quality video transmission.
After almost two decades since the first 802.11 products were launched, nowadays WiFi products are ubiquitous, mature, inexpensive and of high quality. As a result, WiFi devices can be used as inexpensive radio transceivers that are capable of providing several Mbps links in a license-free band. However, WiFi products have inherent protocol limitations that may limit the througput or applicability in certain cases (for intance, in long range links).
To bypass these limitations, this project uses packet injection in the transmitting side, and monitor mode in the reception side. Using this combination the limitations of the 802.11 protocol can be removed:
- By means of packet injection it is possible to customize and forge the packets that are going to be transmitted.
- By means of monitor mode it is possible to receive any transmitted packet.
VITOW is focused on the tranmission of high-quality video on a one-to-many basis (broadcast), prioritzing quality over delay. To achieve robustness, VITOW encodes the information using the LDPC-Staircase Codec. Using that codification the reception side is able to deliver smooth and seamless video even when there are severe packet losses. Moreover, due to its nature of one-to-many structure which implies that there are not ACK's, VITOW may be used in long range links without suffering any degradation.
The following list of hardware is recommended:
- Pair of computers running GNU/Linux or Rapsberry (B+/2/3 preferred for maximum USB output amperage) at the transmitting side (TX). Computer running GNU/Linux at reception (RX).
- ALFA AWUS036NHA or TP-LINK TL-WN722N wifi dongles.
- Raspberry pi Camera.
(Tested in Ubuntu 14.04 LTS)
VITOW uses the LDPC-Staircase codec from OpenFEC, so first of all this codec has to be downloaded and installed. Cmake is needed. The installation process is described in the README file of the OpenFEC codec, so just follow the instructions.
When the project has been compiled by cmake, under the bin/Release directory three shared libraries have been created: libopenfec.so, libopefec.so.1, libopefec.1.4.2, that need to be (sudo)-copied to /usr/lib/.
The VITOW project comes with a compile.sh script, before running it libpcap has to be installed:
$ sudo apt-get install libpcap-dev Now, the script may be run:
$ sudo ./compile.shIn order to display the video in RX, mplayer performs pretty well:
$ sudo apt-get install mplayerFinally, the firmware that comes with the VITOW project (htc_9271.fw) has to override the one that is located at /lib/firmware/
To load the new firmware, unplug and plug the device or run:
$ sudo rmmod ath9k_htc
$ sudo modprobe ath9k_htcVITOW takes whatsoever is introduced in the standard input at the transmiting side and dumps to the standard output what has received and correctly decodified at the reciving side.
First of all, the wifi dongles (in TX and RX) have to be set in monitor mode, the monitor.sh that is provided in the project shows the steps to follow.
If the camera used is the raspicam, the following line will initiate the transmission of 720p video @ 4Mbps and 30fps at the transmitting side (TX). Note the necessity of using privileges:
$ sudo su
$ raspivid -t 0 -w 1270 -h 720 -b 4000000 -hf -ih -fps 30 -n -fl -pf high -o - | ./TXAt the receiving side (RX), the following command initiates the reception process (also privileges needed):
$ sudo su
$ ./RXAnd in order to display the video that is being received:
$ tail -F testing | mplayer -fps 30 -framedrop -demuxer h264es -The stream that is being received may be uploaded to Youtube to create a live event, in that case, ffmpeg will be the best solution the wrap the contents of the raspicam live stream into a format that Youtube accepts without re-encoding:
$ sudo apt-get install ffmpeg And the command to upload the file that is being received:
$ tail -F testing | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/urlYoutubeBroadcas