Apple Detection of Flashing Lights
github.com
github.com
https://9to5mac.com/2023/03/27/apple-releases-tvos-16-4-with...
https://developer.apple.com/documentation/mediaaccessibility...
For epileptics like myself, this is a huge deal. It helps me deal with a lot of media that otherwise might cause me to suffer a seizure.
There are other offline tests like the Harding test that are run by the content creators (and why you see the epilepsy warnings at the start of shows)
FWIW, I'm not sure if this actually would benefit cats. I'm not up to speed on feline perception, but I know dogs see at a different frame rate than humans so things that won't trigger us might trigger them differently
Tools > Effects and Filters > Video Effects > Advanced > Anti-Flickering
Tools > Preferences > Show settings: All > Search: antiflicker
mpv --vf=deflicker,scale=960x540,pixscope 'https://github.com/apple/VideoFlashingReduction/blob/main/VideoFlashingReduction_Mathematica/Resources/movie.mp4?raw=true'
(generate test video): ffplay -f lavfi -i "color=777777[x],color=cccccc,
[x]framepack=frameseq,settb=AVTB,
setpts=N/TB/${flickerrate:-12},framerate=${interpolated:-24},
deflicker=size=5:mode=am,scale=640x480,pixscope"
antiflicker and deflicker are different implementationsdrawgraph can be bodged to convert metadata to frames, and signalstats the opposite. This enables silly things like a self-contained filtergraph mimicking Apple's demo with plots and usable in mpv.
frames=5
sensitivity=1.5
dim_range=2
dim_intercept=-0.4
smoothing=10
smoothtype=am
decay=0.9
min_contrast=0.0
min_brightness=0.0
min_saturation=0.0
ffplay -vf "split[original], crop=640:360:0:0,
split=5[i1][i2][i3][i4][i5];
[i1]photosensitivity=$frames :$sensitivity,
drawgraph='bg=black@0 :r=60 :s=1x1 :m1=lavfi.photosensitivity.factor
:fg1=0x010101*round(0xff*clip(VAL*$dim_range+$dim_intercept,0,1))',
split[sensedat], deflicker=$smoothing :$smoothtype,
negate, lagfun=$decay, negate, split[mit1][mit2];
[mit1][i2]scale2ref[mask][i2]; [i2][mask]alphamerge[m];
[mit2]signalstats[mitdat];
[i3]eq=$min_contrast :$min_brightness :${min_saturation}[a];
[a][m]overlay, split[output1][output2];
[sensedat]drawgraph=lavfi.photosensitivity.badness :0xffff0000
:bg=white :r=60 :slide=scroll :size=512x256 :min=0 :max=7[bad];
[bad][i5]scale2ref[badout][reuse];
[badout]drawtext=fontcolor=2222dd:text='frame %{metadata\:lavfi.photosensitivity.frame-badness}'[badout];
[badout]drawtext=fontcolor=0000ff:y=1.2*lh:text='badness %{metadata\:lavfi.photosensitivity.badness}'[badout];
[badout]drawtext=fontcolor=777700:y=2.4*lh:text='factor %{metadata\:lavfi.photosensitivity.factor}'[badout];
[mitdat]drawgraph=lavfi.signalstats.YAVG :0xff00ccdd
:bg=00000000 :r=60 :slide=scroll :size=512x256 :min=0 :max=255, vflip[factor];
[factor][badout]scale2ref[factorout][badout];
[factorout]drawtext=fontcolor=999900:y=3.6*lh:text='smoothed %{metadata\:lavfi.signalstats.YAVG}'[factorout];
[badout][factorout]overlay[rplot];
[i4]signalstats, drawgraph=lavfi.signalstats.YAVG :0xffff0000
:bg=white :r=60 :slide=scroll :size=512x256 :min=0 :max=255[lum];
[lum][reuse]scale2ref[lumout][reuse];
[lumout]drawtext=fontcolor=ff0000:text='%{pts\:hms} %{pts} %{eif\:n\:d\:5}'[lumout];
[lumout]drawtext=fontcolor=0000ff:y=1.2*lh:text='avg luma %{metadata\:lavfi.signalstats.YAVG}'[lumout];
[output1]signalstats, drawgraph=lavfi.signalstats.YAVG :0xff00ccdd
:bg=00000000 :r=60 :slide=scroll :size=512x256 :min=0 :max=255[mlum];
[mlum][lumout]scale2ref[mlumout][lumout];
[mlumout]drawtext=fontcolor=999900:y=2.4*lh:text='mitigated %{metadata\:lavfi.signalstats.YAVG}'[mlumout];
[lumout][mlumout]overlay[lplot];
[reuse][output2][rplot][lplot]xstack=4 :0_0|w0+30_0|w0+30_h0+20|0_h0+20, [original]hstack" \
'https://web.archive.org/web/0id_/https://developer.apple.com/accessibility/downloads/video-flashing-reduction-fig12.mp4'https://chrome.google.com/webstore/detail/seizafe-epilepsy-a...
I'm not epileptic.
Like most accessibility features, you don’t need to have a condition to find value in this one
I told them to do a Harding Test and get the company who made it to do the edits because WCAG doesn’t leave any wiggle room when it comes to potential seizures (rightfully so).
Glad to see Apple leading in this front. These features aren’t sexy but they make a real difference in people’s lives!
https://github.com/apple/VideoFlashingReduction/blob/main/Vi...
> This update adds Dim Flashing Lights, an accessibility option to automatically dim the display of video when flashes of light or strobe effects are detected, and includes performance and stability improvements.
I find I have this problem with Chromecast and YouTube. I think I would be pretty happy if I could set up yt-dlp to grab video, assist the audio of needed and then play the video.
It would be nice if apple also addressed PWM and Temporal dithering on the displays of their newer devices.
Some days I wish I lived on the other side of whatever bell curve they use to determine how obnoxious time-domain techniques are permitted to be for humans.
How the hell that company has apologists given how incredibly cynical and miserable they are and have always been I will never know.
"Wow, you can get away with that? How?!?" --Microsoft on seeing apple behavior.
I'm not epileptic, but I don't like to take chances with things like that. And, maybe a few times a year, I'm concerned because I see someone doing rapid flashing lights, and it seems irresponsible.
There’s a good chance I will turn this on just for comfort.
So far so good on the epilepsy front tho. Thankfully.
And a great fun movie, so it's all gravy.
What are the chances you don't like taking, chance of what?
I'm glad that Apple has made flashing light detection and auto-dimming technologies more available. It's amazing, in a sad way, how so many people are still unaware of the dangers of certain flashing light patterns, which leads to incidents continuing to occur. I personally only know about such dangers because I'm a long-time Pokémon fan since the English dub started airing in 1998; to this day the only episode of the Indigo League era I haven't watched is the infamous Porygon episode (only aired once in Japan) that had a flashy battle scene that sent about 700 people to the hospital. Yet even with this high-profile incident, I've heard some people say the incident was an urban legend until I told them otherwise, and there have been incidents in other media. There needs to be more awareness about the dangers of flashing lights so that way media creators and broadcasters can avoid them or mitigate their risks.
https://en.wikipedia.org/wiki/Denn%C5%8D_Senshi_Porygon?wpro...
However the thing people do talk about is how severe it was, and a small percentage reactions may have been the result of hysteria.
Nevertheless a useful piece of code - glad to see it.
Also reminds me of an epilepsy support forum that got hacked and defaced with flashing animated gifs back in 00s.
So, nothing is wrong with it. I'm pissing and moaning about getting trolled by the big company again, because in this instance I think it's more intellectually stimulating than giving $FAANG_CO a consolation prize.
No, it's not.
wut
It's one thing to write it in Swift, but then rewriting it in Matlab and Mathematica before generously releasing it to the public is just a slap in the face. Maybe that's lost on the denizens of today's Hacker News, but it bothers me anyways.