alpha channel not working for .webm #3256
Comments
Doesn't seem like FFmpeg recognizes VP8 with embedded alpha channels at all. Not mpv's bug. If FFmpeg were to correctly recognize/decode and export the video as YUVA420P instead of YUV420P, mpv should display it correctly. (But I haven't tested it, is there anything else that uses a YUVA format?) |
Alpha in webm is a shitty hack, and actually there are 3 of them. They involve the container layer instead of being restricted to the codec. Not sure if it can be reasonably implemented at all. |
I can't even find a specification of this crap. Unless someone does, this is a WONTFIX. VP8 doesn't support alpha, and the alpha plane is in a BlockAdditional element attached to each packet. There's no specification for the format of this data, and ffmpeg's VP8 decoder does not use it. Once again I'm amazed by the unfathomable dumb crap Google produced. They also got in patches in ffmpeg for this, but only for encoding. Fuck Google. |
Not sure if WONTFIX is even the right label. I'd just call it “not our bug”. We just display the data we get from libavcodec, and whether to WONTFIX this or not is pretty much just FFmpeg's decision. |
Even if ffmpeg implements it at some point, the demuxer is not funneling through the data to the decoder. |
To the googlers, I managed to get it working with vp9 by using |
@pouar That doesn't do anything for VP8 videos, which means it's unrelated to this issue. |
true, sorry about that |
@CounterPillow Not necessarily true as VP9 is part of the webm standard, and both support alpha channels. |
@fullmetal1 The issue is about a VP8 video. VP8 does alpha channels with a bad demuxer hack. The original reporter posted this with a VP8 WebM. |
@CounterPillow Yes, I am very familiar with the original reporter.... I posted with a VP8 webm, but according to pouar, the same is true for vp9 videos decoded with ffmpeg's default vp9 decoder, which means that ffmpeg has the same issue on vp8 and vp9. |
might not be, as adding |
ok, I'm wrong, adding |
I haven't extensively tested this. alpha channel works correctly on .gif, .png, but not .webm (VP8) I have not tested on other video codecs because I lack any examples with alpha channel.
An example video can be found here https://raw.githubusercontent.com/photonstorm/phaser-examples/master/examples/assets/video/alpha-webm.webm
It is incorrectly rendered as yuv420p, without the default checkerboard background.
I used a recent version of mpv
default settings, no scripts.
The text was updated successfully, but these errors were encountered: