Encode image sequence to MPEG4 video

Today something very simple: use ffmpeg to encode an image sequence as a MPEG4 video:

ffmpeg -f image2 -i filename-%04d.png -vcodec mpeg4 -b 6000k output.mp4

I often use blender or custom software to render out a bunch of images. Blender usually names output files filename-0000.png, where 0000 is the frame number.  So ffmpeg can generate those filenames with the usual printf style format. You can of course tweak ffmpeg's output via a myriad of options. But this here will simply generate a 25fps mpeg4 file, which is easily embedded for example into your Keynote presentation. On OS X you can get ffmpeg for example via MacPorts: sudo port install ffmpeg, and Linux distros usually have a package for ffmpeg as well.

No comments:

Post a Comment