Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

AVIF conversion becomes black and white. #81

Description

@ecker00

I don't know much about the AVIF format but thought I should share a failing file. Might be the alpha channel playing tricks on the converter or something. I have pulled latest version. Tried converting from avif to jpg, png and webp, all same b/w result.

Here is the offending file: https://framerusercontent.com/images/7Nhoxwn9eWYrqKjEewfXutR90U.png?scale-down-to=1024 (can't attach it, not supported format on github). If the link becomes unavailable, it is the small top left logo on https://www.comfy.org/ and the output of the conversion looks like this:

comfy

The expected output from another online converter (https://www.freeconvert.com/avif-to-png) was this:

comfy-2

I have not tested other files, just reporting what I found in this one case. Here is the docker logs attempting convert to webp:

morphos-server-1  | 2025/01/04 13:34:54 "POST http://10.0.3.100:6080/format HTTP/1.1" from 172.16.3.10:50020 - 200 611B in 10.194979ms
morphos-server-1  | 2025/01/04 13:34:59 compiled command: ffmpeg -i /tmp/1417577814.webp /tmp/qFpiMGQ9zm.webp -y
morphos-server-1  | ffmpeg version 7.0.2-3 Copyright (c) 2000-2024 the FFmpeg developers
morphos-server-1  |   built with gcc 14 (Debian 14.2.0-2)
morphos-server-1  |   configuration: --prefix=/usr --extra-version=3 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
morphos-server-1  |   libavutil      59.  8.100 / 59.  8.100
morphos-server-1  |   libavcodec     61.  3.100 / 61.  3.100
morphos-server-1  |   libavformat    61.  1.100 / 61.  1.100
morphos-server-1  |   libavdevice    61.  1.100 / 61.  1.100
morphos-server-1  |   libavfilter    10.  1.100 / 10.  1.100
morphos-server-1  |   libswscale      8.  1.100 /  8.  1.100
morphos-server-1  |   libswresample   5.  1.100 /  5.  1.100
morphos-server-1  |   libpostproc    58.  1.100 / 58.  1.100
morphos-server-1  | Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/1417577814.webp':
morphos-server-1  |   Metadata:
morphos-server-1  |     major_brand     : avif
morphos-server-1  |     minor_version   : 0
morphos-server-1  |     compatible_brands: avifmif1miaf
morphos-server-1  |   Duration: N/A, start: 0.000000, bitrate: N/A
morphos-server-1  |   Stream #0:0[0x1]: Video: av1 (libdav1d) (Main) (av01 / 0x31307661), gray(pc), 1016x1024 [SAR 1:1 DAR 127:128], 1 fps, 1 tbr, 1 tbn (default)
morphos-server-1  |   Stream #0:1[0x2]: Video: av1 (libdav1d) (High) (av01 / 0x31307661), yuv444p(pc, smpte170m/bt709/iec61966-2-1), 1016x1024 [SAR 1:1 DAR 127:128], 1 fps, 1 tbr, 1 tbn
morphos-server-1  | Stream mapping:
morphos-server-1  |   Stream #0:0 -> #0:0 (av1 (libdav1d) -> webp (libwebp_anim))
morphos-server-1  | Press [q] to stop, [?] for help
morphos-server-1  | Output #0, webp, to '/tmp/qFpiMGQ9zm.webp':
morphos-server-1  |   Metadata:
morphos-server-1  |     major_brand     : avif
morphos-server-1  |     minor_version   : 0
morphos-server-1  |     compatible_brands: avifmif1miaf
morphos-server-1  |     encoder         : Lavf61.1.100
morphos-server-1  |   Stream #0:0: Video: webp, bgra(pc, gbr/unknown/unknown, progressive), 1016x1024 [SAR 1:1 DAR 127:128], q=2-31, 200 kb/s, 1 fps, 1k tbn (default)
morphos-server-1  |       Metadata:
morphos-server-1  |         encoder         : Lavc61.3.100 libwebp_anim
morphos-server-1  | [libwebp_anim @ 0x55b53bab3e40] Using libwebp for RGB-to-YUV conversion. You may want to consider passing in YUV instead for lossy encoding.
morphos-server-1  | [out#0/webp @ 0x55b53bab9e40] video:7KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.000000%
morphos-server-1  | frame=    1 fps=0.0 q=-0.0 Lsize=       7KiB time=00:00:01.00 bitrate=  54.7kbits/s speed=14.6x    
morphos-server-1  | 2025/01/04 13:35:00 "POST http://10.0.3.100:6080/upload HTTP/1.1" from 172.16.3.10:49988 - 200 1417B in 184.02738ms
morphos-server-1  | 2025/01/04 13:35:01 "GET http://10.0.3.100:6080/modal?filename=comfy.webp&filetype=image HTTP/1.1" from 172.16.3.10:50020 - 200 697B in 147.787µs
morphos-server-1  | 2025/01/04 13:35:01 "GET http://10.0.3.100:6080/files/comfy.webp HTTP/1.1" from 172.16.3.10:49988 - 200 6840B in 189.884µs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions