Hacker News new | past | comments | ask | show | jobs | submit login

What is a good way to generate AVIF from PNG on Debian?

I'm trying to use avifenc (Debian testing) and getting this:

    avifenc test.png test.avif
    ...
    Encoding with AV1 codec '(null)' speed [8], color QP [0 (Lossless) <-> 10 (High)], alpha QP [0 (Lossless) <-> 0 (Lossless)], tileRowsLog2 [0], tileColsLog2 [0], 1 worker thread(s), please wait...
    ERROR: Failed to encode image: No codec available



OK, apparently Debian ships a build without any encoder:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976349

That's weird for something that's called avifenc.


I used ImageMagick [0] just now to create a couple test images.

  magick testimage.png testimage.avif
  magick testimage.png -quality 60 testimage60.avif
[0] https://imagemagick.org/script/magick.php


Imagemagick that's packaged in Debian doesn't have avif support unfortunately. They somehow split between version 6 and version 7 which is confusing, because both are progressing in parallel but they don't have feature parity.

I can try getting version 7.


I wouldn't recommend using anything in the debian repos if you want a feature newer than 5 years old.


Are you talking about "stable" repos? Do you know anyone who sticks to those, for personal use?

(A lot of people use "testing" for reasons I have not been able to comprehend. The main difference from "unstable" is it takes a minimum of 2 weeks for fixes to show up in "testing". Or did, last I checked.)


Breakage happens less in testing. That's the main reason I'm using it vs Sid.


I don't have this problem normally, because I'm using Debian testing, not Debian stable. There is a major difference.

Also, the difference between imagemagick 6 and 7 isn't simply about being an older version.


Arch Linux, AUR, etc, tryuck Plebian!


Ah, I didn't realize that! Looking at this [0] issue thread, it seems like the minimum version with AVIF support is v7.0.25. The suggestion to use Docker in that thread might be useful for you as well, if you are interested in a couple quick tests and are already set up for containers.

[0] https://github.com/ImageMagick/ImageMagick/issues/1432#issue...


the NPM module Sharp runs on linux and it supports .avif from the version 0.27.0 Sharp Docs: https://sharp.pixelplumbing.com/ Sharp on Linux https://sharp.pixelplumbing.com/install Sharp encoding .avif https://sharp.pixelplumbing.com/api-output#avif




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: