Compressing video from Canon SX30IS using ffmpeg

I record anywhere between 1 GB - 4 GB of video every weekend on my Canon SX30IS. I have been doing this for quite a few years now. I also have this annoying habit of keeping all of those files around.

Until the death of my previous beloved camera in Canon’s wonderful Powershot IS series, all I had to contend were a bunch of AVI files. Trusty VirtualDub was fine with those files. So, I would just set it in batch processing mode and it would go through the most recent clips, and compress them. I could then copy the originals to a 2TB Western Digital Elements external hard drive, and free up a ton of space on my laptop drive (which first grew from 80 GB to 120 GB to its current 400 GB over the years, but I am forever running out of space.)

When I got the SX30IS, I was annoyed about the fact that I would now have to figure out a way to compress the MOV files it recorded.

It turned out ffmpeg had no problem with them. Here is the batch file I use:

ffmpeg -i %1 -vtag XVID -b:v 1500k -acodec libmp3lame -ac 1 -b:a 56k -ar 22050 %~n1.avi

As you can see, I really don’t care much about the sound quality, and I only keep these clips on my laptop so I am always ready to show friends and family either in the U.S. or in Turkey whenever the opportunity arises but I am not worried about the occasional compression artifact.

It’s nice when I can compress a 100 MB clip to about 10 MB. I can then realistically share these files even with Turks who’re on capped and throttled connections.

Once you put that line in a batch file, you can invoke it for every MOV file in a directory by entering:

for %f in (*.mov) do compress-mov2avi %f

on the command prompt.