Converting MJPEG from our Canon SD630 to DIVX
Wednesday June 14th 2006, 2:34 pm
Filed under: Linux, Video

We love the new camera, the 630 was the right choice for us. We are carrying it just about everywhere and have some amazing pics and video of our daughter. One the issue with the camera is that it captures video in MJPEG (yuck!), which leads to huge file sizes. I did some searching and cobbled up this script to do the conversion for me. It requires mencoder, but who doesn’t have that installed on their Linux box?

Anyways, here is the script:

#!/bin/sh
#
# Set the bitrate
BITRATE=1800
#
# Remove the log if it’s there
#
if [ -e divx2pass.log ]; then
rm -f divx2pass.log
fi

#
# Loop through the mencoder process twice for dual pass
#
for i in 1 2; do
/usr/bin/mencoder $1 -oac mp3lame -lameopts preset=medium -af-adv force=1 \
-mc 0 -channels 1 -srate 11025 -ovc lavc -lavcopts \
vcodec=mpeg4:autoaspect:vbitrate=${BITRATE}:vpass=${i} -o MPEG4-${1}
done

#
# Cleanup
#
rm -f divx2pass.log



No Comments so far



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>

(required)

(required)