Simple DVB with Gstreamer and GNU Radio

I have had this idea of using my webcam for digital video transmission for quite some time now. Capturing and processing video from UVC webcams has been a routine for a long time and I have had great success with Logitech webcams (the 9000 series) that have great UVC support. I still had a problem though with finding a good way to interface the GNU Radio transmitter and receiver to the video processing pipeline implemented in Gstreamer.

An idea for a DVB setup using a webcam, a laptop with Gstreamer and GNU Radio and the USRP

In my experiment with receiving packet radio from the ISS I used a named pipe to create a real time interface between the GNU Radio receiver and the packet decoder multimon. I decided to try this trick for sending video in to and out of GNU Radio and it works! The following experiments were implemented and executed on the 27th and 28th of July with some minimal preparation on the 26th.

The setup

The setup is actually very simple and is based on the idea that the Gstreamer video processing pipeline is connected to the GNU Radio SDR transmitter/receiver using a named pipe. Note that it is really just a conceptual prototype and I didn’t do much out of the software radio transmitter and receivers. I just used a GMSK modulator to get the video on the air.

Conceptual overview of the DVB system based on GNU Radio and Gstreamer edit Delete caption

The actual code for the transmitter and the receiver is not much more complicated than the conceptual diagram above Smile

Note that both myfifo.raw and video2.ts are Unix pipes created using the “mkfifo” command.

The simple DVB transmitter using GNU Radio and Gstreamer

The simple DVB receiver using GNU Radio and Gstreamer

Unfortunately, the Gstreamer player in the receiver did not work. I suspect it is due the mess between VBR video / CBR radio (see more under Problems). But I could use mplayer instead!

Demo videos

The first video shows the very first on the air transmission using a test video stream. I shows starting the transmitter and then the receiver. I even play with stopping and re-starting the transmitter while leaving the receiver run.


In the second video I replaced the test video stream with my Logitech Webcam Pro 9000.

Pretty cool, right?


GNU Radio and in particular the USRP requires that the data stream has constant bitrate. This is very normal and is in fact also required by DVB standards. For this purpose, the MPEG-TS specification allows filling up the transport stream with NULL packets. Unfortunately, none of the MPEG-TS muxers I have tried support this and in the current setup it is actually the H.264 encoder that is commanded to try and maintain a constant bitrate. Obviously, this is not good enough and will have to be improved.

As a side note I can mention that I’ve seen patches on the mplayer list where CBR has been added to the MPEG-TS muxer. It’s difficult to know though when this will propagate all the way to Gstreamer.

I should also mention that shortly after start, a lag of almost 10 seconds builds up between the webcam and the video display at the receiver end.