Frequency scan

From LinuxTVWiki
Jump to navigation Jump to search

In order to be able receive a particular signal a TV tuner, the device needs to know the the correct radio frequency and modulation parameters used by that source transmission. Therefore, you (or, at least, the viewing application you are using) will first want to know which frequencies are used for transmission and, thereby, may be tunable by your receiver at your residing location.

Note: Historically, the set of frequencies used under the older analogue systems have differed from one another, meaning that the particular frequencies used across North America, Europe, Asia, etc., etc., will differ depending upon the transmission standard adopted within each nation. When countries began to make the transition to digital TV systems, most have opted to continue to use their old channel frequency schemes so as to make the switch from analog to digital systems as seamless as possible for the end user.

Frequency Scanning Utilities

Frequency scanning utilities, listed below, perform signal detection and, generally, provide a list of the frequencies upon which content is discovered, with which higher level applications can then in turn use for tuning purposes.

Analog

Digital

On Digital TV, the scanning process consists on tuning into some physical channel/transponder frequencies and parsing the MPEG Transport Stream, in order to identify the services and the corresponding audio, video, teletext and data streams. The service is also known Virtual Channel.

There are two types of scanning applications: the ones that rely on frequency channel files and the ones that tries hard to identify the existing channels, based on the knowledge of the Country.

Scan apps based on a channel file

Those applications are faster to identify the channels, but they are unable to find any channel outside the channel table.

For them to work, an initial file is needed. Those files are provided at dtv-scan-tables repository, using dvbv5 file format.

Most common applications used for channel scan:

Scan apps that don't require an initial channel file

Scan applications that don't need a channel file have internally a table that allows them to construct internally a table with possible frequencies and tuning parameters to seek. As the number of possible channels/tuning parameters are a way higher than the ones defined on a channel table, the scanning process will take several minutes (up to an hour, if the card doesn't support autodetection for some DVB properties).

Applications using this approach:

Comparison of DVB frequency scanning commandline utilities

Note: The differences between scan and dvbscan should be added to this wiki article. The information for dvbscan is still to be completed - please help.

The following table lists the main features of several of the popularly used command line scanners. For specific information on a particular utility's usage, have a look at its specific wiki article.

feature \ scanner scan dvbscan w_scan scan-s2 dvbv5-scan
download (upstream version) linuxtv.org/hg/dvb-apps linuxtv.org/hg/dvb-apps wirbel.htpc-forum.de/w_scan/index.html mercurial.intuxication.org/hg/scan-s2 git.linuxtv.org/v4l-utils.git
last stable linuxtv-dvb-apps-1.1.1 linuxtv-dvb-apps-1.1.1 none / use latest version ? v4l-utils-1.4.0
comments linuxtv.org unmaintained
DVB-S2 and DVB-T2 support missing
linuxtv.org unmaintained
DVB-S2 and DVB-T2 support missing
linuxtv.org maintained
DVB API needs DVB API version 3.2 or higher DVB API version 3.2 or higher DVB API version 3.2 or higher
compiling needs DVB API version 5.0 or higher
DVB API version 5.0 or higher
last update 02/2009
DVB API version 3.2 or higher
supported DTV types DVB-S, DVB-C (Annex A only - mainly Europe), DVB-T, ATSC (VSB and QAM) DVB-S, DVB-C (Annex A only - mainly Europe), DVB-T, ATSC (VSB and QAM) DVB-S, DVB-S2, DVB-C (Annex A only - mainly Europe), DVB-T, DVB/T2, ATSC (VSB and QAM), DMB-TH (China) DVB-S, DVB-S2, DVB-C (Annex A only - mainly Europe), DVB-T, ATSC (VSB and QAM) DVB-S, DVB-S2, DVB-C (Annex A and C - worldwide), DVB-T, DVB-T2, ATSC (VSB and QAM), ISDB-T and more
initial scan file required
(matching to your satellite or local aerial/cable network)
yes yes not required yes
NOTE: slightly different file format from scan because of additional DVB-S2 support.
yes (uses libdvbv5 file format by default, but dvb-apps and s2-scan file formats are accepted too)
can generate initial scan file no no yes no no
can generate channels.conf for zap/xine/mplayer/vlc yes (default) yes (default) yes yes yes
can generate channels.conf for VDR yes, but hopeless outdated (vdr-1.3 only) yes, but hopeless outdated (vdr-1.3 only) yes (default) yes (default) yes (after version 1.4.0)
can generate channels.dvb for kaffeine no no yes no no

Digital TV Scan Technical Information

There are two types of TV channel scanning tool: the ones that relies on a separate per-country/per-city channel file, and the ones that do deep scan.

This section describes how deep channel scan works.

Terrestrial TV Scan

For terrestrial standards, the channel frequency parameters are regulated, per Country. Channels usually use a bandwidth of 5MHz, 6MHz, 7MHz or 8MHz (although DVB-T2 also permits 1.7 MHz and 10 MHz). They're also usually spaced with the same bandwidth. This is also true for DVB-C Annex B, used in US.

