Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
soylentgraham's avatar
soylentgraham
Honored Guest
4 years ago

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

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?

 

https://poph264.com/SrcWeb/index.html Here it is working on desktop (as Poph264.com has an origin trial)

 

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

https://github.com/NewChromantics/PopH264/blob/master/SrcWeb/PopH264.js#L167

 

Are there any decoders supported?

7 Replies

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

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

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

    • rik.cabanier's avatar
      rik.cabanier
      Explorer

      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...

      • soylentgraham's avatar
        soylentgraham
        Honored Guest

        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. 

    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 https://PopH264.com it'll work (well, it'll error, but it'll TRY and construct it)