Open Bug 1746557 (webcodecs) Opened 3 years ago Updated 5 days ago

[meta] Implement the WebCodecs API

Categories

(Core :: Audio/Video: Web Codecs, task, P1)

task

Tracking

()

People

(Reporter: chunmin, Assigned: chunmin)

References

(Depends on 16 open bugs, Blocks 4 open bugs, Regressed 1 open bug)

Details

(Keywords: meta, webcompat:platform-bug)

User Story

https://mozilla-hub.atlassian.net/browse/FFXP-2565
platform-scheduled:2025-04-01

This bug tracks the WebCodecs API https://w3c.github.io/webcodecs/ implementation.

Depends on: AudioDecoder
Depends on: VideoDecoder
Depends on: AudioEncoder
Depends on: 1749047
Depends on: ImageDecoder
Alias: webcodecs
Depends on: VideoFrame
Depends on: 1793814

(Please file a separate security issue if you found one and you are not a bot.)

Flags: needinfo?(cchang)
Summary: [meta] Tracking bug for WebCodecs API implementation → [meta] Implement the WebCodecs API
Depends on: 1840661
Depends on: 1840662
Component: Audio/Video → Audio/Video: Web Codecs

Thank you for actioning this. We're currently developing a commercial product which relies on WebCodecs support (specifically VideoDecoder), and I'm glad to see that there has been a formal announcement of the intent to implement this in FireFox:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/3g0fnn6682A/m/Nb1qVaA4AAAJ
This will bring FireFox in line with the other major browsers out there, which have all added WebCodecs support over the last two years. I've pulled down the latest nightly build and seen the progress here, and it's encouraging.

I have one specific question I haven't seen a direct answer to yet though, which relates to HEVC/H.265 support. Over the last 12 months, every other major browser has added pass-through support for hardware H265 decoding, where the platform supports it:
https://caniuse.com/?search=h.265
In reality, this means basically every platform in the world, since all graphics vendors have implemented hardware decoding for PC hardware, and mobile devices had hardware decoding since early on. As I understand it, pass-through decoding like this does not require any patent licenses or the like, since it's the hardware vendor that is doing the actual decoding, and they've already paid the fee to license the codec.

Is the intention to also add pass-through HEVC/H.265 decoding in FireFox for the WebCodecs API, either during the initial effort or as a following step?

I'm well aware of the benefits of AV1, and look forward to using it in the future instead of H265 once hardware support is common enough, but for now we need to be able to support H265 as a baseline, with AV1 being an extension we can reach for where it's supported. Right now I can list every other significant browser as either "supported" (Chrome, Edge, Opera, Samsung Internet, etc) or "supported in TP" (Safari on iOS, Safari on MacOS), which will give us comprehensive browser support across all significant platforms within the next two months. Except Firefox currently. Are there any plans, intent, or notional support for implementing H265 passthrough hardware decoding in this effort or a subsequent effort?

Flags: needinfo?(padenot)

I see meta bug 1842838 and bug 1849392 for Windows.
For Mac or Linux I do not see respective tracking, let's see whether we get any answer on that. 😀

H254 isn't free for all. We are looking into it and see what we can do

Depends on: 1854596
Depends on: 1867066
Depends on: 1867067
Depends on: 1849321
Depends on: 1848451
Depends on: 1856254
Depends on: 1869825
Regressions: 1871854
Regressions: 1872152
Depends on: 1872311
Depends on: 1872712
Depends on: VideoEncoder
No longer depends on: 1749047
Regressions: 1875492
No longer depends on: 1875485
No longer depends on: 1867066

As I understand it, pass-through decoding like this does not require any patent licenses or the like, since it's the hardware vendor that is doing the actual decoding, and they've already paid the fee to license the codec.

FYI, this is not true. Most hardware vendors generally argue they do not need to pay the fee since they don't provide a "complete codec" out of the box. There's a lot of passing the buck here... :/

Depends on: 1880132
Depends on: 1884796
Depends on: 1878300
Depends on: 1838487
Blocks: 1886474
No longer blocks: clipchamp
Depends on: 1891236
Depends on: 1891082
Depends on: 1891080
Depends on: 1896869
Depends on: 1897631
Depends on: 1897453
Blocks: 1899831
Depends on: 1900376
Duplicate of this bug: 1884994
No longer depends on: 1891236
No longer depends on: 1891080
Flags: needinfo?(padenot)
Depends on: 1914172
No longer blocks: 1886474
Blocks: clipchamp
Blocks: 1905866
Depends on: 1922158

Who, is Webcodec now a thing in firefox? Just tested with 131.0.3 and it seems to work! I just have issues with jumping decoding (i.e. every X frame, the video is moved up or down by maybe 10px, but I guess it is a separate issue)

Please open a bug for this with a test case, thanks!

Depends on: 1932526

Desktop support shipped in H1 2024, and is largely complete aside from bug fixing as users experiment with the implementation. Mobile support is still missing, which we're currently working on.

User Story: (updated)
User Story: (updated)
User Story: (updated)
You need to log in before you can comment on or make changes to this bug.