FFmpeg losslessly converts all PNGs in a directory into a single lossless AVI video file by:
ffmpeg -framerate 5 -pattern_type glob -i '*.png' -c:v ffv1 out.avi
- show 5 PNG image frames per second.
-pattern_type glob -i '*.png'
- collect all .png files in this directory
- use the lossless FFV1 codec
If you have problems playing back the .avi file, try omitting the
-c:v ffv1 parameter.
Don’t go below a framerate of about 3 frames/second because some viewers won’t work (e.g. VLC).
FFmpeg file globbing does NOT work on Windows, even with FFMPEG 4.x. The error on Windows is like:
Pattern type ‘glob’ was selected but globbing is not supported by this libavformat build
Windows FFmpeg users, consider using Windows Subsystem for Linux for file globbing with FFmpeg.