Opened 20 months ago
Last modified 19 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 (4)
by , 20 months ago
| Attachment: | transparency-present.avif added |
|---|
comment:1 by , 20 months ago
| Blocking: | #7621 → 7621 |
|---|
comment:2 by , 20 months 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 , 19 months ago
| Blocking: | 7621 |
|---|---|
| Component: | ffmpeg → undetermined |
| Keywords: | mov av1 alpha added; transparent removed |
| Priority: | normal → wish |
| Type: | defect → enhancement |
| Version: | unspecified → git-master |



Demonstrates AVIF transparency