DVB utilities

www.linuxtv.org provides a package called linuxtv-dvb-apps with some essential utilities. Download it, unpack it, enter the directory and run make. There is no install target. You may find it useful to copy the utilities you need to /usr/local/bin and the information for your local transmitter (or satellite or cable provider etc) to a more convenient location.

scan

The first thing you need is a list of channels to tune your card to, which you can generate with the scan utility. It needs to find the frequency to which to tune initially to find the channels, which is provided in one of the subdirectories. For example, to tune to the Rowridge transmitter on the Isle of Wight, serving Southern England:

cd /usr/src/linuxtv-dvb-apps-1.1.1/util/scan
./scan dvb-t/uk-Rowridge > ~/channels.conf 

For a list of options run it without any arguments. You can also copy the channels.conf into ~/.mplayer; recent versions of MPlayer can then play TV with the dvb:// URI, eg:

mplayer 'dvb://BBC ONE'

Similarly, Xine can interface directly with the card:

xine 'dvb://'

Then use its interface or the number keys to select channels.

Note that many channel names contain spaces and need to be quoted on the command line.

tzap

tzap - or one of its satellite and cable counterparts, czap and szap - can be used to tune the card to a channel and make its output available. All three are in the util/szap subdirectory of linuxtv-dvb-apps. As with scan, run it without any arguments for a syntax summary. The config file is a list of channels as generated with scan, and the -r option routes the output to a device node (default /dev/dvr/adapter0/dvr0) for cards with no inbuilt MPEG decoder. For example:

/usr/src/linuxtv-dvb-apps-1.1.1/util/szap/tzap -r -c ~/channels.conf 'BBC ONE'

You can record the transmission simply with:

cat /dev/dvr/adapter0/dvr0 > recording.ts

The .ts extension is quite arbitrary, but refers to the fact that the card's output is in MPEG Transport Stream format. .mpg files are more usually in Program Stream format.

MPlayer and Xine can play tzap's output:

mplayer - < /dev/dvb/adapter0/dvr0

or

xine stdin://mpeg2 < /dev/dvb/adapter0/dvr0