#!/usr/bin/env python import os import glob files = sorted(glob.glob("/path/to/files/img*.bmp")) outdir = "./Order" if not os.path.exists(outdir): os.makedirs(outdir) for i, f in enumerate(files): os.symlink(f, os.path.join(outdir, "%03d.bmp" % (i + 1)))
And then:
ffmpeg -r 5 -intra -qscale 1 -i %03d.bmp out4.mp4
Might do the trick for you.
The python script puts the file in order.You will need a wildcard (*) to replace the variable part of the file name.
Then the ffmpeg command grabs the ordered files and makes a video out of it.
I'm think I grabbed this code from somewhere a few years ago, so credit to whoever was the author. If you know who he/she is paste a link in the comments and I'll update the answer.