I just wanted to share this tip. I'm just answering my own question.
If you select all and rename the images as "img(0001).jpg" you will end up having img(0001).jpg, img(2).jpg, img(3).jpg, ... img(11).jpg.... img(21).jpg
this messes the order up as the img(21).jpg will be placed after img(2).jpg.
(At least this happens for my ffmpeg code)
The solution is to name your files img(1001).jpg (i.e. start from 1000. that way, windows file explorer will name the other files as img(1001).jpg, img(1002).jpg, img(1003).jpg, img(1004).jpg
I'm just putting this out there for anyone to use. Feels like more people should be aware of this.
esdoublelef
** The solution is to name your files img(1001).jpg (i.e. start from 1000. that way, windows file explorer will name the other files as img(1001).jpg img(1002).jpg img(1003).jpg img(1004).jpg **