View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: DVB search (using azap)
PostPosted: Mon Mar 27, 2006 5:23 pm 
Offline
Joined: Tue Nov 01, 2005 1:50 pm
Posts: 7
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]


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 10 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu