Navigation
Recent comments
- what kind of story.........
13 weeks 3 days ago - usb
13 weeks 3 days ago - good one sir
23 weeks 2 days ago - yes
33 weeks 3 days ago - "Northrop," not "Northrup"
33 weeks 4 days ago - Wallace Stevens
43 weeks 14 hours ago - General information about corruption at my school
49 weeks 5 days ago - terrific.
1 year 3 days ago - that is ridiculous.
1 year 3 days ago - I had to analyze this poem
1 year 4 days ago
Search
User login
Who's online
There are currently 0 users and 3 guests online.

Good starting point
It does work for me, but I expanded it a little to have a bit more sophisticated script.
This allows for a -s (small) flag to avoid the upscaling of 160*120 movies (sometimes I set my camera to that mode -- what a shame), allows specifying multiple movies, and renames files ending with .AVI to .flv (it lacks some error checking, though).
#!/bin/sh
sflag=
while getopts s: name
do
case $name in
s) sflag=1;;
?) printf "Usage: %s: [-s] [avifile 2] ...\n" $0
exit 2;;
esac
done
if [ ! -z "$sflag" ]; then
printf "Small file option specified\n"
SCALE="scale=-2:120"
shift 1
else
SCALE="scale=-2:240"
fi
for i in $@
do
INFILE=$i
OUTFILE=`echo $INFILE| sed 's/\.[aA][vV][iI]$/.flv/'`
echo doing conversion: "$INFILE -> $OUTFILE"
mencoder -forceidx -of lavf -oac mp3lame \
-lameopts abr:br=56 -srate 22050 -ovc lavc \
-lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 \
-vf $SCALE -o $OUTFILE $INFILE 2>&1 | tee -a /tmp/`basename $0`.log | grep '[0-9]%)'
done