0

I have a series of 15 PNG Files - https://www.sendspace.com/file/jrpbl1.

I would like to create an MP4 Video of them using FFMPEG.
In my video I'd like to have 15 Frames (One per image) where each is played 1 Sec (FPS 1).

I downloaded the latest FFMPEG for Windows (Version 3.2.4).
I followed the guide FFMPEG - Slideshow.

The command line I used is ffmpeg -framerate 1 -i NR_1_%05d.png -c:v libx264 -crf 15 -pix_fmt yuv420p out.mp4.
I also tried ffmpeg -r 1 -i NR_1_%05d.png -c:v libx264 -crf 15 -pix_fmt yuv420p out.mp4 (What's the difference between -r 1 and -framerate 1?).

Yet the resulted video is not as expected.
The first frame is black and then there is only one image as constant (I watch it on VLC Media Player).

Any idea how to product it correctly on Windows?

Thank You.

1

VLC has a problem with playing low framerate videos. Use

ffmpeg -framerate 1 -i NR_1_%05d.png -r 10 -c:v libx264 -crf 15 -pix_fmt yuv420p out.mp4.

The images will still turnover at 1 Hz but there will be 9 duplicates frames per second. x264 is efficient at coding duplicate frames so size won't increase 10 fold.

  • It is crucial for me that the output video has exactly 15 Frames (Each image as a frame). I don't really need VLC Compatibility. What's the difference between using -r and -framerate? – Royi Mar 17 '17 at 11:19
  • framerate sets an internal variable in the stream struct that ffmpeg creates. r generates new timestamps at that rate. The former is referred to by filters and muxers. For image sequences, there's no practical difference, but the former is the recommended method. Check your first command with ffplay. It should be fine. – Gyan Mar 17 '17 at 11:30
  • So basically this is a VLC Player issue. I still didn't get the difference between them. Is there an example which shows the difference? Thank You. – Royi Mar 17 '17 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.