Bug 233036 - Safari 15.1 H264 FullHD video encode/decode fails
Summary: Safari 15.1 H264 FullHD video encode/decode fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
Keywords: InRadar
: 236870 (view as bug list)
Depends on:
Reported: 2021-11-12 03:06 PST by milen
Modified: 2022-03-04 04:10 PST (History)
9 users (show)

See Also:

Patch (4.48 KB, patch)
2021-11-17 02:08 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description milen 2021-11-12 03:06:51 PST
Tested on:
macOS: 12.0.1, Mac mini (2018)
Safari: Version 15.1 (17612.
WebCam: Logitech C910

Steps to reproduce the issue:
1) Go to https://webrtc.github.io/samples/src/content/peerconnection/constraints/
2) Change the resolution settings to FullHD (1920x1080).
    "video": {
        "width": {
            "min": "1851",
            "max": "4096"
        "height": {
            "min": "1053",
            "max": "2160"

3) Click the button 'Get Media'
4) Click the button 'Connect'

The result is: Output video is black


Some observations:

1) There is a Safari settings: Developer > Experimental Features > Webrtc H264 LowLatency Encoder. This is enabled by default. If it is turned OFF then the above scenario (H264 with FullHD) works fine.

2) If the resolution is up to HD (1280x720) then the above scenario works fine. Anything above 1280x720 causes black output.

3) If the codec is VP8 or VP9 then there is no problem with FullHD video.

4) The same issue happens also if the video is encoded on desktop Safari 15.1 and decoded on mobile Safari 15.1 (iOS).

5) The issue is not present if the video is encoded on desktop Safari 15.1 and decoded on desktop Chrome 95. H264 with FullHD works fine is this case.
Comment 1 milen 2021-11-12 03:26:05 PST
It is kinda hard to set exact FullHD settings with the sample above.
Anything above 1280x720 and below 1920x1080 seems to reproduce it.

In my case 
    "audio": true,
    "video": {
        "width": {
            "min": "300",
            "max": "1887"
        "height": {
            "min": "200",
            "max": "1015"

results in: "Video dimensions: 1887x1015px"
Comment 2 youenn fablet 2021-11-17 02:06:17 PST
Comment 3 youenn fablet 2021-11-17 02:08:57 PST
Created attachment 444500 [details]
Comment 4 EWS 2021-11-17 06:52:29 PST
Committed r285928 (244337@main): <https://commits.webkit.org/244337@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444500 [details].
Comment 5 youenn fablet 2022-03-04 04:10:21 PST
*** Bug 236870 has been marked as a duplicate of this bug. ***