#!/bin/bash
filelist=
to=
show()
{
echo "Usage:$0 [-o] [dir] files"
}
while getopts o: options
do
case $options in
o) to=$OPTARG;;
\?) show
exit 1;;
esac
done
shift $((OPTIND-1))
if [ "$#" -eq 0 ]
then
show
exit 1
fi
for from in "$@"
do
if [ -z $to ]
then
tofile="[mz]${from%.*}.avi"
elif [ -d $to ]
then
tofile="$to/[mz]${from%.*}.avi"
else
echo ""$to" is not a Dir"
show
exit 1
fi
cat <<EOF
-------------------------------------------------------
Start Convert
$from
to
$tofile
-------------------------------------------------------
EOF
mencoder -noodml "$from" -o "$tofile" -mc 0 -ofps 18.000 \
-vf-add crop=0:0:-1:-1 -vf-add scale=320:-3 -vf-add \
expand=320:240:-1:-1:1 -vf-add rotate=1 -srate 44100 \
-ovc xvid -xvidencopts bitrate=384 -oac mp3lame \
-lameopts vbr=0 -lameopts br=128 -lameopts vol=0 \
-lameopts mode=0 -lameopts aq=7 -lameopts padding=3 \
-af volnorm -xvidencopts max_bframes=0:nogmc:noqpel 2>/dev/null
cat <<EOF
-------------------------------------------------------
$from
Convert to
$tofile
-------------------------------------------------------
EOF
echo
done
下午写的,终于可以在linux下转片子咯
|