How to get FFMPEG to join non-sequential image files? (skip by 3s)
Besides the workaround in my comment, you should be able to use this syntax from the ffmpeg documentation:

ffmpeg -f image2 -pattern_type glob -i '*.png' out.avi


The quotes are important, you need ffmpeg to see the *, not have the shell expand it.