How to stream a TV channel with an USB tuner on Debian based system

Mickaël GREGORI
Sep 8, 2018 · 3 min read

Use dvb-apps and DVBlast to stream a DVB-T service on your local network

Recently, I tried to stream a TV channel on my local network for a personal project.

I’ve purchased an Avermedia AverTV Volar HD 2 TV tuner.

I’ve plugged it to a Raspberry PI 3 running with Raspian (based on Debian).

To know if your TV tuner is correctly installed you can use the command dmesg :

$ dmesg
[ 3.945362] usb 1–1.2: dvb_usb_v2: found a ‘Avermedia AverTV Volar HD 2 (TD110)’ in cold state
[ 3.954654] usb 1–1.2: dvb_usb_v2: downloading firmware from file ‘dvb-usb-it9135–02.fw’
[ 4.053037] dvb_usb_af9035 1–1.2:1.0: firmware version=3.40.1.0
[ 4.053092] usb 1–1.2: dvb_usb_v2: found a ‘Avermedia AverTV Volar HD 2 (TD110)’ in warm state
...
[ 4.109525] usb 1–1.2: dvb_usb_v2: ‘Avermedia AverTV Volar HD 2 (TD110)’ successfully initialized and connected
[ 4.111688] usbcore: registered new interface driver dvb_usb_af9035

Now your TV adapter is setup you’ve to launch a scan to get the list of the DVB-T channels available.

First install the dvb-apps package :

$ apt-get install -y dvb-apps

The directory /usr/share/dvb/dvb-legacy/dvb-t contains configuration files to use for scans.
There should have a file for your country / region.

For France, the file to use is /usr/share/dvb/dvb-legacy/dvb-t/fr-All.
For UK, there is many files.

Once you’ve found your configuration file you can launch the scan with the command scan :

$ cd /usr/share/dvb/
$ scan dvb-legacy/dvb-t/fr-All | tee ~/channels.conf

The list of channels is written into the file ~/channels.conf :

CANAL+:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:110:0:769
CANAL+ CINEMA:482000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:210:0:770
...
France 5:546000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:420:0:1045
...

Now I need DVBlast to stream a TV service. I’ve choose to install DVBlast from sources.

  1. Install git
$ apt-get install -y git

2. Download and install bitStream:

$ cd /usr/src
$ git clone git://git.videolan.org/bitstream.git
$ cd bitstream
$ make && make install

3. Download and install DVBlast :

$ cd /usr/src
$ git clone git://git.videolan.org/dvblast.git
$ cd dvblast
$ make && make install

Now you have DVBlast installed, you can tried to stream a TV service.

For example, if I want to stream the service France 5 I have to know Its frequency and Its service ID 1045. Thanks to the channel list I’ve got with the previous scan I know that the frequency is 546000000 and the service ID 1045 then :

  1. I create the file ~/france_5.conf
239.255.0.1:1234  1 1045

This file contains the destination : multicast address + port. 1 means “always on” and the last element is the service ID.

2. I launch dvblast with the configuration file :

dvblast -f 546000000 -m qam_64 -G 32 -X 8 -C -e -U -q -c ~/france_5.conf

You can look at the help to tune the configuration.

Do not forget to check the multicast settings of your network switch :)

Enjoy !!!

Mickaël GREGORI
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade