How to convert a sequence of images to a video with different number of digits in the names?
Under Linux I use such command:

ffmpeg -f image2 -pattern_type glob -framerate 30 -i *.jpg output.mp4


Of course you should add encoder options etc. Or you can add leading 0's (zeros) to filenames, eg.: a000123.jpg instead of a123.jpg. Then -i a%06d.jpg should work.