Talk:OnAir USB HDTV Creator

From LinuxTVWiki
Revision as of 20:19, 11 January 2009 by CityK (talk | contribs) (added the information, which is already described elsewhere in the wiki, from the main article to the talk page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Now, if you plan on viewing ATSC/QAM channels, you will need to scan for them. Full details on the following section are found here (Scan). The scanning program simply sets the frequency of the DTV tuner and then looks for signal. Because of the wide array of frequencies used in different countries, in order to scan you need a scan file that contains the frequencies used in your country. Common locations for these files are:

/usr/share/dvb/
/usr/share/doc/dvb-utils/examples/scan/
/usr/share/doc/dvb-apps/
/usr/local/share/dvb/scan/

On Ubuntu 8.10, the default scan files are contained in "/usr/share/doc/dvb-utils/examples/scan/dvb-t/". After you find the location of the files, browse through the subdirectories to find the scan file that applies to your location. In the case of US ATSC, the file is located in "/usr/share/doc/dvb-utils/examples/scan/atsc".

With the scan files, you are now ready to scan for stations. On Ubuntu 8.10, the DTV scanning program is called "scan," but it may be called "dvbscan" on other systems. To scan for US ATSC channels:

$ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB

Similarly, for QAM encrypted cable, you can use

$ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-Cable-Standard-center-frequencies-QAM256 

Now, we need to store the output from the scan file for use by other programs. If you wish to receive ATSC OTA stations, you would use the .azap directory:

$ mkdir ~/.azap
$ scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB > ~/.azap/channels.conf

For countries that used dvb-c, dvb-s, or dvb-t, refer to Scan for more information. While scan is running, you will see output on your screen similar to the following:

scanning /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
>>> tune to: 57028615:8VSB
WARNING: >>> tuning failed!!!
>>> tune to: 57028615:8VSB (tuning failed)

...

>>> tune to: 485028615:8VSB
service is running. Channel number: 9:1. Name: 'KUSA-HD'
service is running. Channel number: 9:2. Name: 'WX-Plus'
>>> tune to: 491028615:8VSB
service is running. Channel number: 7:1. Name: 'KMGH-HD'
service is running. Channel number: 7:27. Name: 'KZCO-SD'
>>> tune to: 497028615:8VSB
WARNING: filter timeout pid 0x0000
WARNING: filter timeout pid 0x1ffb

Clearly, stations that work are prefixed by "service is running." Stations that have poor reception or have other technical difficulties often time-out.

For me, my channels.conf file looks like this:

KUSA-HD:485028615:8VSB:49:52:1
WX-Plus:485028615:8VSB:65:68:2
KMGH-HD:491028615:8VSB:49:52:3
KZCO-SD:491028615:8VSB:65:68:4

...

KCEC-DT:695028615:8VSB:49:52:3

The text at the beginning is a user-defined string (with no spaces) that will be used to identify the station later. If you have gotten this far, your tuner is working properly.

Now, the LinuxTV Wiki suggests using a program called zap to test your tuner (see Zap). For ATSC, we use azap. If I wished to tune KUSA-HD from the above list, I open a shell and type:

$ azap -r 'KUSA-HD'

For which I receive

using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 485028615 Hz
video pid 0x0031, audio pid 0x0034
status 00 | signal 0000 | snr 0000 | ber 00000000 | unc 00000000 | 
status 1f | signal a791 | snr 16e8 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b54e | snr 18c9 | ber 00000000 | unc 0000003d | FE_HAS_LOCK
status 1f | signal bbee | snr 19b1 | ber 00000000 | unc 00000000 | FE_HAS_LOCK

Full documentation on the meaning of these columns is found on the LinuxTV Wiki, Zap. The important columns are the status column (00 means the tuner is initialized, but nothing has been decoded, 1f means tuning is working) and the last column (FE_HAS_LOCK means everything is working). Sadly, I was not able to get any of the suggested testing methods to work (see Testing_your_DVB_device), but I did find that xine works with ATSC stations.

To watch DTV, install xine (on Ubuntu, sudo apt-get install xine-ui) run it to create the configuration directory, and then copy the channels.conf file over to the .xine directory:

$ cp ~/.azap/channels.conf ~/.xine/

Now, launch xine and click on the DTV button. Using the playlist, you can change between stations.