The inventors of this technology developed a method that prevents seizures in those who have photosensitivity by learning to adjust videos in a way that makes them safe. A large fraction of the population, particularly children, are sensitive to bright flashes and changing patterns, with many developing headaches or other unpleasant feelings, even if they do not have a seizure. Recent movies, such as Incredibles 2 and the 2019 Star Wars movie, carried disclaimers about seizures that might impact their public image. This approach detects and modifies videos, rendering them safe with minimal degradation in video quality. This technology can benefit photosensitive consumers as well as large digital content providers or movie studios seeking to provide safe viewing experiences. Children are disproportionately affected, particularly children with autism. Since the individual tolerance for flashing or moving patterns varies significantly, providers might offer a simple knob that users can tune or automatically adapt the filter by the age of the user.