Mencoder time lapse - by date?

Red Squirrel

No Lifer
May 24, 2003
70,164
13,569
126
www.anyf.ca
Is there a way to make a time lapse using mencoder and make it use date order of files? This is the command I currently use, which is from various googling etc.

Code:
mencoder "mf://*.JPG" -mf fps=15:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vbitrate=14000 -vf scale=2464:1632  -o movie.mp4

problem is, when my camera hits the max filename, ext 9999 it resets to 0. That throws off the time lapse. Is there a way to do it by date/time stamp instead of file?

I'm guessing it's some kind of argument, but can't seem to find anything.
 

Red Squirrel

No Lifer
May 24, 2003
70,164
13,569
126
www.anyf.ca
Think I figured it out. There's an option to process a file list, so I just used "ls" to output the files in a text file in right order.

Code:
ls -tr -1 *.JPG > filelist.txt

mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -vf scale=4928:3264 -mf type=jpeg:fps=15 mf://@filelist.txt -o movie.mp4