Linux TV stuff for Freeview from Crystal Palace

If you use Linux TV applications and receive your Freeview (DVB-T) signal from the main London transmitter, you might find these files useful:

Modifying the scan utility from dvb-apps to output Freeview channel numbers

The dvb-apps utilities are very useful, and the scan utility is the one I use to scan for new stations on the multiplexes.
Most applications seem to use the zap output format, which doesn't contain the Freeview channel number (e.g. BBC FOUR is channel 9).
At least one application (vlc) can take the channels file as an input, and then its playlist is the list of channels. In this playlist the channels appear in the order they appear in the channels file, so it would be great if the channels were in Freeview channel number. But scan can't do that. Well, a quick patch and it can! Saves me the hassle of sorting the channels file by hand.

Getting the source

You can either download a tarball from or use Mercurial to make a copy of the upstream repository:
hg clone


You need to apply my scan patch. Then rebuild scan (I just run PERL5LIB=. make in the util/scan subdirectory).


With the patched version of scan, when using the -u switch with the (default) zap output format each station's name is preceded with the Freeview channel number and a hyphen. So rather than the output looking like:
it will now look like:
You probably don't want the stations to be named like this in the channels file, so what I do is run:
scan -u /usr/..../uk-CrystalPalace | sort -n | sed -e 's/^[0-9]*-//'
and now I have a channel list sorted by Freeview channel number.

Last updated: 27-October-2020