I generate png figures using python and then use mencoder to make a movie. I used the commend I searched online. It does generate a movie for me. But it's strange that it uses the first figure multiple times during the entire movie. That is not what I want. I'm not sure why. The code is below:
os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10.0 -ovc vcodec=wmv2 -oac copy -o " + filename + ".mpg")
I have not tested this, but I suspect that mencoder is sorting your frames by their filename, as strings. That is, the sort order will start like this:
(In the comments you say that your filenames actually look like
_tmp100.png,_tmp200.png, etc., but the extra trailing zeros should make no difference.)Obviously, this will cause every tenth frame in your final video to be misordered.
If this is the problem, zero-padding the frame numbers in your file names to a fixed length should fix it.