Tim\'s picture      Blogging Ottinger (tim)

2007-January-15

My MEncoder Script

Filed under: Linux, Programming, Fun

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}”
	

Comments »

The URI to TrackBack this entry is: http://tottinge.blogsome.com/2007/01/15/my-mencoder-script/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome | Theme designs available here