[FFmpeg-user] exponential decay, is it possible?

Gyan Doshi gyandoshi at gmail.com
Sun Aug 5 16:42:03 EEST 2018



On 05-08-2018 06:41 PM, Michael Koch wrote:
> I'd like to ask if it's possible to make an exponential decay effect 
> with FFmpeg.
> Let's assume a pixel is fashing to luminance = 1 in just one frame. Then 
> in the output video I'd like to have the pixel flashing to 1 
> immediately, followed by an exponential decay with a time constant of a 
> few seconds.
> 
> The mathematics would be something like this:
> 
> luminance = 0.95 * luminance_in_last_frame;     // exponential decay
> if (luminance_in_new_frame > luminance)
>    luminance = luminance_in_new_frame;

So,

frame 0    --> luminance 0
frame 1    --> luminance 1
frame 2    --> as per exprs above
...
frame 2+T  -->       "
frame NEXT  --> source luminance
...
frame LAST -->       "

?

Or would the exponential decay restart each time a pixel of lum 1 is 
encountered?


Gyan


More information about the ffmpeg-user mailing list