Showing results for 
Search instead for 
Did you mean: 

Is there WebCodecs support in browser? (encoder, but not decoder?)

Level 2

I'm trying to see if I can use native/accellerated video decoding in the web browser. With an origin trail setup, I get access to `VideoDecoder` and `VideoEncoder`. But when I try and create any `avc1` codec (eg `avc1.420028`) I get

`Failed to execute 'configure' on 'VideoDecoder': H.264 configuration must include an avcC description.`


I can actually create an encoder, using `avc1.42E01E` (only codec I tested) and encode frames.... Is there just missing decoder support in the chromium build? Here it is working on desktop (as has an origin trial)


I'm testing every combination of profile+level I can for h264, but all with the same error.


Are there any decoders supported?


Level 3

The Oculus browser doesn't support AV1 encoding or decoding.

Can you tell me how you set up an origin trial?

Im not looking for AV1 support. Im using h264 (which the quest does have hardware support for)


AVC1, or AVCC is the name of h264 codecs. (Different from AV1)


you can register domains for origin trials with google. Then embed a meta tag in a page (see my example)


Level 3

Does creating the encoder work in regular Chrome if you are not on a site that is in the origin trial?

Level 2


You can test this easily, open any website not on the origin trial (eg, this one :), open dev tools and type into the console

`new VideoEncoder`

or `new VideoDecoder`

it will error as the symbol is missing (enabling via chrome://flags or origin trial exposes api symbols)


If you try it on it'll work (well, it'll error, but it'll TRY and construct it)

I just forked your site on github and verified that the API starts working when I add my site to the origin trial.

I will investigate...

You mean, it works in quest? the decoder? (you see a rainbow image?)


The API is there for sure, just won't create an actual decoder 🙂


I did write&test this before 16.0 went up, so maybe the latest version of the browser supports it?

No, nothing is visible but the API is there.