Convert MOD Movies with VLC on Your Mac

Posted on in Software

My wife uses a Canon FS100 for taking home videos of the kids. If you aren't familiar with it, it's a fairly light-weight camcorder that uses SDHC cards rather than tapes. The only real grievance I have with it is that the video codec it uses is not compatible with Quicktime, iPhoto, or iTunes. I wrote the following Bash script to convert my MOD files to MPEG4.

#!/bin/bash

VCODEC="mp4v"
BITRATE="768"
ACODEC="mp4a"
ARATE="96"
EXT="mp4"
MUX="mp4"
VLC="/opt/local/bin/vlc"
DST="/Users/slap/videos/output/"

for i in /Users/slap/videos/input/*.MOD; do
    FILE=`basename ${i} MOD`;
    ${VLC} -I dummy -v ${i} --sout="#transcode{vcodec=${VCODEC},vb=${BITRATE},acodec=${ACODEC},ab=${ARATE},channels=2,fps=25,samplerate=44100}:std{access=file,mux=${MUX},dst=\"${DST}${FILE}${EXT}\"}" vlc://quit;
done

Your mileage will vary here, and I highly suggest checking out the VLC wiki page on converting video for the iPod for more insight.

Slaptijack's Koding Kraken