In Europe, most Countries use 6MHz for VHF channels and 8MHz for UHF channels. On US, Brazil, Mexico, Canada, Japan, South Korea, 6MHz is used for all channels.

So, all a deep channel scan tool needs to know, for each frequency range, is:

  • The frequency of the first channel;
  • The frequency of the last channel;
  • The bandwidth of each channel;
Note: If the digital TV standard is DVB-T2, it could be having multiple transport streams on a single physical channel, using multiple Physical Layer Pipes (M-PLP). On such case, the deep scan tool would also need to seek for a range of PLP parameters that are stored at DVBv5 DTV_STREAM_ID property. See https://en.wikipedia.org/wiki/DVB-T2#Technical_details for more reference

So, for example, Kaffeine's "Auto normal" deep scan, used on most western European Countries, has two ranges:

Range Initial frequency Final frequency Channel bandwidth
VHF 177500000 Hz 226500000 Hz 7000000 Hz
UHF 474000000 Hz 858000000 Hz 8000000 Hz

And "Auto Australia" deep scan, used in Australia, has a different UHF range:

Range Initial frequency Final frequency Channel bandwidth
VHF 177500000 Hz 226500000 Hz 7000000 Hz
UHF 529500000 Hz 816500000 Hz 7000000 Hz

Cable TV Scan

All cable and satellite standards, except for DVB-C Annex B and ISDB-S, use a variable channel bandwidth, with is indirectly adjusted from the symbol rate. The bandwidth is given by:

   bandwidth = symbol_rate / rolloff factor

Where the rolloff depends on the filter parameters of the demod. It is standardized, though:

TV Standard Rolloff factor Notes
DVB-S, DVB-S turbo and ISDB-S 1.35
DVB-S2 it can be selected between 1.20, 1.25 and 1.35
DVB-C Annex A 1.15 used by most countries
DVB-C Annex C 1.13 used mainly in Japan

Most cable TV providers keep spacing the channels using a multiple of 6MHz, 7MHz or 8MHz, with usually matches the terrestrial TV channel frequency table.

However, the symbol rate is not standardized. So, a scanning tool should set a symbol rate, in bauds, with is actually used to setup the bandpass filters. If the symbol rate doesn't approximately match, the decoder won't detect the channel. Also, while you could hint a symbol rate based on the channel space, This is not standard: each cable operator can use whatever they want.

So, for example, if the channel spacing is 8MHz, a DVB-C Annex A channel may use up to 6956.5 KBauds

   8 MHz / 1.15 =  6956.5 KBauds

Most cable companies, in practice, rounds it to 6900 kBauds. However, the cable operator can opt to use a smaller value, like 6875 kBauds in order to add some guard between channels, or use the right value (6956.5 kBauds).

So, a deep scanning tool has a list of the most common symbol rates it uses to test. It starts scanning with the most likely one (e. g. symbol_rate / rolloff). If it doesn't find anything, it tries other valid symbol rates for the channel bandwidth.

Currently, the dtv-scan-tables dvb-c channel tables use the following symbol rates:

Number of occurrences Symbol rate DVB-C Annex A bandwidth DVB-C Annex C bandwidth
712 6900000 bauds 7.9 MHz 7.8 MHz
250 6875000 bauds 7.9 MHz 7.8 MHz
12 6950000 bauds 8 MHz 7.9 MHz
6 7000000 bauds 8.1 MHz 7.9 MHz
6 3450000 bauds 4.0 MHz 3.9 MHz
5 6111000 bauds 7 MHz 6.9 MHz
2 6428000 bauds 7.4 MHz 7.3 MHz
1 6952000 bauds 8 MHz 7.9 MHz
1 5217000 bauds 6MHz 5.9 MHz
1 5000000 bauds 5.8 MHz 5.7 MHz

The good news, is that, usually getting just one channel is enough to get the full channels for cable, as the NIT tables typically contains the full range of channels there.

Satellite Scan

Satellite scan is even harder than cable TV, as the transponder frequencies are not standardized. Also, it should check both vertical and horizontal polarization.

A deep satellite scan should use the frequency range from the LNBf and tries several symbol rates, assuming some transponder spacing.

Note: If the digital TV standard is DVB-S2, it could have Multiple Input Streams (MIS) inside a physical channel, just like DVB-T2 M-PLP. On such case, the deep scan tool would also need to seek for the ID for the MPEG-TS streams. Those should be passed to the Kernel via DVBv5 DTV_STREAM_ID property. See https://work-microwave.com/introduction-dvb-s2-multistream/ and https://en.wikipedia.org/wiki/DVB-T2#Technical_details for more details.

The good news, is that, usually getting just one channel is enough to get the full channels for cable, as the NIT tables typically contains the full range of channels there. Yet, on several satellites, in order to get all transponders, the scan program need to check for the other NIT tables.

External Links

Analog

Digital For some other general sources (which may or may not be that useful) for finding local channel frequency lists, see: