LinHES Forums http://forum.linhes.org/ |
|
DVB search (using azap) http://forum.linhes.org/viewtopic.php?f=15&t=9316 |
Page 1 of 1 |
Author: | simorjay [ Mon Mar 27, 2006 5:23 pm ] |
Post subject: | DVB search (using azap) |
I wanted to contribute to the group. NOTE THAT ALL provided here is a fork of DVB search can be found at mythtv.org http://www.mythtv.org/wiki/index.php?title=DVB_search&oldid=10016 With knoppmyth however his listing will not work unless you do some serious config to your mplayer.... I gave up and tried another route. The following requires that azap works.... so if Code: azap -a 0 -f 0 -d 0 -c channels.conf 1 -r does not work this script will probably not be of any use to you.. NOTE you need to make your channels.conf file first!. (read on how to get the channel file) How to get your DVB listing. First scan using ./dvbcscan atsc/us-Cable-Standard-center-frequencies-QAM256 > outfile Note that this is US Cable!.... more files can be found in this sub. results: [0006]:657000000:QAM_256:74:75:6 [000c]:657000000:QAM_256:0:80:12 [0001]:657000000:QAM_256:76:77:1 [0005]:663000000:QAM_256:0:65:5 [0006]:663000000:QAM_256:0:77:6 you need to mod the filenames with a script (same script as the DVB search list) updatelist.sh Code: #!/bin/sh COUNT=1 for ln in `cat channels.conf ` do CHAN=`echo "$ln" | awk -F "]" {'print $2'}` echo "$COUNT$CHAN" >>channels.conf.new COUNT=`echo "$COUNT + 1" | bc` done This will update the channel list to provide a unique list. then run this to scan your channels. The output will be in a file called scan.log make sure to make a dir called found. Also ensure that the result file channels.conf.new is located in the same dir. Code: #!/bin/sh for ch in `cat channels.conf.new |awk -F ":" {'print $1'}` do DATE=`date` NEWFILE="$ch.jpg" echo "$DATE | $ch start scan.." >> scan.log echo "Selecting channel $ch" azap -a 0 -f 0 -d 0 -c channels.conf.new $ch -r & echo "wait to stabalize" for y in 1 2 3 4 5 do sleep 1 echo "Stabalizing $y" done mplayer -vo jpeg:quality=95 -frames 2 -ao nosound /dev/dvb/adapter0/dvr0 & for y in 1 2 3 4 5 do sleep 1 echo "Stabalizing $y" done RETURN=`ps aux |grep mplayer |grep -v grep |awk {'print $2'}|wc -l` if [[ $RETURN -eq "1" ]] then kill `ps aux |grep mplayer |grep -v grep |awk {'print $2'}` echo "Killed mplayer" fi sleep 2 RETURN=`ps aux |grep azap |grep -v grep |awk {'print $2'}|wc -l` while [[ $RETURN -eq "1" ]] do echo "Azap still alive" kill `ps aux |grep azap |grep -v grep |awk {'print $2'}` sleep 3 RETURN=`ps aux |grep azap |grep -v grep |awk {'print $2'}|wc -l` done DATE=`date` echo "$DATE | $ch end scan.." if [ -r 00000001.jpg ] then echo "$DATE Found channel $ch" echo "$DATE |Found channel $ch" >> scan.log mv 00000001.jpg "found/$NEWFILE" else echo "$DATE |Nothing on $ch" >> scan.log fi echo "Stabalizing for 5" sleep 5 echo "ready to start a new channel" done Results will consist of a file called scan.log and jpg's in found. Next importing the data ...... Any questions/comments. [/code] |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |