google-chromehevcwebcodecs

Does WebCodecs support transparency of an HEVC stream?


I checked out this demo from the webcodecs repo and I was playing around with the HEVC decoding, which works from Chrome 107 I believe.

However, when I tried with an HEVC that utilizes transparency, the transparent part is drawn with black. I played the same video using the video element and it was transparent. I'm wondering, is it possible to preserve the transparent using the VideoDecoder?


Solution

  • Glad to see you are testing this feature, HEVC with Alpha for macOS has been initially supported since Chrome 107, and has been fully supported since Chrome 108, so you can try Chrome Canary 108 and its should already working well with WebCodec + VideoDecoder API now.

    The implement for HEVC with alpha on Windows will be much more complex and hasn't been implemented yet, but I may take some time to implement it as well.