[FFmpeg-user] Smooth FPS change via ffmpeg

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Sep 23 23:58:38 EEST 2019


Am Mo., 23. Sept. 2019 um 14:52 Uhr schrieb RazrFalcon <razrfalcon at gmail.com>:

> I have a 240FPS video made by GoPro and I'm looking for a way to gradually
> change a video framerate. If I want to simply slow down a video I can use:
>
> ffmpeg -i raw.mp4 -filter_complex "[v:0]setpts=8*PTS" -r 30 out.mp4
>
> and it works fine. But when I'm trying to use a "variable" framerate like
> this:
>
> ffmpeg -i raw.mp4 -filter_complex "[v:0]setpts='lerp(2,8,T/5)*PTS'" -r 30
> out.mp4

(Complete, uncut console output missing.)

"-r 30" forces constant framerate output.
Additionally, our mp4 muxer does not support variable frame rate,
you would have to use another muxer.

(This assumes you really want a variable framerate output, not
a "variable framerate")

Carl Eugen


More information about the ffmpeg-user mailing list