[plug] TV Tuner Card: Leadtek?

Brad Campbell brad at wasp.net.au
Wed Nov 19 11:08:03 WST 2003


Craig Ringer wrote:
>> Easy as that..
>> To watch live
>> dvbstream -o -ps vpid apid | mplayer -
> 
> 
> Or, presumably,
> 
> dvbstream -o -ps vpid apid | tee /tmp/stream.mpg | mplayer -
> 
> :-)
> 

Yes, but....
I found sometimes mplayer can "catch up" with the incoming stream and it
then aborts, terminating your recording mid program..
It's a horrid way to do it but this is my record and watch at the same
time script..

#!/bin/sh
SZAP=/home/brad/dvb/DVB/apps/szap/szap
DVB=/home/brad/dvb/dvbstream/dvbstream
CHANFILE=/root/chan.new
SIZE=`stty size`
ROWS=`echo $SIZE | cut -f1 -d" "`
COLS=`echo $SIZE | cut -f2 -d" "`
let R1=$ROWS-8
echo $ROWS $COLS $R1

let count=0
TMP1=""
for i in `cat $CHANFILE | cut -f1 -d: | sed 's/\ /_/g;s/^/"/;s/$/"/'` ;

         do TMP1="$TMP1 $i $count";
         let count++ ;
done

#echo $TMP1
CHAN=`dialog --stdout --menu "Sat Channel Menu" $ROWS $COLS $R1 $TMP1`
reset
CHAN2=`echo $CHAN | sed 's/_/ /g;s/"//g'`
#echo $CHAN2
TMP1=`cat $CHANFILE | grep "$CHAN2"`
#echo $TMP1
$SZAP -x "$CHAN2"
VID=`echo $TMP1 | cut -f6 -d:`
AID=`echo $TMP1 | cut -f7 -d:`
#echo $VID $AID
aumix -L
FILE=`echo $CHAN | sed 's/"//g'`
FILE=$FILE-`date +%d%m%y-%H%M`.mpg
$DVB -o -ps $VID $AID |  replex -t MPEG2 -i PS -k > /raid/tmp/$FILE &
sleep 10
if [ -z "$DISPLAY" ] ; then
mplayer -vo fbdev -vop scale=1024:768,pp=0x20000 -framedrop -ao oss
/raid/tmp/$FILE
else
mplayer -vo xv -vop pp=0x20000 -framedrop -ao oss /raid/tmp/$FILE
fi
killall dvbstream

Note the 10 second delay to allow plenty of breathing room. Still over a
9 hour recording session mplayer will still catch up..
I now run a recording script and then run mplayer interactively if I'm
going to do a long record.

Brad

_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list