I use mencoder which is part of the mplayer package. Here's a simple script I use to record shows:
Code: Select all
root@node-2: pts/1: 7 files 99Mb | cat recordtv.sh
#/bin/sh
z=$(($1*60))
nice -n -19 mencoder tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0:input=2:norm=ntsc:alsa:amode=1 -of avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=2500 -oac mp3lame -lameopts vbr=0:cbr=128:aq=6:mode=0 -o $2-`date +%d-%m-%y`.avi -endpos $z
Then I call it from my crontab like this:
The first variable is length of recording in minutes, second is show name which is automatically appended with the date and .avi.
If you have questions about the syntax check out the man/info pages for mencoder.
Oh, it's worth noting the above code works with mplayer 1.0pre1/2; don't think it's the same for older versions...
~J0rus