Search code examples
iosswiftcolorsavfoundation

Device brightness with video on screen affecting white color


Video demonstration (please watch, 18s): https://youtu.be/4HtkadKEnWM

When I reduce the brightness of the device, iOS seems to be changing white to off-white. For my use case, it is important that the view background is actually white so the video appears to seamlessly blend into the background. Interestingly, when I take a screenshot or screen recording this effect does not appear.

I am on light mode and don't have any custom color space settings.

Does anyone have any ideas on how to fix this? Thank you!


Solution

  • After communicating with Apple support, we discovered that the video_full_range_flag was not being set by ffmpeg. Re-encoding the videos using the following ffmpeg command worked: ffmpeg -i input.mp4 -map 0 -c copy -bsf:v h264_metadata=video_full_range_flag=1 output.mp4.