Specifications
if [ ! −z $3 ]; then
$V4LCTL setchannel $3
fi
# Check for vcr dir
if [ ! −x $OUTPUT ]; then
mkdir $OUTPUT
fi
DATE=`date +%m−%d−%Y−%H:%M`
# Set the AC97 volume to 0 (so we don't hear the sounds)
# Get mixer values first
PLAY_VOL=`$AMIXER −c 0 cget name='Master Playback Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`
CAP_VOL=`$AMIXER −c 0 cget name='PCM Playback Volume' | grep : | sed 's/^.*=\([^,]*\).*$/\1/'`
#
$AMIXER −c 0 −q cset name='CD Playback Volume' 100
$AMIXER −c 0 −q cset name='Capture Volume' 1
# if tvtime.xml is set, then grab settings out of it
if [ −f $TVTIME ]; then
CONTRAST=`cat ${TVTIME} | grep DefaultContrast | sed 's/^.*value="\([^"]*\).*$/\1/'`
BRIGHTNESS=`cat ${TVTIME} | grep DefaultBrightness | sed 's/^.*value="\([^"]*\).*$/\1/'`
COLOR=`cat ${TVTIME} | grep DefaultColour | sed 's/^.*value="\([^"]*\).*$/\1/'`
HUE=`cat ${TVTIME} | grep DefaultHue | sed 's/^.*value="\([^"]*\).*$/\1/'`
$V4LCTL bright ${BRIGHTNESS}% color ${COLOR}% contrast ${CONTRAST}% hue ${HUE}%
fi
$STREAMER −p 4 −q −t ${TIME} −r 24 −q −o ${OUTPUT}/${PREFIX}−${DATE}−${TIME}.avi −j 90 −f mjpeg −F mono16
# Sometimes streamer doesn't always re−mute audio, mute it again just to be sure
$V4LCTL volume mute on
# Restore volumes
$AMIXER −q cset name='Master Playback Volume' $PLAY_VOL
$AMIXER −q cset name='PCM Playback Volume' $CAP_VOL
#
# EOF
The BTTV HOWTO
D. Recording Video and Sound with Bttv 41