Miscellaneous

Here, I put some random stuff that you might find useful... or not (this is more likely :)

Encoding a video from multiple images with MEncoder

2011, June 16th

Here is the command line for encoding a video from multiple images with MEncoder under Linux:

rm -f divx2pass.log
mencoder mf://*.png -mf type=png:fps=15 -ovc lavc -lavcopts vcodec=msmpeg4v2:vpass=1:vbitrate=8000000:mbd=2 -nosound -o /dev/null
mencoder mf://*.png -mf type=png:fps=15 -ovc lavc -lavcopts vcodec=msmpeg4v2:vpass=2:vbitrate=8000000:mbd=2 -nosound -o video.avi

The video codec msmpegv4 is definitely not the best one but it ensures to get a video directly readable under Windows and consequently inside PowerPoint (and when you have to present something in public, it is always annoying to see that your video won't run in front of your audience :). Other type of images than PNG may be used such as JPEG. Apparently, with MEncoder, the AVI container is the best one (i.e. the one which is the most prone to be compliant with common video players).

Sources:
AVS/Express movies generation by Mario Valle
Encoding with the libavcodec codec family (chapter 7 of the MEncoder documentation)