GNOME Bugzilla – Bug 735450
vp8dec: Does not support alpha channel
Last modified: 2018-11-03 14:53:58 UTC
Created attachment 284508 [details] TestVideo The VP8 decoders do not retrieve the alpha channel from a video, I'm not exactly sure where about in the pipeline the problem lies, however when using playbin and appsink to stream a VP8 encoded video the alpha channel is simply defaulted to opaque. The VP8 codec does support an alpha channel. Attached is a test video containing a video with an alpha channel.
Not sure how that is supposed to work. The Matroska container contains a VideoAlphaMode element, which according to the spec says that the BlockAdditional element could contain alpha data. So this is completely outside the VP8 codec but stored separately and then needs to be somehow combined with the video after decoding. libav does not support this either. Are you aware of any player that supports it?
I only know that FFMpeg supports the encoding of VP8 with alpha: http://ffmpeg.org/pipermail/ffmpeg-devel/2013-May/143461.html That post may shed some light on how it's actually encoded, it appears the alpha is encoded separately with the VP8 codec and then muxed into the BlockAdditional element of the container, as per the spec: http://wiki.webmproject.org/alpha-channel Note: The spec talks specifically about the webm container Chrome supports the decoding and playback of VP8 alpha videos in the webm format, but I don't know of anything that decodes the alpha in the matroska format correctly.
Interesting... but not sure how to best support that in GStreamer. I guess we could add the alpha VP8 in a meta, and then have vp8dec run two decoder instances... but that seems rather ugly, although better than the other alternatives :) I guess that would be the way to go. 1) Add the BlockAddition blocks to a custom VP8 specific meta in matroskademux for VP8/VP9 video streams 2) Add support for those metas in vp8dec/vp9dec Optionally: 3) Add support for that in vp8enc/vp9enc and matroskamux too Seems like a lazy hack to support alpha without adding alpha support to the codec itself.
Seems the only way forward though. Is it translatable to other codec. Does matroska (webm) limits this feature to VP8/9 or could we do the same with other codec ?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/127.