Shihui Guo

FFMPEG convert sequences of images into videos

First of all, naming specification for this sequence of image, normally there are two ways, one is with leading zeros, one is without.

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