-
Notifications
You must be signed in to change notification settings - Fork 439
[Web API type definition issue] VideoEncoderConfig interface should have hevc attribute #2025
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
That MDN page does not show that Gecko and WebKit supports HEVC video encoding. Actually none of them supports it. (They have only |
Thank you for posting the Gecko and WebKit repos here. You are right that in these repos there's no mention of HEVC support. However, it's interesting that Safari does mention that it supports webcodecs HEVC since 17.4 https://developer.apple.com/documentation/safari-release-notes/safari-17_4-release-notes . If you have a safari browser 17.4+ you can test out following on console to verify encoder support for hevc main, Level 4.1 codec.
I wonder where the discrepancy is from, as this domain is bit out of my scope. |
Webkit is the engine. |
Perhaps they do support HEVC but not the HEVC specific configuration? |
That is possible, but it is interesting if that's the case. The difference between annex-b and non-annex b format is basically adding binary separators before Network Abstraction Layer (NAL) units instead of communicating before a video stream or during the video stream separately where the relevant information for decoding is available, which is computationally and programmatically quite straightforward to do. I'd like to imagine that the apple hardware already has support for annexb format video encoding, but I wonder why would it not be reflected on the webkit repo. |
Thank you for the clarification. |
I'll need to have a look at https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp , maybe hevc annex-b support could be added to it and then I can revisit this issue on later date. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
VideoEncoderConfig interface is missing hevc attribute
Expected vs. Actual Behavior
Modern browsers widely support hevc codec for video encoding and decoding https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs#hevc_h.265. Supported on Chrome 107+, Edge 18+, Firefox 120+, Opera 94+, Safari 11+
The lack of hevc attribute for video encoder means that users cannot change the format of encoded video to e.g. annex-b which is favoured for realtime video streaming.
VideoEncoder interface looks now following:
Should be:
Removing following from removedTypes.jsonc and fixing tests should alleviate this:
Playground Link
No response
Browser Support
Have Tried The Latest Releases
@types/web
.Additional Context
No response
The text was updated successfully, but these errors were encountered: