Opened 13 hours ago
Last modified 7 hours ago
#11370 new defect
Transcoding single-frame APNG to AVIF results in very long encoding time
Reported by: | 9e80 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | 7.1 | Keywords: | apng, avif, libaom |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I will attach input APNG and logfile. Encoding takes many hours on beefy hardware. I do not know the exact amount of time, perhaps 12-16 hours. Single frame of input APNG seems to be decoded and passed to libaom encoder many times instead of one time as with transcoding to e.g. WEBP.
How to reproduce:
% ffmpeg -report -i 9e80eb2ff0613c3d6c83d204985fd5163c961ff6a5b2f64821ed5ea344b2d019.png -y deleteme.avif ffmpeg started on 2024-12-24 at 09:55:18 Report written to "ffmpeg-20241224-095518.log" Log level: 48 ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers built with Apple clang version 16.0.0 (clang-1600.0.26.4) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.100 / 61. 19.100 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 Input #0, apng, from '9e80eb2ff0613c3d6c83d204985fd5163c961ff6a5b2f64821ed5ea344b2d019.png': Duration: N/A, bitrate: N/A Stream #0:0: Video: apng, rgba(pc, gbr/unknown/unknown), 816x624, 100k tbr, 100k tbn Stream mapping: Stream #0:0 -> #0:0 (apng (native) -> av1 (libaom-av1)) Press [q] to stop, [?] for help [libaom-av1 @ 0x152705ca0] 3.11.0 [libaom-av1 @ 0x152705ca0] Neither bitrate nor constrained quality specified, using default CRF of 32 Output #0, avif, to 'deleteme.avif': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: av1 (av01 / 0x31307661), gbrp(pc, gbr/unknown/unknown, progressive), 816x624, q=2-31, 100k fps, 100k tbn (default) Metadata: encoder : Lavc61.19.100 libaom-av1 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A ^C^C^CReceived > 3 system signals, hard exiting=00:00:00.00 bitrate= 0.0kbits/s dup=349999 drop=0 speed=6.72e-05x
Attachments (2)
Change History (3)
by , 13 hours ago
Attachment: | 9e80eb2ff0613c3d6c83d204985fd5163c961ff6a5b2f64821ed5ea344b2d019.png added |
---|
comment:1 by , 7 hours ago
Now try -crf 0 -cpu-used 0 which is lossless (first option) and perfect compression rate. That will be even slower. Anyway, we know it is slow: #10533
Note:
See TracTickets
for help on using tickets.
input single frame APNG