#!/bin/sh if [ $1 ]; then # set station v4lctl setstation $1 # set mixers amixer sset Aux,0 60%,60% unmute,cap amixer sset Capture,0 50%,50% # start mencoder. Apply crop to reduce possible noise/black around the # edges mencoder -tv driver=v4l:width=640:height=480:adevice=/dev/dsp:forceaudio:forcechan=1 \ -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1400:vhq:vqmax=31 \ -oac mp3lame -lameopts cbr:br=64 \ -vf crop=624:464:8:12,pp=lb -o $3 \ -endpos $2 tv:// else echo usage: $0 channel duration filename fi