My MEncoder Script
I offer this both as a source of public ridicule, er… i mean feedback, and also as an aid to those GP2x users who are even as clueless about video as I am/was. Enjoy:
SOURCE=\"$1\"
DESTINATION=\"$2\"
help() {
echo \"$0 [|]”
echo “Copies a .mov file to a gp2x-compatible .avi file”
echo “If destinationfile is not give, the name will match the .mov input file, but ”
echo “end in .avi”
}
if [ -z “${SOURCE}” ]; then
help
echo “No SOURCE filename was given.”
exit 1
fi
if [ ! -f “${SOURCE}” ]; then
help
echo “Source file ‘${SOURCE}’ does not exist or is not a regular file”
exit 2
fi
basename=$(basename “$SOURCE” .mov)
if [ -d “${DESTINATION}” ]; then
DESTINATION=”${DESTINATION}/${basename}.avi”
fi
if [ -z ${DESTINATION} ] ; then
DESTINATION=”${DESTINATION}/${basename}.avi”
fi
echo “$SOURCE -> $DESTINATION”
/usr/bin/mencoder “${SOURCE}” -of avi -oac mp3lame -ovc xvid -xvidencopts pass=1 -o “${DESTINATION}”


