Most experts or experienced users will likely find that this information conveys sufficient details in so far as how to manipulate a specific DVB hardware device with dvbscan. 'New users', however, are probably left scratching their heads by some of the options listed in the output -- but fear not!

One thing that is noteworthy from the output above is that dvbscan does not take file system device names; instead, it cobbles them together from the adaptor, frontend and demux numbers. If you only have one tuner, you don't need to worry about this detail.

The initial scan file

In order for dvbscan to search for channels that you can receive, you must provide the name of an initial scan frequency file in the dvbscan command line. The initial scan frequency file provides a frequency that dvbscan uses as a starting point from which to proceed with its scan. These initial scan frequency files are specific to your geographic location. Initial scan information files for many localities are supplied with the LinuxTV dvb-apps package. The exact location where these files are installed may vary. In the following examples, the directory is /usr/share/doc/dvb-utils/examples/scan/dvb-t/; other installations may use /usr/share/doc/dvb-apps, /usr/local/share/dvb/scan/dvb-t/, /usr/share/dvb/dvb-t/au-Adelaide, ...

In each case, the file you're looking for is contained in the folder for the type of DVB device you're using. DVB-T users, for example, should find a initial scan file from /usr/share/doc/dvb-utils/examples/scan/dvb-t/... or, depending on the installation of the package, in /usr/share/doc/dvb-apps or /usr/local/share/dvb/scan/dvb-t/...
Second, the name of the file you're looking for is of the form cc-Ttttt, where cc is a two-letter country abbreviation, and Ttttt is the name of the location of the transmitter. So in Adelaide, Australia, you'd look for a file called au-Adelaide (/usr/local/share/dvb/zap/dvb-t/au-Adelaide); in Oxford, UK you would use uk-Oxford (/usr/share/dvb/dvb-t/uk-Oxford).

No suitable initial scan file?

If you can't find a suitable initial scan file and you're using DVB-T or DVB-C, then you can use w_scan (in German; English translation via Google) to generate one or to generate a channels.conf file. If you choose to create an initial scan file (and you know the name of your local transmitter or cable provider):

Obviously, you will have to adopt this command for your own situation/locality. In any regard, dvbscan will try to find programs on frequencies it takes from the initial scan file (e.g. uk-Oxford etc or whatever your place is).

2. During the scan
After initiating the dvbscan command, a lot of output data will be produced in the shell. The first thing that dvbscan does is parse the information form the initial scan file and reports with what hardware device that this information is going to be utilized. For example:

Next dvbscan commences a search through all the frequencies listed in an initial scan file. This process can take some time to complete.
During this phase, the utility will output its progress in the shell.

The information presented will provides details on the channels being detected during the scan. Often many lines of transponder information are reported. Here are some examples:

Do not be alarmed by such tuning failed messages, as this is not fatal. It simply means that no signal was found on that particular frequency -- it's possible that the initial scan files contain information about stations that are not yet, or no longer, in service, or it may imply that you presently lack a strong enough signal for reception to occur.

3. After the scan completes
Eventually, upon completion of its search, dvbscan outputs a list of services that it found.

Note: The actual number of available services it finds will, of course, depend upon several factors (the number of services available in your area and those related to signal strength). Check dvbscan's output with a list of known services available for your area. If you are missing some services, then try to troubleshoot your antenna and/or cable configuration. Hopefully you will be able to improve the environment for signal reception. If you are unable to obtain a particular service, then you may just be out of range or subject to inhospitable environmental conditions that your hardware just cannot overcome to achieve reception. If zero services where found, perhaps check your antenna and/or cable lead ... maybe it's simply a case that its not plugged in at all ;-)

which says that the channel BBC ONE is found on frequency 578000000 Hz, and has has the two PIDs 600 and 601 for the video and audio stream.

This is a "colon-separated" file. It consists of a number of fields delimited by colons. Here's the meaning of the three lines shown above:

channels.conf format

Field

First programme

Second programme

Third programme

Programme name

ABC HDTV

ABC DiG Jazz

TEN Digital

Frequency (Hz)

226500000

226500000

219500000

Inversion mode

INVERSION_AUTO

INVERSION_AUTO

INVERSION_AUTO

Symbol rate

BANDWIDTH_7_MHZ

