» Software » gbDVB » Real time tests 

Real time tests

This page describes the setup and the tools used for performing some real time transmission tests of DVB-T.  

What you need:

  1. A bunch of HD and /or SD video files, maybe also with some 5.1 audio.
  2. FFmpeg command line tool (http://www.ffmpeg.org/)
  3. OpenCaster (http://www.avalpa.com/the-key-values/15-free-software/33-opencaster)
  4. Real-time DVB-T1 transmitter (rtdvbt1tx, available from this website in few weeks)
  5. An ETTUS Research USRP N210 software radio box (http://www.ettus.com/)

Preparing the Transport Stream

This is a very important step, as if the MPEG-2 Transport Stream does not follow the specifications of DVB, no way it can be played on any DVB-enabled device.

I suggest using OpenCaster, it is open source and generates correct TS files. The usage of FFmpeg TS output format is not suggested, I was not able to generate a DVB-valid TS.

Configuring the modulator

The modulation software can be configured using either a textual file (which can be modified and reloaded at run-time) or the integrated web interface.

Textual file

For instance, this is the content of the file conf.txt that I regularly use

# Configuration file for the DVB-T encoder
# inputs: random, null, stdin:bitrate, or filename:bitrate
#hp_input = udp:7009,27144385 # high priority
#hp_input = tcp:7001,4800000 # high priority
hp_input = basicMux_4800000bps.ts,4800000 # high priority
#hp_input = OC3.demo.ts,13271000 # high priority
#hp_input = dsplabHDmux.ts,27144385 # high priority
lp_input = null # low priority
# activate null packet stuffing for precise bitrate: 0 = absent, 1 = present
input_stuffing = 1
# loop input, if file: 0 = do not loop, 1 = loop
input_looping = 1
# channel coding: 1/2, 2/3, 3/4, 5/6, 7/8
hp_coderate = 1/2 # high priority
lp_coderate = 1/2 # low priority
# QAM mapping: 4, 16, 64
M = 4
# hyerarchical mode: 0 (NH), 1, 2, 4
alpha = 0
# OFDM mode: 2048, 4096, 8192
mode = 2048
# Cell ID (used in DVB-H): -1 = not set, 0-65535 = valid
cellid = 0
# In-depth interleaver (used in DVB-H): 0 = absent, 1 = present
indepth = 0
# Guard interval duration: 1/32, 1/16, 1/8, 1/4
delta = 1/32
# Wanted output sampling rate: remember that default one is 9.142857 Msps
sampling_rate = 12500000
# Output: none, filename, named pipe, or stdout
output = pipe:test
# Output power
output_power = 60.0
# Output format: float32, int32, or int16
output_format = int16
# Parallelization: 0 = no threading
threads = 6
# stopband of spectral emission filter
stopband = 4000000
# attenuation in the stopband of the mentioned filter
attenuation = 30
# DC offset
offset = 0.0,0.0
# DVB-T system bandwidth
bandwidth = 8

 The comments are introduced by the hash sign. All the parameters should be quite self-explanatory.

Web interface

There is a small integrated web server responding at port 8080, which can be used to monitor and reconfigure the modulator parameters online.


Going to RF

Now we need to properly feed the BB I&Q stream produced by rtdvbt1 to the N210 box. To this purpose, I have used tx_samples_from_file, one of the sample programs that are included in the UHD suite. I have modified this program in order to accept a different type of input, Named Pipes. Under Windows, a named pipe plays the same role of a fifo under Linux. Thus, rtdvbt1 writes the BB samples into the pipe, and the UHD program reads them from the pipe.


The above spectrum represents a capture at about 40cm from the TX antenna (the experiment is carried out inside of the laboratory), using the uhd_fft program from GNUradio. The highest signal is the channel being broadcast by rtdvbt1tx, the signal on the left is an existing DVB-T channel (actually broadcasting), and the porch on the far left should be an image of the main transmitted signal (I do not know whether that is either a problem of rtdvbt1tx, or of the TX USRP, or of the RX USRP).

Computational cost

The computational cost of running a DVB-T modulator on a PC can be estimated from the following results, which report the time needed to encode a superframe of DVB-T. The PC used for the performance has the following specs:

  • CPU Intel Core i7 860 @ 2.8 GHz (quad-core)
  • RAM 8 GB
  • RAID 0 disk with 2 TB capacity
  • Windows 7 Home Premium Service Pack 1
  • Visual C++ 2008 Express Edition v. 9.0.30729.1 SP

The above figure details the times of each basic processing function, as well as the total time. A 6-thread configuration has been used, with 64-QAM 7/8 1/32 2k modulation parameters, for which a superframe is 62.63 ms long.

Last update: 2017-07-20, 15:01:44