After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735450 - vp8dec: Does not support alpha channel
vp8dec: Does not support alpha channel
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.2.4
Other Windows
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-26 13:20 UTC by ashleighbcthomas
Modified: 2018-11-03 14:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
TestVideo (81.29 KB, application/octet-stream)
2014-08-26 13:20 UTC, ashleighbcthomas
Details

Description ashleighbcthomas 2014-08-26 13:20:40 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.
Comment 1 Sebastian Dröge (slomo) 2014-08-28 07:21:30 UTC
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?
Comment 2 ashleighbcthomas 2014-08-28 09:10:49 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2014-08-28 09:15:05 UTC
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.
Comment 4 Nicolas Dufresne (ndufresne) 2014-08-28 12:59:27 UTC
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 ?
Comment 5 GStreamer system administrator 2018-11-03 14:53:58 UTC
-- 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.