Bug 258669

Summary: VideoEncoder does not call output callback on FullHD configuration
Product: WebKit Reporter: Jozef Chutka <jozefchutka>
Component: MediaAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Attachments:
Description Flags
bug demonstration none

Description Jozef Chutka 2023-06-29 05:05:11 PDT
Created attachment 466864 [details]
bug demonstration

When encoding FullHD VideoFrame-s with avc1 VideoEncoder, the output callback is never executed even after encoder.flush() call.

- This problem only exists on frames larger than ~912000 pixels (912x1000 or more, i.e. 1920x1080).
- There is no error thrown during the code execution.
- VideoEncoder.isConfigSupported reports that the config is supported.
- Same config works on Chrome and produces encoded data.
- However, the output callback is fired as expected on videos with lower resolution i.e. 1280x720.
- Changing codec to vp8 or vp09.00.10.08 with FullHD res also works and produces encoded data.

I tried to change various properties for `VideoEncoder.configure(...)` as well as `new VideoFrame(...)` but no luck.

See attached safari-bug.html for demonstration.
Comment 1 Jozef Chutka 2023-06-29 05:40:59 PDT
actually the max working width/height is a tricky one to resolve:

- 1280x720 works ok (921600 pixels)
- 916x1000 does not work (916000 pixels)
Comment 2 Radar WebKit Bug Importer 2023-07-03 07:26:46 PDT
<rdar://problem/111685821>
Comment 3 youenn fablet 2023-07-05 06:10:01 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15562
Comment 4 EWS 2023-07-06 00:05:03 PDT
Committed 265792@main (9879838d0315): <https://commits.webkit.org/265792@main>

Reviewed commits have been landed. Closing PR #15562 and removing active labels.