DigiTV channel hunting

[ <- main ]

DigiTV channel hunting

[ basics | software | pid scanning | trying it out ]

This document shortly describes one way I discovered for hunting for channels on digitv.

Contact information is available on the main page.

Basics

First off, in Finland we have three channel packages. They run on 562, 658 and 674 MHz respectively.

Each channel package contains a number of TV and radio channels and various other multimedia stuff. I will concentrate on the TV channels here.

NOTE: All stuff presented here are based on my empiric studies and various documentation.

I am using vdr for recording and thus I have a file called channels.conf. It looks like this:

TV1:562000:I0C23D12M64B8T8G8Y0:T:3:512+128:650,651:2321:0:17:0:0:0
TV2:562000:I0C23D12M64B8T8G8Y0:T:3:513+129:660,661:2321:0:33:0:0:0
MTV3:658000:I0C23D12M64B8T8G8Y0:T:3:305+128:561:817:0:49:0:0:0
Nelonen:674000:I0C23D12M64B8T8G8Y0:T:3:512+128:650:576:0:65:0:0:0

The important numbers while hunting from those lines are (you can find more info in the vdr(5) manpage):
ChannelFrequencyVPID + PCR PIDAPID,DolbyPIDs..Teletext PIDServiceID
TV1562000512+128650,651232117
TV2562000512+129650,651232133
MTV3658000305+12856181749
Nelonen674000512+12865057665

In the channel packages, a lot of different information belong to each channel. They are identified by PIDs. So, there is a VPID for the Video, an APID for the audio, etc.. I don't know what PCR is and I didn't see any traffic on it.. I guess I might find out later.. :) I didn't take the time to try out the dolby audio stuff either, nor do I have the equipment to verify proper operation..

Anyway, so what we've got is a bunch of PIDs (can easily amount up to 10 times the amount of channels in a package), and those are the ones we're going to hunt down!

Software

For tuning to a certain frequency I used dvbtune and to snoop the traffic I used dvbsnoop. I ran the tests with 1.2.02. It seems that 1.2.53 is substantially upgraded and does most of the hard work. It doesn't feel that much like hacking anymore :)

PID Scanning

First we need to tune to a channel. We do that by running

./dvbtune -f 562000

The last line it prints out should read something like:

FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC

If it doesn't, try re-running the command. Maybe you've got the wrong frequency or bad reception?

Next we'll scan for pids:

src/dvbsnoop -s pidscan

Now, among all the other stuff, for TV1 & TV2 I can see these relevant lines:

PID found:  128 (0x0080)  
PID found:  129 (0x0081)  
PID found:  512 (0x0200)  [PES: ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream]
PID found:  513 (0x0201)  [PES: ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream]
PID found:  650 (0x028a)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]
PID found:  660 (0x0294)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]
PID found: 2321 (0x0911)  [PES: private_stream_1]

The first two are thus the PCR PIDs for TV1, TV2, the next two the video streams, and the two next the normal audio streams and the last one teletext (TV1 and TV2 share the same teletext).

The mentioned 651, 661 "dolby" streams obviously didn't send anything at this time. However, there were some potentially interesting cases that might have something to do with dolby after all:

PID found:  652 (0x028c)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]
PID found:  653 (0x028d)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]
PID found:  662 (0x0296)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]
PID found:  663 (0x0297)  [PES: ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream]

These seem conveniently grouped close to 650, 660. Well..

Trying it out

To try out all the new stuff you find, just copypaste some old working entry you have, rename it and change the values to something you found. And finally a note about the Service ID I mentioned. I have no idea what it's supposed to be and where to get the information from, but vdr complains if there are two entries (in the same channel package most probably) with the same Service ID. I just picked a random number close to the others and it seemed to work :)