Movies
From Admin-SIG
Creating movies with ffmpeg
The ffmpeg package seems to be the base of many packages involving the transcoding of video formats under LINUX. It has also been ported to windows, and is used for some OSS projects on that platform.
My primary purpose was to find a way to stitch a bunch of image files together into an animation. I had many problems with ffmpeg. It claims to be able to work from a sequence of png files (among others). I have only been able to get it to work from gif, which is the only image input format listed under the -format directive.
I have also had trouble with both ImageMagick convert, and ffmpeg cropping to set the frames to a happy modulo 16 resolution. I recommend generating your input sequence in a modulo 16 frame size in gif. If you cannot generate frames in gif, use ImageMagick's convert program to convert to gif.
I am still learning various flags and directives to control ffmpeg. Here are some examples which I was able to display using a fairly standard MS Windows MediaPlayer on a circa 2005 installation of Windows XP (Professional?)
It looks like standard .mpg wants only standard frame rates, so this was not good for my animations, which I wanted to display at or below 10Hz.
ffmpeg -i Twinkle%03d.gif t.mpg
This is, however, a good example of the simplest, minimalist way to convert a set of animation frames into a video file format.
Reasonable (but not great) compression quality, at below acceptable compression rates (IMOHO) were obtained with the commands:
ffmpeg -r 10 -i Twinkle%03d.gif -vcodec msmpeg4 -vtag MP43 -r 10 t.avi
ffmpeg -r 10 -i Twinkle%03d.gif -vcodec msmpeg4v2 -r 10 t.avi
Perhaps some other flags could improve compression (both quality and rate for me). I wish I could find other Windows Media Player (PowerPoint) compatible codecs. Perhaps one with some sort of run-length encoding like PNG. (But one that works. MS RLE seems to mess things up for me pretty bad)
Bitrate can be controled with the -b flag:
ffmpeg -r 10 -i Twinkle%03d.gif -vcodec msmpeg4 -vtag MP43 -r 10 -b 100 t.avi
The default target bitrate is 200 kbps, but 100 is fine for my plot animations. There are other flags to control bitrate tolerance, max, and min, but I haven't used them yet.

