[FFmpeg-user] Accelerate/Decelerate video

Nicholas Robbins nickrobbins at yahoo.com
Wed Dec 17 00:18:16 CET 2014

On Tuesday, December 16, 2014 5:56 PM, david reid <zathrasorama at gmail.com> wrote:
>I can already get the video at the speed I want, my question was whether
>there was any way to handle the acceleration/deceleration to/from the new
>speed. Presently I just "jump" - which isn't great. Ideally I'd like to
>accelerate into the timelapse over a period of a few seconds and then
>decelerate back to normal speed when it's finished. Can that be done

My suggestion was to use the setpts filter, not just as a setpts=PTS/2. You could do something like setpts=2*PTS/((A+B)+(B-A)*tanh(PTS-midpts))

This would start at going A times faster, and then speed up, to B times faster, switching around midpts. If you want a smoother transition, you could put a divisor on the inner PTS.

See what you can do.

More information about the ffmpeg-user mailing list