Wednesday, April 13, 2011

Encode/Scale video with MEncoder

The only thing I don't like about my old Canon S3 IS camera is that it records video without compression. Meaning that 4min 640x480/30fps vid is about 512MB...
I spend some time playing with MEncoder ("...a free command line video decoding, encoding and filtering tool released under the GNU General Public License" and a really *great* tool) and found a way to encode (or scale) my videos from Linux command line:

Encode from Canon RAW (acceptable quality):
$ mencoder INPUT.mpeg -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1800:mbd=2:trell=yes:v4mv=yes -o output.avi
Scale video:
$ mencoder INPUT.mpeg -vf scale=320:240 -oac copy -ovc lavc -lavcopts vcodec=mpeg4 -o OUTPUT.mpeg


No comments:

Post a Comment