[FFmpeg-user] Smooth FPS change via ffmpeg
JackDesBwa
jackdesbwa at desbwa.org
Mon Sep 23 19:58:20 EEST 2019
> Thanks for a detailed explanation, but I'm still not sure how this should
> be implemented.
> I understand that I should accumulate/calculate the offset for each PTS,
> but I do not understand how.
>
I do not fully understand neither, but I become interested in complex
animation curves too, thanks to your question.
Speeding-up or slowing-down gradually can be useful in other situations.
> If we neglect the fact that frames are discrete, we can say that the
> > frame rate is the speed of the frames timestamps. In mathematical terms,
> > the derivative. The derivative of a linear function is easy. Other kinds
> > are more tricky.
>
I think it is based on the fact that you define your transformation in
terms of framerate (frame per second) and you express it in terms of frame
position, and the two have integral/derivative relationship.
By "cheating", I would say that the integral of a linear curve is a
parabola [ T**2 ] that you want to start at 2 at the beginning [ T**2+2 ]
and finish at 8 at the end [ (8-2)*T**2+2 ] and stretch on 5 seconds [
(8-2)*T**2/5**2+2 ] but then I am not sure how to apply this.
Also, if it is the right formula, I do not understand (well I am tired now)
how to come to this in the general case from the expression of the
framerate curve (0.5-t*3/40)*original_framerate.
JackDesBwa
More information about the ffmpeg-user
mailing list