Monday, February 9, 2009

How to create a movie from images using ffmpeg

Actually this is already addressed in ffmpeg FAQ. I just put here so that it's easier to find by Google. :) Official wording used by ffmpeg is "How do I encode single pictures into movies?" To do this is very simple. You need "-f image2" flag before the input file flag "-i". For the input file, you have to follow ffmpeg way of input file naming. Don't use system wildcard, e.g. "*.jpg." It will give you error.

So in my case what I have to do is

ffmpeg -f image2 -i Scene%04d.tiff test.mov

Reference: http://ffmpeg.mplayerhq.hu/faq.html#SEC14

Why do I need to do this? Well... I have been trying to find the way to make movie using Java. Unfortunately, you can't do multi-platform encoding... They just don't have multi-platform encoder for some reason...