Opened 2 years ago
Last modified 18 months ago
#10901 new defect
HEVC with alpha to PNG does not maintain alpha
| Reported by: | Jozef Chutka | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | 6.1 | Keywords: | Hevc alpha |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
When converting hevc.mp4 with alpha into PNG, the alpha information is not respected, producing opaque PNG.
How to reproduce:
% ffmpeg -i hevc.mp4 -vframes 1 output.png
hevc.mp4 was created from source image with alpha channel and seems to have the alpha properly encoded:
ffmpeg -i source.png -vcodec hevc_videotoolbox -r 1 -t 1 -vtag hvc1 -alpha_quality 1 -y hevc.mp4
Following https://trac.ffmpeg.org/ticket/7965 which refers to https://patchwork.ffmpeg.org/project/ffmpeg/patch/tencent_5F1F4DA9CFDF5521A752B8C9161A4D23A007@qq.com/ it seems hevcdec has some kind of decoding support for alpha channel... is it hidden behind some command line flag?
Attachments (3)
Change History (4)
by , 2 years ago
| Attachment: | source.png added |
|---|
by , 2 years ago
by , 2 years ago
| Attachment: | output.png added |
|---|
comment:1 by , 18 months ago
Note:
See TracTickets
for help on using tickets.



I suspect this is waiting for this: https://trac.ffmpeg.org/ticket/7965
My understanding, in short: The integrated x265 decoder in FFMPEG doesn't yet have support for alpha channel data, so it gets lost during decoding and the internal bitstream is YUV and not YUVA. When the decoder starts supporting alpha data, I think converting to PNG frames with alpha will probably just work.