I am creating a short video from a sequence of 100 images using ffmpeg. There are several articles that helped me put together a command, but the one I'm using is directly taken from ffmpeg images-to-video script anyone?.
The following command produces a video file that plays well in all video players I have (OS X).
cat input/*.jpg | ffmpeg -f image2pipe -r 10 -vcodec mjpeg -i - out.mp4
But if I change it to,
cat input/*.jpg | ffmpeg -f image2pipe -r 1 -vcodec mjpeg -i - out.mp4
It plays well in all but VLC media player. VLC displays the initial 1 to 3 images, then just freezes on the frame. I've tested a few different frame rates, and it seems the cutoff that breaks the video playback in VLC lies somewhere between 1.125 and 1.175.
Any advice on what I'm dealing with here would be much appreciated.
-r
with a value that is supported by your players. ffmpeg will then duplicate frames to match the requested output frame rate. – llogan