Bug 226776

Summary: Colorimetry-related warnings with H264 encoded with iOS Safari
Product: WebKit Reporter: Nazar Mokrynskyi <nazar>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric.carlson, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   

Description Nazar Mokrynskyi 2021-06-08 13:01:46 PDT
When encoding H264 on iOS, its contents doesn't seem to contain colorimetry information when decoded by GStreamer, resulting in following warnings:
> 2:59:30.649107764     1 0x7f0298049400 WARN              video-info video-info.c:204:validate_colorimetry: Need to specify a color matrix when using YUV format (I420)
> 2:59:30.649125302     1 0x7f0298049400 WARN              video-info video-info.c:520:gst_video_info_from_caps: invalid colorimetry, using default

Those warnings are not present when VP8 is used, not present with desktop Safari and H264 (which makes me think it is related to hardware-accelerated encoder) and not present with Firefox/Chromium.

Those are annoying warnings and would be nice to fix in iOS version of Safari.
Comment 1 youenn fablet 2021-06-14 01:55:42 PDT
Thanks Nazar, can you detail whether this is with high profile or baseline?
Can you detail the impact of the issue?
Comment 2 Nazar Mokrynskyi 2021-06-14 02:03:53 PDT
This is baseline. The impact is primarily A HUGE amount of warnings in logs, visually there doesn't seem to be anything bad, I guess GStreamer's default works fine there.
Comment 3 youenn fablet 2021-06-14 08:26:13 PDT
It would help to understand what the spec says here.
That will tell us whether encoder should be fixed, or decoder, or application using decoder output.
Comment 4 Nazar Mokrynskyi 2021-06-14 08:31:10 PDT
Decoding is done by libav integration in GStreamer, so application using it doesn't do anything special.
And since it works fine with every other browser I tried so far except mobile Safari, I believe it is mobile Safari that needs to be tweaked here. But I'm not an expert in the field to suggest something more specific.
Comment 5 Radar WebKit Bug Importer 2021-06-15 13:02:16 PDT
<rdar://problem/79357214>