[FFmpeg-trac] #10220(undetermined:new): AVIF image's alpha track is not being found
FFmpeg
trac at avcodec.org
Sun Feb 26 16:22:28 EET 2023
#10220: AVIF image's alpha track is not being found
-------------------------------------+-------------------------------------
Reporter: Meten | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: av1 libaom- | Blocked By:
av1 |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
ffmpeg/ffprobe don't show or can't "see" that there is a 2nd alpha track
for an AVIF image that does have one.
How to reproduce:
Create an AVIF image with an alpha layer
(Using avifenc to create a new AVIF file in a similar fashion will yield
similar results)
{{{
% ffmpeg -hide_banner -i icon.png -c:v libaom-av1 -cpu-used 0 -still-
picture true -crf:0 56 -crf:1 40 -filter_complex
'split[rgb],alphaextract[a]' -pix_fmt:0 yuv420p -map '[rgb]' -map '[a]'
newicon.avif
}}}
Try to do anything with it like e.g. convert it back to a PNG, and FFmpeg
will complain:
{{{
% ffmpeg -hide_banner -i newicon.avif -filter_complex
"[0:v:1][0:v:0]alphamerge[out]" -map '[out]' out.png
[libdav1d @ 000002a98be16e00] libdav1d 1.1.0-0-g9593e62
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'newicon.avif':
Metadata:
major_brand : avif
minor_version : 0
compatible_brands: avifmif1miafMA1B
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0[0x1]: Video: av1 (Main), yuv420p(tv,
unknown/bt709/iec61966-2-1), 184x184 [SAR 1:1 DAR 1:1], 1 fps, 1 tbr, 1
tbn
Stream specifier ':v:1' in filtergraph description
[0:v:1][0:v:0]alphamerge[out] matches no streams.
}}}
version used:
{{{
ffmpeg version 2023-02-22-git-d5cc7acff1-full_build-www.gyan.dev Copyright
(c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
}}}
Interestingly, ffprobe does show the alpha track for animated AVIF files.
Example:
{{{
% ffprobe -hide_banner animated_logo.avif
[libdav1d @ 0000018448b99140] libdav1d 1.1.0-0-g9593e62
[libdav1d @ 0000018448b9a780] libdav1d 1.1.0-0-g9593e62
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\animated_logo.avif':
Metadata:
major_brand : avis
minor_version : 0
compatible_brands: avisavifmsf1iso8mif1miafMA1B
Duration: 00:00:01.40, start: 0.000000, bitrate: 69 kb/s
Stream #0:0[0x1](und): Video: av1 (Main) (av01 / 0x31307661),
yuv420p(tv, progressive), 256x256 [SAR 1:1 DAR 1:1], 14 kb/s, 15 fps, 15
tbr, 100k tbn (default)
Metadata:
handler_name : PictureHandler
vendor_id : [0][0][0][0]
encoder : Lavc60.4.100 libaom-av1
Stream #0:1[0x2](und): Video: av1 (Main) (av01 / 0x31307661), gray(pc,
gbr/unknown/unknown, progressive), 256x256 [SAR 1:1 DAR 1:1], 42 kb/s, 15
fps, 15 tbr, 100k tbn
Metadata:
handler_name : PictureHandler
vendor_id : [0][0][0][0]
encoder : Lavc60.4.100 libaom-av1
[libdav1d @ 0000018448b9b400] libdav1d 1.1.0-0-g9593e62
[libdav1d @ 0000018448b8aac0] libdav1d 1.1.0-0-g9593e62
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10220>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list