digiliteZL Cookbock
digiliteZL Cookbock
Overview
DigiLiteZL is a DVB-S transmitter device designed to be used for digital amateur television
(DATV) transmissions, nominally in the 1.2GHz amateur band. It receives an MPEG-2 transport
stream from a PC via a USB connection, performs various coding operations according to the
DVB-S specification, and generates a QPSK-modulated output waveform.
This document describes one of the solutions to generate the live MPEG-2 transport stream
to feed Digilite-ZL equipped with his DE0-nano FPGA board . The proposed solution is based
on a pc or laptop running linux Ubuntu 12.04 LTS with additional multimedia utilities and a
video capture card from Hauppauge.
The installation process described below has been tested starting with an empty
disk on which ubuntu has been installed.
Hardware
The main hardware, in addition of course to the Digilite-ZL and a PC, is a video capture card
from Hauppauge that uses a MPEG-2 Connexant compression chip.
There are a number of different models that you can use:
1. Hauppauge PVR150, PVR250 and PVR350 PCI video capture cards (pc)
2. Hauppauge WinTV PVR USB2 and HVR-1900 external devices (laptops)
Please remember that you need two USB port if you implement the solution on a laptop. One
for the Digilite-ZL and one for the Hauppauge box.
The setup described in this document uses the WinTV PVR USB2 external device and a a no-
name laptop Intel Core Duo CPU 2.66 GHz CPU and 2 Gb RAM.
Software installation
The proposed solution to generate the live MPEG-2 transport stream is implemented on linux
operating system with multimedia toolsbox available from the linux community.
This comprises: linux Ubuntu 12-04, v4L2-utils utilities, FFmpeg tools and Opencaster 3.1.4-
With the CD generated, you can try Ubuntu without affecting your current system. If Ubuntu
load and run without problem from the CD, you can install it automatically from the CD. If you
have windows installed on you pc, the installer will detect this automatically and make a
second partition for Ubuntu as well as the dual boot configuration.
V4l2 installation
v4l-utils is a collection of various video4linux (V4L) and DVB utilities. These utilities are used
to configure the Hauppauge video capture card.
The commands (CMD) are to be typed on a terminal window that you can open with CTRL-
ALT-T
If you get the the above message go to the next step otherwise jump to step 3.
First, we need to update the local package index with the latest changes made in
Then we download and install the v4l2 utilities with the CMD:
sudo apt-get install v4l-utils
If you see your Hauppauge device, you have successfully installed the tools.
Please note the device name (in the screen dump above video1). You will need this
information later on.
The commands (CMD) are to be typed on a terminal window that you can open with CTRL-
ALT-T
If you get the the above message go to the next step otherwise jump to step 3.
First, we need to update the local package index with the latest changes made in
repositories available on the Internet with the CMD: sudo apt-get update.
Then we download and install the ffmpeg tools with the CMD:
sudo apt-get install libav-tools
If you see a long list of the options available for ffmpeg then you have successfully
installed the tools.
The commands (CMD) are to be typed on a terminal window that you can open with CTRL-
ALT-T
The software should be downloaded from the Avalpa web site at:
http://www.avalpa.com/the-key-values/15-free-software/33-opencaster
Once on the web site, click on “complete package” to download the software.
On the pop-up window from Firefox, select the option: Open with Archive Manager
(default) and then click on OK
On the pop-up window from the Archive Manager, just click on Extract. A directory will
be created in the Home directory with the source files needed to compile OpenCaster.
With a fresh installation of Ubuntu 12.04 LTS, only the “python2.7-dev” package needs
to be installed.
For more details consult the INSTALL file in the OpenCaster3.1.4 directory.
To install the “python2.7-dev” package, run in a terminal window the following CMD:
sudo apt-get update
sudo apt-get install python2.7-dev
Lorenzo Pallara from Avalpa has kindly provided us with an additional OpenCaster tool
called 'pesdemux' to demultiplex the Program Stream coming from the Hauppauge
card. The tool can replace ffmpeg command in the application script file (see the
software section).
The source code for pesdemux is not included in the package you have downloaded.
Before you can compile and install OpenCaster3.1.4, you need to copy the source code
for it in the right place in the OpenCaster3.1.4 directory with the following procedure:
Step 1:
From the digilite-zl directory, copy the directory 'pesdemux' in the
OpenCaster3.1.4/tools directory with the following CMD:
cp -r pesdemux $HOME/OpenCaster3.1.4/tools
If successful, you should see a directory called 'pesdemux' with 2 files in it.
Step 2:
From the OpenCaster3.1.4/tools edits the 'MakeFile' file to add the subdirectory
'pesdemux' in the SUBDIRS variable with the following CMD:
– double-click on the file 'MakeFile'
– on the pop-up window click 'Display'
– add the word 'pesdemux' at this end of the SUBDIRS variable
– click 'Save'
Now we are ready to compile OpenCaster3.1.4. For that, we need to move to its
directory with the following CMD:
A successful sudo make install CMD should also report no error messages.
You can check that the programs have been installed in the following directory:
/usr/local/bin
Check you see the programs listed below. They are needed by our application:
esaudio2pes, esvideompeg2pes, pesaudio2ts, pesvideo2ts, tscbrmuxer, tstdt and
pesdemux.
This end the installation of the softwares needed to produce a live TS stream to feed
Digilite-ZL.
Software configuration
The configuration of the different modules will be done through a script file, which at time of
execution, will send a live TS to the Digilite-ZL module.
The block diagram below shows the interaction between the different modules.
Presently the solution has been tested with a clean installation of Ubuntu version 12.04 LTS,
v4l-utils version 0.8.6-1ubuntu2, FFmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1 and
OpenCaster3.1.4. If you use others softwares version and issues arise, you should revert to
the versions above.
The script file is made of different modules as illustrated in the above block diagram. We will
describe briefly each of the modules.
Please note that you should adjust the “X” of the video device according to the video device
you see for your USB Hauppauge card when you run the CMD: v4l2-ctl –list-devices.
If you went more details on ffmpeg, run the CMD: man ffmpeg
The CMD provided by Avalpa does the same but leaving the audio bitrate at 192 kbs:
pesdemux /dev/video1 /tmp/audio.es /tmp/video.es
If you went more details, please consult the Avalpa Broadcast Server Manual.
If you went more details, please consult the Avalpa Broadcast Server Manual.
Once you have done your changes, you need to run the script by double-clicking on the file
and confirm running the script by selecting “Run in Terminal”
On the /home/username/digilite-zl, now you should see the following additional TS files.
If you went more details, please consult the Avalpa Broadcast Server Manual.
Maybe for the first time you try this process, just run the script and leave the editing for the
next time...
The important parameter to truly control is the total bit-rate of the TS. Today the FPGA code
support a Symbol Rate of 4.000 MS/s with a FEC ½ this give a total available binary rate 3'686
kbit/s.
So the sum of all the different TS bit-rate should below the available bit-rate for the SR at
4.000/FEC ½.
This will depend mainly of the bit-rate attributed to the video and audio streams. The
difference to total bit-rate should be filled with the null.ts bit-rate. See the table below.
TS file kbit/s
video.ts 3'200'000 Finally, we insert the current date and time in the TS
with the CMD tstdt and send the TS throughout the
audio.ts 188'000
/dev/ttyUSB0 to the Digilite-ZL USB port.
pat.ts 4'000
prnt.ts 4'000
You will find a table summarizing the bit-rate available
sdt.ts 4'000 for a given SR and FEC on the F4DAY web site.
nit.ts 4'000
eit.ts 4'000
tdt.ts 4'000
null.ts 274'275
total 3'686'275
To run the script file, move to the directory /home/username/digilite-zl and type the CMD:
./sr4000-ffmpeg
If everything goes well as it should... you will see a terminal window like below:
Now, you can connect your DVB-S Satellite Tuner and see your first Digilite-ZL live
transmission!
1. Check the video device name for your Hauppauge card with the CMD:
v4l2-ctl --list-devices
This script will only configure the Hauppauge card for the video composite input.
Finally, run the CMD: ffplay /dev/video0 or ffplay /dev/video1 in a terminal window.
The window will show you the parameters configured for the card and in a second window
you will see the images of your camera as well as the sound.
HB9DUG Michel
[email protected]