Opened 12 years ago

Closed 5 years ago

Last modified 7 months ago

#2104 closed enhancement (fixed)

anti-epilepsy bright flash remover video filter

Reported by: compn Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords:
Cc:, Marton Balint Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


any chance a filter to remove bright flashes from video?

it may drop the frame or duplicate a previous non-bright frame, making video stutter a bit.

i'll upload a sample soon.

Attachments (1)

Denno.ogg (865.7 KB ) - added by Carl Eugen Hoyos 11 years ago.
Sample from

Download all attachments as: .zip

Change History (14)

comment:1 by Carl Eugen Hoyos, 12 years ago

Keywords: avfilter removed

Could you provide a sample?

comment:3 by Carl Eugen Hoyos, 12 years ago

Status: newopen

comment:4 by Elon Musk, 11 years ago

please always put link here

by Carl Eugen Hoyos, 11 years ago

Attachment: Denno.ogg added

comment:5 by compn, 11 years ago

this sample is also good for testing:

comment:6 by Vladimir Panteleev, 5 years ago

Cc: added


I've been working on a filter to do this. My code so far is here:

Feedback from those who would find this useful would be appreciated.
I can also provide Win64 ffmpeg/mpv binaries.

I intend to submit the filter for inclusion once we conclude the results to be satisfactory.

comment:7 by Marton Balint, 5 years ago

Cc: Marton Balint added

Really nice, some comments at first glace:

  • Use the .activate callback
  • You can probably factorize the blending code in vf_framerate so ASM can be used for blending
  • A separate mode to detect only flashes (and not remove them) would probably be useful

comment:8 by Cigaes, 5 years ago

This is bug tracker, patches should be discussed on the mailing list.


in reply to:  6 ; comment:9 by compn, 5 years ago

yes if you can provide a win64 binary I can test, although I am no expert.

I am curious on why you chose to write a filter for this. I am happy to see work on this, I hope a filter like this can help people.

I am assuming it is real time ?

in reply to:  9 comment:10 by Vladimir Panteleev, 5 years ago

Replying to compn:

yes if you can provide a win64 binary I can test, although I am no expert.

There are binaries available at this very-temporary URL:

There are also some samples/comparisons on the same server, but note that they may not be safe to look at.

I am curious on why you chose to write a filter for this.

Someone I know mentioned that they would find such a thing useful, and it seemed like a very interesting project that could help people.

I am assuming it is real time ?

Yes, it works in real time (on recent CPUs) and does not buffer.

comment:11 by compn, 5 years ago

I like your comparison videos. Very clear before and after.

Your filter tries pretty hard on this clip from the incredibles 2, but I don't think theres anything that can be done for it.

the only other thing i could think of is that the "next gen" version of this filter would remember which macroblocks are moving/changing colors at too fast of a pace, and then you could just freeze those ones while the (still moving, but not flashing) macroblocks are allowed to continue. Not even sure if its possible to do what I am describing though. It would also cause or look like tearing.

is there a memory leak? seems to eat about 3gb+ ram here when using your filter vs no filters. could be a mingw bug or something else.

but yes, if you have not already, please submit patch to ffmpeg-devel for discussions. that is the proper place for patch discussions. this bug tracker does not get as many eyeballs as the mailing list.

comment:12 by Elon Musk, 5 years ago

Resolution: fixed
Status: openclosed

comment:13 by compn, 4 years ago

I asked netflix about the filter. they said it would need proof that the filter is following the ITU standard before considering using it.!!PDF-E.pdf

maybe a future feature request. just putting itu link here for now. maybe someone would put a bounty or hire developer to make it conform to specs.

Note: See TracTickets for help on using tickets.