FFMPEG / MEncoder Timelapse video. Need MP4 + H.264

posted in Encoding

(Im under Ubuntu 11.04, however, i think these apps works the same for windows)
With MEncoder i have an issue, with FFMPEG i have another issue. With none of both apps i can create a high quality MP4 encoded with H.264.

I use this command to get a timelapse video made from thousands of frames (photographs):

mencoder “mf://*.jpg” -nosound -lavfopts format=mp4 -ovc x264 -x264encopts pass=1:bitrate=8000:crf=20 -o lights.mp4 -mf type=jpg:fps=30

Works great, except that the output file is actually an AVI, no matter the extension. I guess the "-lavfopts format=mp4” part isn’t working, though im not really sure what is it for. I bet there is another way to tell MEncoder to output a MP4 file.

Result: http://vimeo.com/29444058 nice quality, but this is an AVI container.

I use this command:
ffmpeg -r 30 -i img%04d.jpg -vcodec libx264 -preset slower -crf 22 -threads 0 -r 30 limado2.mp4

It actually outputs a MP4 video file, with H.264. But somehow the video dynamic range goes from 14,14,14 to 235,235,235. Instead of 0,0,0 and 255,255,255. The result is a greyish video.

Result: http://vimeo.com/29443952 Greyish...

Any idea on these two issues?
Thanks in advance.

This will output a true mp4 container with H.264, just as Vimeo suggests.

mencoder “mf://*.jpg” -nosound -of lavf -lavfopts format=mp4 -ovc x264 -x264encopts pass=1:bitrate=2000:crf=24 -o lights.mp4 -mf type=jpg:fps=30

Now I only would like to know why FFMPEG outputs a shortened dynamic range picture when using H.264. reply

It doesn’t work for me. I get “bash: mf://*.jpgâ: File o directory non esistente” from my ubuntu 19.04 terminal with italian language


Post Your Answer

Your reply
Your name

or log in

By submitting this form you agree to our posting rules,
privacy policy and our disclaimer.