How to write frames to a video file?
This might help get you started - the documentation is available, but newer features tend to be documented in ffmpeg's man pages.
The frames need to be numbered sequentially.
ffmpeg -f image2 -framerate 25 -i frame_%d.jpg -c:v libx264 -crf 22 video.mp4
-f
defines the format-framerate
defines the frame rate-i
defines the input file/s ...%d
specifies numbered files .. add 0's to specify padding, e.g.%05d
for zero-padded five-digit numbers.-vcodec
selects the video codec-crf
specifies a rate control method, used to define how the x264 stream is encodedvideo.mp4
is the output file
For more info, see the Slideshow guide.