2021-03-30, 09:26
Are there any plugins or filters I can enable to avoid bright flashes from appearing in videos being played by Kodi? My girlfriend is photosensitive / has epilepsy. We're usually pretty mindful of what movies/shows are likely to have flashes in them, but sometimes it can occur suddenly, which can lead to a seizure.
ffmpeg has recently had the wonderful filter, "photosensitivity", added back in 2019 by the programmer CyberShadow. I've been using it with good success to ease movies that have severe flashing. It analyzes the difference in brightness between multiple frames and blends them together if the brightness delta exceeds a set value. It only blends frames in a scene for the duration of the flashing.
The user can adjust how sensitive the filter is to flashes, including these options:
Here's an example of how to convert this movie using ffmpeg via command line:
I know that Kodi uses ffmpeg as a video player. Is there any way to leverage Kodi to use ffmpeg with this ffmpeg filter turned on?
ffmpeg has recently had the wonderful filter, "photosensitivity", added back in 2019 by the programmer CyberShadow. I've been using it with good success to ease movies that have severe flashing. It analyzes the difference in brightness between multiple frames and blends them together if the brightness delta exceeds a set value. It only blends frames in a scene for the duration of the flashing.
The user can adjust how sensitive the filter is to flashes, including these options:
- Frames: Set how many frames to use when filtering.
- Threshold: Set detection threshold factor. Default is 1. Lower is stricter.
- Skip: Set how many pixels to skip when sampling frames. Default is 1. Allowed range is from 1 to 1024.
Here's an example of how to convert this movie using ffmpeg via command line:
(this example applies an aggressive flashing filter, since Blade 2 is particularly bad when it comes to bright flashes)cmd:ffmpeg -i "M:\Movies\Blade II (2002).mp4" -vf photosensitivity=30:0.6:20 "M:\Movies\Filtered\Blade II (2004).mp4"
I know that Kodi uses ffmpeg as a video player. Is there any way to leverage Kodi to use ffmpeg with this ffmpeg filter turned on?