#!/bin/sh mencoder tv:// -tv driver=v4l2:input=1:norm=pal:width=720:height=576: \ device=/dev/video0:forceaudio:audiorate=32000:alsa:adevice=hw.0 buffersize=64 -ovc lavc \ -lavcopts vcodec=mpeg4:vbitrate=1300:keyint=30 -oac mp3lame -lameopts \ br=96:cbr:mode=3 -ffourcc divx -endpos 04:00:00 -o ~/Videos/tv-`date +%y%m%d_%H%M`-m.avi > /dev/null
This is a nice shell script I used to record television for later viewing. I recorded 11 hours 53 minutes of television in very good quality and the file was only 6.4 GiB. This has good A/V sync as well, you could record 24 hours of television and still have the sound and vision in sync. This script encodes the video in the lavc mpeg4 format and the audio in mp3 format. This is a great solution for recording television whilst you are out of the house.