[FFmpeg-trac] #5734(undetermined:new): Coherent support to VP8 with alpha channel
FFmpeg
trac at avcodec.org
Mon Jul 25 15:04:30 EEST 2016
#5734: Coherent support to VP8 with alpha channel
-------------------------------------+-------------------------------------
Reporter: cdlvcdlv | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
You can retrieve alpha channel from any video format, except VP8/webm.
{{{
% ffmpeg -i
https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png
-c:v libvpx -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1"
bouncing_ball_with_alpha.webm
% ffmpeg -i
https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png
-c:v qtrle -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1"
bouncing_ball_with_alpha.webm
ffmpeg version - all
}}}
The problem is that ffmpeg and ffplay ignore the encoded alpha channel
(that I think is encoded in the container webm, i.e. matroska).
You can use any video with alpha (lagarith, qtrle, huffyuv...) and
transcode from one to another, given that some of them can only be decoded
but not encoded: you can transcode from lagarith to qtrle but no the other
way round. In any case, the alpha channel is never lost unless you specify
it to be discarded.
But if you use VP8/webm, you will not be able to make further transcodings
and retain the transparency. If you deleted the original, your alpha
channel is there, but in a black hole. The only way I know to show it is
there is using Chrome (I think Opera too, but I have not tested it). I
suppose that how they do it is in the source code of Chromium.
I have read it is difficult (see link below and its response). But, is it
true what he says: "In a simple test, I passed AV_PIX_FMT_YUVA420P to
avpicture_alloc() and was able to get the linesize[] and data[] filled
correctly for a YUVA picture"?
http://mplayerhq.hu/pipermail/ffmpeg-user/2014-September/023436.html
To date, there's no tool that can retrieve alpha channel in a webm video.
http://superuser.com/questions/1044453/extract-alpha-channel-from-webm-
video
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5734>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list