Ffmpeg image to video code example
Example 1: png sequence to mp4 ffmpeg
ffmpeg -r 60 -f image2 -s 1920x1080 -i pic%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4
-r is fps
-crf is quality, lower means better
-s is resolution
-pix_fmt is pixel format
Example 2: ffmpeg images to video
ffmpeg -r 30 -s 1920x1080 -i pic%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4