Opened 2 years ago
Last modified 7 months ago
#9883 open enhancement
FFmpeg AVIF decoder does not seem to handle transparency when decoding YUV420P
Reported by: | btdmaster | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | undetermined |
Version: | git-master | Keywords: | mov av1 alpha |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
FFmpeg seems to ignore transparency when decoding YUV420P. For example, compare the following:
% ffmpeg -i transparency-present.avif transparency-missing.png % convert transparency-present.avif transparency-present.png Arch Linux FFmpeg 2:5.1-1
This can also be reproduced when printing the file with ffplay and mpv (which, from what I understand, also used FFmpeg) but not with firefox or chafa, hence suggesting FFmpeg is the culprit.
I also found a similar limitation in libavif, though only for converting to yuv4mpeg2 (https://github.com/AOMediaCodec/libavif/blob/98a453fdbb0340eaf8bd6f794359483048e72305/apps/shared/y4m.c#L435):
% avifdec -i transparency-present.avif -o transparency-also-missing.y4m Arch Linux libavif 0.10.1-2
FFmpeg does not seem to use libavif, but I thought that may provide some insight into the problem.
Attachments (1)
Change History (5)
by , 2 years ago
Attachment: | transparency-present.avif added |
---|
comment:1 by , 2 years ago
Blocking: | #7621 → 7621 |
---|
comment:2 by , 2 years ago
Status: | new → open |
---|
We know this, apply this if you are in a hurry. https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220630210434.1551769-2-vigneshv@google.com/
Series: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=6946
comment:3 by , 2 years ago
Blocking: | 7621 |
---|---|
Component: | ffmpeg → undetermined |
Keywords: | mov av1 alpha added; transparent removed |
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:4 by , 7 months ago
Subscribing to this issue/thread. Using ffmpeg 6.1.1 it seem the issue still exists - patch not yet merged(?)
Demonstrates AVIF transparency