[FFmpeg-trac] #9334(undetermined:new): MP4 to APNG conversion incorrectly has transparent background
FFmpeg
trac at avcodec.org
Sun Jul 18 12:46:06 EEST 2021
#9334: MP4 to APNG conversion incorrectly has transparent background
-------------------------------------+-------------------------------------
Reporter: mcpower | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug: The attached black and white MP4 video (which has no
alpha channel), when transcoded to APNG using ffmpeg results in the
background being transparent.
How to reproduce:
{{{
PS> ffmpeg -i black_and_white_splash.mp4 -plays 0
black_and_white_splash.apng
ffmpeg version 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev Copyright
(c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-
w32threads --disable-autodetect --enable-fontconfig --enable-iconv
--enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh
--enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca
--enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e
--enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
--enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
--enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
--enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-
libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-
libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
--enable-libmp3lame --enable-libshine --enable-libtheora --enable-
libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-
libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-
libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 3.101 / 59. 3.101
libavformat 59. 4.100 / 59. 4.100
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.103 / 8. 0.103
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'black_and_white_splash.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.4.100
Duration: 00:00:02.37, start: 0.000000, bitrate: 63 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 160x160 [SAR 1:1 DAR 1:1], 57 kb/s, 30 fps, 30 tbr, 15360 tbn
(default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> apng (native))
Press [q] to stop, [?] for help
Output #0, apng, to 'black_and_white_splash.apng':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.4.100
Stream #0:0(und): Video: apng, rgb24(pc, bt709, progressive), 160x160
[SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 30 fps, 30 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc59.3.101 apng
frame= 71 fps=0.0 q=-0.0 Lsize= 182kB time=00:00:02.36 bitrate=
629.6kbits/s speed=22.7x
}}}
Also reproduced with ffmpeg version 4.2.4-1ubuntu0.1.
Attached is the input file, the output file, and a recording of the output
APNG file as displayed in Google Chrome. Google Chrome uses an #e6e6e6
(light grey) background behind all transparent backgrounds.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9334>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list