[Libav-user] What is correct method to identify streams containing alpha?

Mark Schafer mschafer at wireframe.biz
Fri Jun 15 02:49:22 EEST 2018

OK. Thanks Carl.

So you're saying I should always override it with libvpx if the file I'm 
loading is .webm ?
and if you don't mind - how do I override the codec on load ?
Is it in AVInputFormat by stipulating the extension and codec_tag ?

On 6/15/2018 11:13 AM, Carl Eugen Hoyos wrote:
> 2018-06-14 23:03 GMT+02:00, Mark Schafer <mschafer at wireframe.biz>:
>> We're trying to integrate ffmpeg 4 with Pyglet.
>> Its all going very well but we have one issue:
>> - If a VP9 (or VP8) file is created using ffmpeg4 from png files with
>> alphas, we get a video file (webm) with alpha internally. (Excellent)
>> - ffmpeg -i image_seq%03d.png -qmin 0 -qmax 50 -crf 5 -b:v 1M output.webm
>>       - The report from this CLI indicates that an alpha has been generated.
>> - Sample webm videos with alpha can be found on this page:
>> https://simpl.info/videoalpha/
>> - However on playing back we only get the RGB and do not get the alpha
>> unless we override the codec to be 'libvpx'.
> Yes, this is a known limitation of the native decoder, luckily you
> have already found the only known work-around - not to use it if
> you need this feature.
> If you really want to choose the decoder based on the alpha
> if the side_data starts with (uint64_t) 1 there is a transparency layer.
> It is probably simpler to always use the libvpx decoder.
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

More information about the Libav-user mailing list