I have googled for days, and I just can't figure out how to use ffmpeg to blend the brightest pixels to the next video frame. And lastly save the last frame as an image.

Similar to "evaluate sequence max" with ImageMagick:

convert *.jpg -evaluate-sequence max output.jpg

All filter complex variations found in forums, guides, or on this website just throws errors with FFMPEG 6.1.1 probably due to version incompatibility.

In summary, I want the maximum light in a frame to carry over to the next frame. It should remain until something even brighter replaces that pixel..

ffmpeg video.mp4 -filter_complex ... output.jpg

1 Answer 1


The lagfun filter can do this. Set decay to 1.

  • Wohoo this is exactly what I was looking for. -vf "lagfun=decay=1"Now I just need to save the last frame to an image. Is it doable?
    – tim
    Apr 15 at 2:42
  • The following works ffmpeg -i video.mp4 -vf "lagfun=decay=1" -update true output.jpg. If there are other proposed ways let me know. Otherwise I will accept this as the answer to the question.
    – tim
    Apr 15 at 2:52
  • Yes, that command is fine.
    – Gyan
    Apr 15 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.