I have a time lapse video with 29.97003 FPS. There is no audio. The video is too fast. I would like to lengthen it from 10 seconds to 20 seconds, while keeping each frame with like 15 FPS.

How can I do that with FFMPEG?

It is short and small in file size. Can be reencoded, I don't care. I'm thinking, if there is no quick solution, I could extract frames to JPG files and encode a new video with different FPS. I'm trying to avoid that.

Edit: I tried this: https://stackoverflow.com/a/45465730/1442225

ffmpeg -y -i input.mp4 -vf \"setpts=2*PTS\" -r 15 -codec:v h264 output.mp4

It looks like it did the right thing. output.mp4 has doubled length but same amount of frames. Only the file size shrank to less than 25% of original. I used the same vcodec. I do expect the file size stay almost the same.

  • For getting the same file size, try the "Without re-encoding" solution from the link you have posted.
    – Rotem
    Jan 18 at 9:08

1 Answer 1


First you need to take out the raw video data from the mp4 container, then you need to put it into a new container and set the new fps value at the same time.

So first: ffmpeg -i input.mp4 -c:v copy -f h264 input.h264

And then: ffmpeg -r 15 -i input.h264 -c:v copy output.mp4

Note: As long as you do not use -c:v copy (in your edit you used -codec:v h264 which is the same as -c:v h264) FFmpeg will always re-encode the input so the output will have some different size.

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.