Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to encode several BMPs\JPEG into a movie file using:

ffmpeg -f image2 -i a%d.jpg output.mpg      

The thing is that I want the frame rate of the movie to be 10, and it seems to be 25 (as a default I guess). How can I tell it what framerate to use?

I am using Windows 7, 64-bit (DELL).

share|improve this question
up vote 1 down vote accepted

Please read the FFmpeg documentation. The framerate is specified with -r.

As an example for image-to-video conversion, they mention:

Use ffmpeg for creating a video from the images in the file sequence ‘img-001.jpeg’, ‘img-002.jpeg’, ..., assuming an input frame rate of 10 frames per second:

ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv

Note that normally, the usage of -f image2 isn't necessary. Also, the default settings used to convert to .mpg files may result in low quality. If you can afford it, try using x264 and MP4 container instead:

ffmpeg -i a%d.jpg -r 10 -c:v libx264 -preset slow -crf 21 output.mp4

Vary the -crf parameter for quality, where less means better quality and more means worse quality. Sane values could be anything from 18 to 26, with the default set at 23.

share|improve this answer
Perhaps the documentation should be made more clear since by default images will have an input frame rate of 25. Adding -r 10 as an output option will cause ffmpeg to drop frames, but using it as an input option will use all frames. – LordNeckbeard Oct 14 '12 at 18:06
Ah, interesting. So probably better specifying -r 10 -i … then for the above use case? – slhck Oct 14 '12 at 18:21
For the OP's use case I think it would probably be best as an input option. Unfortunately, I doubt .mpg can support 10 fps (yet another reason for your MP4 recommendation). Different -r values can be used for input and output, but that will lead to dupes or drops which may be hardly noticeable or really ugly. – LordNeckbeard Oct 14 '12 at 19:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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