Difference between revisions of "Simple DVB with Gstreamer and GNU Radio"

From MyLabWiki
Jump to: navigation, search
(Overview)
Line 10: Line 10:
 
: An UVC compliant webcam is used as a cheap but efficient video source. Current [[:Category:Cameras|webcams]] can provide video at HD resolutions, though the image quality is not as good as with a good HD camcorder. Nevertheless, [http://en.wikipedia.org/wiki/USB_video_device_class UVC cameras] are very easy to capture via USB and are thus excellent for functional and performance testing purposes.
 
: An UVC compliant webcam is used as a cheap but efficient video source. Current [[:Category:Cameras|webcams]] can provide video at HD resolutions, though the image quality is not as good as with a good HD camcorder. Nevertheless, [http://en.wikipedia.org/wiki/USB_video_device_class UVC cameras] are very easy to capture via USB and are thus excellent for functional and performance testing purposes.
 
; Gstreamer
 
; Gstreamer
: Gstreamer is used for everything related to video processing. This includes capturing the video frames from the camera(s), adding text overlays, compressing, encoding and multiplexing into a transport stream.
+
: Gstreamer is used for everything related to video processing. This includes capturing the video frames from the camera(s), adding text overlays, compressing, encoding and multiplexing into a transport stream. See my [[Gstreamer Cheat Sheet]] for all the cool stuff we can do with Gstreamer.
 
; GNU Radio
 
; GNU Radio
 
: GNU Radio is used to create the software defined radio transmitters and receivers.
 
: GNU Radio is used to create the software defined radio transmitters and receivers.
Line 16: Line 16:
 
: The Universal Software Radio Peripheral provides the necessary transmitter and receiver hardware to get our signals on the air (bits and bytes can not fly)
 
: The Universal Software Radio Peripheral provides the necessary transmitter and receiver hardware to get our signals on the air (bits and bytes can not fly)
  
 +
Standard PC hardware is used to run both the Gstreamer and GNU Radio processes, i.e. we do not use any expensive video compression hardware. A modern PC with an Intel i7 processor is perfectly capable of compressing the HD video and running the software radio process at the same time.
 +
 +
Using these components we can accomplish some very advanced and cool functionalities, such as:
 +
 +
# Get multiple video streams and other data into one data stream (e.g. MPEG-TS)
 +
# Experiment with different codecs and containers
 +
# Experiment with different combinations of modulation and FEC
 +
# Run simulations without any RF hardware in the loop
 +
# Get on the air on 1.2 GHz (WBX, DBSRX, RFX1200), 2.4 GHz (RFX2400) and many other frequencies
 +
# Setup two-way video chats
  
 
== Conceptual prototype (DVB Mk0) ==
 
== Conceptual prototype (DVB Mk0) ==

Revision as of 22:48, 7 August 2010

This article describes a simple video broadcasting setup based on Gstreamer, GNU Radio and the Universal Software Radio Peripheral (USRP). It does not (yet) provide any DVB-T or DVB-S compatible system — just a simple way to get your webcam on the air!

Overview

The objective is to create a simple digital video broadcasting setup using easily available components as illustrated on the figure below. The long term goal is to get a similar setup up to near space by the end of 2010 and LEO by the end of 2011.

DvbSys.jpg

UVC Webcam
An UVC compliant webcam is used as a cheap but efficient video source. Current webcams can provide video at HD resolutions, though the image quality is not as good as with a good HD camcorder. Nevertheless, UVC cameras are very easy to capture via USB and are thus excellent for functional and performance testing purposes.
Gstreamer
Gstreamer is used for everything related to video processing. This includes capturing the video frames from the camera(s), adding text overlays, compressing, encoding and multiplexing into a transport stream. See my Gstreamer Cheat Sheet for all the cool stuff we can do with Gstreamer.
GNU Radio
GNU Radio is used to create the software defined radio transmitters and receivers.
USRP
The Universal Software Radio Peripheral provides the necessary transmitter and receiver hardware to get our signals on the air (bits and bytes can not fly)

Standard PC hardware is used to run both the Gstreamer and GNU Radio processes, i.e. we do not use any expensive video compression hardware. A modern PC with an Intel i7 processor is perfectly capable of compressing the HD video and running the software radio process at the same time.

Using these components we can accomplish some very advanced and cool functionalities, such as:

  1. Get multiple video streams and other data into one data stream (e.g. MPEG-TS)
  2. Experiment with different codecs and containers
  3. Experiment with different combinations of modulation and FEC
  4. Run simulations without any RF hardware in the loop
  5. Get on the air on 1.2 GHz (WBX, DBSRX, RFX1200), 2.4 GHz (RFX2400) and many other frequencies
  6. Setup two-way video chats

Conceptual prototype (DVB Mk0)

This is the very first muck-up that I used to get my Logitech Webcam Pro 9000 webcam on the air. Gstreamer and GNU Radio are connected using a named pipe.

DvbSysDia.png


Transmitter

GmskTx.jpg

Receiver

GmskRx.jpg

Transceiver

This simple, full duplex transceiver was created to allow using one computer and one USRP for both transmit and receive. By default, both the receiver and the transmitter are set to use the same frequency so that the receiver will receive what the local transmitter transmits; however, it can also be used to make two way video contacts.

GmskTrx.grc.jpg

This transceiver has been running well on a 13" 2.4GHz MacBook Pro for more than 4.5 hours (video of the setup).

GmskTrxSetup.jpg GmskTcvrScreenshot.png

Simulator

This simple simulator was used to test the idea before it was put on the air. It simply sends the video through a GMS modulator, mixes it with noise, the a GMSK demodulator.

Insert flowgraph

A video demo of the simulator in action is available here.

Problems / TODOs

  • The MPEG-TS muxer in Gstreamer does not currently support CBR and the only way to get close to CBR is via the H.264 encoder, which is not constant enough.
    • Fix the MPEG-TS muxer
    • The MPEG-TS muxer in the mplayer repository has been updated to support CBR


References

Blogs

Videos

  • 2010.07.25: GStreamer / GNU Radio video transmission simulator - first signals: YouTube.
  • 2010.08.03: DVB with GNU Radio and Gstreamer - Test stream: YouTube.
  • 2010.08.03: DVB with GNU Radio and Gstreamer - Webcam: YouTube.
  • 2010.08.07: DVB with GNU Radio and GStreamer - GMSK Transceiver: YouTube.

Related articles

  1. Embedded Video Processing and Radio Unit