I now have a crude PVR strung together with xawtv, vlc and kcron.  The script 
is:

#!/bin/bash -m
name=$1
channel=$2
durration=$3
date=$(date +"%Y_%m_%d")
cd /home/willhill/movies
cat general_playlist.m3u | sed s/program_name/$name-$date/g > 
this_playlist.m3u
rm /home/willhill/.xawtv
ln -s /home/willhill/.xawtv_config/xawtv-$channel /home/willhill/.xawtv
xawtv &
vlc this_playlist.m3u &
sleep $durration\m
killall vlc
killall xawtv
rm /home/willhill/.xawtv
ln -s /home/willhill/.xawtv_config/xawtv-all /home/willhill/.xawtv

I call it at showtime, using cron.  I had to use xawtv because vlc does not 
work my ATI wonder card's tuner and I use vlc because xawtv's capture does 
not work for me and I don't know the ffmpeg or other straight forward way to 
capture streams.  So xawtv sets the tuner and vlc captures the movie.  

I'd rather use a better card that came with a computer I bought recently but 
could not figure it out.

http://68.225.99.100:1024/photo_album/chron/2008/2008_02_08_mini_pc/

The "general_playlist.m3u" looks like this:

#EXTM3U
#EXTVLCOPT:v4l-vdev=/dev/video0
#EXTVLCOPT:v4l-adev=/dev/dsp1
#EXTVLCOPT:v4l-norm=1
#EXTVLCOPT:v4l-frequency=-1
#EXTVLCOPT:v4l-caching=300
#EXTVLCOPT:v4l-chroma=
#EXTVLCOPT:v4l-fps=-1.000000
#EXTVLCOPT:v4l-samplerate=44100
#EXTVLCOPT:v4l-channel=0
#EXTVLCOPT:v4l-tuner=-1
#EXTVLCOPT:v4l-audio=-1
#EXTVLCOPT:v4l-stereo
#EXTVLCOPT:v4l-width=640
#EXTVLCOPT:v4l-height=480
#EXTVLCOPT:v4l-brightness=-1
#EXTVLCOPT:v4l-colour=-1
#EXTVLCOPT:v4l-hue=-1
#EXTVLCOPT:v4l-contrast=-1
#EXTVLCOPT:no-v4l-mjpeg
#EXTVLCOPT:v4l-decimation=1
#EXTVLCOPT:v4l-quality=100
#EXTVLCOPT:sout=#transcode{vcodec=mp1v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst=/home/willhill/movies/program_name.mpeg}}
v4l://

I made vlc work once and saved the playlist.  640x480 resolution is just 
watchable quality from the ATI Wonder (bt878).  

The xawtv config files are just the same as the "all" file but only has the 
channel I want to record in it.  

String it all together and you get a kludge.  I'm sure there are better ways 
of doing this but I think it's going to work for me.  

  



_______________________________________________
General mailing list
[email protected]
http://mail.brlug.net/mailman/listinfo/general_brlug.net

Reply via email to