I have a dilemma..
I've had a script for a while now that downloads pictures from a webcam every few minutes.
The naming convention just does
new_image((len(files(dir))+1) + '.jpg') and that's all fine.. until today..
I've had a Python script that loads the images based on creation date and renders them and i take the OpenGL data and dump it into a movie, which isn't hard and it's all ok.. Except now i have a few thousand images and it's quite ineffective to go on about it this way (even tho it's cool because i can build my own GUI and overlay etc).. anyway, i'm using ffmpeg to combine the images into a slideshow, like so:
ffmpeg -f image2 -r 25 -pattern_type glob -i '*.jpg' -qscale 3 -s 1920x1080 -c:v wmv1 video.wmv
The ffmpeg works fine, except that
-pattern_type glob takes the images in naming order which doesn't work because the way the files get fed is similar if not the same as
ls, which looks like:
user@host:/storage/photos$ ls 0.jpg 1362.jpg 1724.jpg 2086.jpg 2448.jpg 280.jpg 3171.jpg 3533.jpg 3896.jpg 4257.jpg 4619.jpg 4981.jpg 5342.jpg 5704.jpg 6066.jpg 650.jpg 1000.jpg 1363.jpg 1725.jpg 2087.jpg 2449.jpg 2810.jpg 3172.jpg 3534.jpg 3897.jpg 4258.jpg 461.jpg 4982.jpg 5343.jpg 5705.jpg 6067.jpg 651.jpg
0, 1000, 1, 2000, 2... this is the logic of
ls so the image sequence (timelapse) will be all f-ed up..
Any ideas on how to use ffmpeg to load the images in a more sorted manner?