Friday, 23 September 2011

Changing video container format to AVI

My camera records .m4v video files, these are one of the formats that blender does not appear to support well, I use the following command for mencoder to put the video in an avi container.

mencoder -ovc copy -oac mp3lame -of avi -fps 19 -ofps 19 INFILE -o OUTFILE

It can be scripted over multiple files with a for loop:
for i in *.m4v; do video.prepare $i $i.avi ; done

Where video.prepare is the script:

#!/bin/bash
mencoder -ovc copy -oac mp3lame -of avi -fps 19 -ofps 19 $2 -o $1

No comments:

Post a Comment