Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> Installation/Setup -> HOWTO: Find Channels
Post new topic  This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic 
HOWTO: Find Channels
PostPosted: Sat Sep 23, 2006 5:01 pm Reply with quote
shepmaster
 
Joined: 25 Aug 2006
Posts: 8




Here's a little guide to how I discovered what channels I have available on my local cable. I know that a quick little howto would have been useful when I was setting up my card, and hopefully someone else can benefit.

Preconditions:
    A *working* hardware setup.
    linuxtv-dvb-apps (1.1.1.2006091)
    dvb-atsc-tools (1.0.4)
    dvbsnoop (0.5)
    dvbstream (0.5)

You can tell if your hardware is working by checking if you have entries in /dev/dvb/. Another good sign is messages like this in your dmesg:
Code:
CORE cx88[0]: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47,autodetected]

I started by using dtvscan to scan through all my channels:
Code:
./dtvscan -q -c 90:120 -o scanned-channels

Based off each of the results in the scanned-channels file, I used dtvsignal to get the frequency of each good channel:
Code:
./dtvsignal -q 90
tuning to 621000000 Hz

I then created a file channels.conf, with the following format:
Code:
NAME:Frequency in Hz:Encoding:Video PID:Audio PID:Program Number
KDKA-DT:687000000:QAM_256:2048:2049:1

Of course, you probably dont know most of that information, so you can put in dummy values for the name, video and audio PIDs, and program:
Code:
NEW:687000000:QAM_256:1:1:1

Then, use azap to tune your card to that channel:
Code:
azap -c channels.conf NEW

You can tell a channel is good if azap has output similar to:
Code:
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
tuning to 645000000 Hz
video pid 0x0980, audio pid 0x0001
status 00 | signal 0000 | snr 0000 | ber 00000000 | unc 0000ffff |
status 1f | signal 0000 | snr fe2a | ber 00000000 | unc 0000ffff | FE_HAS_LOCK

You will need to leave that running in one window, and do the next part in a new one. Use dvbsnoop to see which audio and video PIDs have data:
Code:
 dvbsnoop -s pidscan
---------------------------------------------------------
Transponder PID-Scan...
---------------------------------------------------------
PID found:    0 (0x0000)  [SECTION: Program Association Table (PAT)]
PID found:  144 (0x0090)  [SECTION: Program Map Table (PMT)]
PID found:  145 (0x0091)  [PES: ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream]
PID found:  146 (0x0092)  [SECTION: Network Information Table (NIT) - actual network]
PID found:  147 (0x0093)  [PES: private_stream_1]
PID found:  160 (0x00a0)  [SECTION: Program Map Table (PMT)]
PID found:  161 (0x00a1)  [PES: ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream]
PID found:  162 (0x00a2)  [SECTION: Network Information Table (NIT) - actual network]
PID found:  163 (0x00a3)  [PES: private_stream_1]
PID found:  176 (0x00b0)  [SECTION: Program Map Table (PMT)]
PID found:  177 (0x00b1)  [PES: ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream]
PID found:  178 (0x00b2)  [SECTION: Network Information Table (NIT) - actual network]
PID found:  179 (0x00b3)  [PES: private_stream_1]
PID found: 8191 (0x1fff)

Each of the above video streams is a channel, and the private stream after it is audio for that channel. To test out your channel, you can use dvbstream:
Code:
dvbstream 177 179 -o > /tmp/test.ps

You can then (in yet another window) use MPlayer to see what channel you are currently tuned to:
Code:
mplayer /tmp/test.ps

Go back to where you are editing channels.conf, and update the name, video and Audio PIDs for the channel. Note that the above example had 3 sets of video and audio. That means there are 3 separate channels actually being shown on the single DVB channel. You can a single frequecy listed multiple times in your channels.conf, so long as you have different PIDs for each one.
View user's profile Send private message
Watching Script
PostPosted: Sat Sep 23, 2006 5:38 pm Reply with quote
shepmaster
 
Joined: 25 Aug 2006
Posts: 8




To watch your tuner simply, you can use this script:

Code:
CHANNELINFO=`fgrep -m 1 $1 .azap/channels.conf`
PIDS=`echo $CHANNELINFO | awk --field-separator ':' '{print $4" "$5}'`
azap $1 > /dev/null &
sleep 1
dvbstream $PIDS -o | mplayer -cache 8192 -
killall azap


copy that into a file (I called mine watch.sh)

and run
Code:
chmod +x watch.sh


You can then watch a channel by running
Code:
./watch CHANNELNAME


Note that this presupposes you put your completed channels.conf file into the ~/.azap/ directory.
View user's profile Send private message
PostPosted: Sat Sep 23, 2006 7:02 pm Reply with quote
xyzzy
 
Joined: 12 Feb 2006
Posts: 225




Or you could put a copy of your channels.conf in ~/.mplayer, and just use mplayer dvb://CHANNELNAME
View user's profile Send private message
PostPosted: Sat Sep 23, 2006 7:16 pm Reply with quote
shepmaster
 
Joined: 25 Aug 2006
Posts: 8




xyzzy wrote:
Or you could put a copy of your channels.conf in ~/.mplayer, and just use mplayer dvb://CHANNELNAME


Even better. Smile I knew there had to be a way, I just hadn't poked hard enough at MPlayer yet.
View user's profile Send private message
HOWTO: Find Channels
  pcHDTV Forum Index -> Installation/Setup
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  This topic is locked: you cannot edit posts or make replies.  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin