FFMPEG convert sequences of images into videos
2013-05-04
First of all, naming specification for this sequence of image, normally there are two ways, one is with leading zeros, one is without.
- Case 1: 1, 2, 3, 4...11, 12, 13, ....100, 111, 112... => %d
- Case 2: 001, 002, 003, 004, .... 011, 012, 013... 100, ... => %3d
To convert the images without losing quality, there are two options:
ffmpeg -i frame%04d.png -vcodec huffyuv test.avi ffmpeg -i frame%04d.png -vcodec ffv1 -sameq test.avi
To control the framerate
ffmpeg -r 25 -i frame%04d.png -vcodec huffyuv test.avi
Some other alternatives are (not completely lossless, but still get good result):
ffmpeg -i frame%04d.png -sameq test.avi (the new version of ffmpeg removed the -sameq option, instead you may need to do -qscale 0) ffmpeg -i frame%04d.png -vcodec mjpeg -sameq test.avi
References:
http://stackoverflow.com/questions/4839303/convert-image-sequence-to-lossless-movie