Question
Matthew Carpenter
matt
Thu May 5 10:23:34 PDT 2005
Actually, for video tapes I've used both mencoder and transcode.
mencoder is used by Freevo, which was my PVR for a long time. They
included the command line in the config file so it was simple to lift.
I found the CPU, Hard Drive, and Capture card all make a difference.
This machine is a 2.4GHz-P4, the HD's have DMA and 32bit access enabled
through hdparm, and the capture card is a simple bt878 (ATI TV Wonder VE).
This is the resulting script I use. It uses alsa mixer settings in
/etc/mixersettings to set up the audio for capture. It should work even
without those settings, it just won't adjust your audio capture volumes.
It also uses xvid instead of divx. YMMV.
tv2xvid.sh
---------------------------------------
#!/bin/bash
if [ .$3 == . ] ; then
echo "Syntax: $0 <channel> <minutes> <filename>"
echo " Channel "c" or "C" is the Composite Input"
exit 1
fi
CHANNEL=$1
SECONDS=`expr $2 \* 60 `
FILENAME=$3
if [ $CHANNEL == c ] || [ $CHANNEL == C ]; then
INPUT=1
else
INPUT=0
fi
echo "###########################$SECONDS Seconds"
/usr/sbin/alsactl -f /etc/mixersettings restore
COMMAND="/usr/bin/mencoder \
-tv on:driver=v4l\
:input=$INPUT\
:norm=NTSC\
:channel=${CHANNEL}\
:chanlist=us-bcast\
:width=320:height=240\
:outfmt=yv12\
:device=/dev/video0\
:adevice=/dev/dsp\
:audiorate=32000\
:forceaudio:forcechan=1:\
buffersize=64\
-ovc lavc -lavcopts\
vcodec=mpeg4\
:vbitrate=1200:\
keyint=30\
-oac mp3lame -lameopts\
br=128:cbr:mode=3\
-ffourcc divx\
-endpos ${SECONDS}\
-o ${FILENAME}.avi "
$COMMAND
-----------------------------------------------
More information about the Linux-users
mailing list