BANDWIDTH_7_MHZ

BANDWIDTH_7_MHZ

FEC name, HP

FEC_3_4

FEC_3_4

FEC_3_4

FEC name, LP

FEC_3_4

FEC_3_4

FEC_1_2

Constellation

QAM_64

QAM_64

QAM_64

Transmission mode

TRANSMISSION_MODE_8K

TRANSMISSION_MODE_8K

TRANSMISSION_MODE_8K

Guard interval

GUARD_INTERVAL_1_16

GUARD_INTERVAL_1_16

GUARD_INTERVAL_1_16

Hierarchy information

HIERARCHY_NONE

HIERARCHY_NONE

HIERARCHY_NONE

Video pid

2314

0

512

Audio pid

0

2318

650

Service ID

592

599

1617

These fields vary depending on the type of modulation; the ones shown are for QFDM (and, paradoxically, not for QAM). For other forms of modulation, the meanings of the fields differ. See the source code (and document it, please!) at util/scan/dump-zap.c.

Looking at the values, it's clear that ABC DiG Jazz is a radio programme, since it doesn't have a video pid. Less clear is why ABC HDTV does not have an audio pid. This is a real issue: this means that when tuning to these streams, no audio is output. We'll look at how to solve this problem below.

The frequencies shown here are in Hz. They correspond to 226.5 MHz for ABC and 219.5 MHz for TEN. Note that the first two programmes are the same frequency, so they come in the same MPEG stream. They're distinguished by the pids.

Notes:

If a channel has a video PID of 0 and and audio PID is not 0, then it's probably a radio channel.

if dvbscan detected a channel but the signal was too weak for reliable reception, the video and audio PIDs (third and second last number in the output line) will likely be shown as 0

Creating a channels.conf file

Next create a "channels.conf" file. This file takes the data for your available TV-channels, as shown above, and stores it for tuning use by simple "zapper" programs, such as tzap, or for higher level applications like MPlayer or Xine.

Each of the "zapper" utilities will, by default, expect to find the channels.conf file in the specific hidden (dotted) directory off your "home" directory. For example, for DVB-C tuning with czap, you would set up a ~/.czap directory. Likewise, for use with szap, you would make a ~/.szap directory, and so forth. Here are some examples of how to automagically create the channels.conf file by directing the stdout from the dvbscan command to be placed in a file in a given directory:

one step scan and channels.conf creation (i.e if you were paying attention, don't need to run dvbscan twice as was like performed above)

~/.{a,c,s,t}zap directories for the channels.conf is just the default location. Each of the zapper utilities can use any other location for channels.conf provided you specify its location ... (i.e. ~/. is really just a ease of use) ... see the zap articles for more usage detail

the dvb-apps package contains a number of files that are essentially channels.conf files for given localities. These will probably be installed on you system. For example, /usr/local/share/dvb/zap/dvb-t/au-Adelaide is a canned version of the output of dvbscan. It may be out of date, so it's better to generate it from dvbscan, but if you can't get dvbscan to work, you might get further by using this file.

A word about dvbscan and audio streams

scan does not always seem to correctly recognize audio streams for a television channel.

Example, in Australia, most channels broadcast HDTV with AC3 audio, which scan does not recognize when invoked as above. The result is the output shown above for ABC HDTV: no audio.

This is almost certainly a bug in scan. Until it is fixed, you can proceed in the following way:

This output was limited to the interesting information. The last two lines show the output for ABC HDTV and ABC TV Adelaide. ABC TV Adelaide has a video pid 0x200, an audio pid 0x28a, and an AC3 pid 0x294. The meanings of the other values still need to be documented.

By contrast, ABC HDTV has a video pid 0x90a, and AC3 pid 0x90b--and no audio pid. This is the problem. In the output from scan based on the transmitter data, the corresponding values are (leaving out the middle of the lines, which aren't of interest here):

ABC HDTV: ... :2314:0:592
ABC TV Adelaide: ... :512:650:593

As described above, the third-last value is the video pid, and the second-last value is the audio pid. In this output they're in decimal, while in the output of dvbscan -c they're in hexadecimal; but they correspond.

To work around the lack of audio pid in ABC HDTV, convert the value of the AC3 pid (0x90b) to decimal (2315) and edit the channels.conf file: