Skip to content

AVIF support in prebuilt binaries #2289

Closed

Description

@asilvas

AVIF is coming soon to the most popular browsers. Is there a reason this is still considered experimental and not ready for production? https://sharp.pixelplumbing.com/api-output#heif

Activity

  1. lovell commented on Jul 13, 2020

    @lovell
    Owner

    Hi Aaron, I expect to be able to include aom+libheif in the prebuilt binaries in order to support AVIF input and output, but the following things will need to exist first, in approximately this order:

    Anything you can do to help with the first two security-related items will be much appreciated.

    (The patent-encumbered HEIC codec will not be supported in the prebuilt binaries.)

  2. asilvas commented on Jul 13, 2020

    @asilvas
    Author

    Thanks! I'll close.

  3. lovell commented on Aug 29, 2020

    @lovell
    Owner

    I'm going to reopen this to become the "canonical" issue to track adding AVIF support in the prebuilt binaries.

    For anyone else coming to this issue, sharp already supports AVIF, you need to compile libvips from source with support for libheif that has been compiled with support for aom/rav1e, before installing sharp.

  4. reopened this on Aug 29, 2020
  5. changed the title [-]Why is HEIF experimental still?[/-] [+]AVIF support in prebuilt binaries[/+] on Aug 29, 2020
  6. lovell commented on Sep 6, 2020

    @lovell
    Owner

    I've created google/oss-fuzz#4414 to enable fuzz testing of AVIF images with libheif, see step 1 above. Once approved and merged, my plan is to let that run for a couple of weeks to give it a chance to find any problems and get them fixed before moving onto step 2.

  7. soukicz commented on Sep 14, 2020

    @soukicz

    my plan is to let that run for a couple of weeks to give it a chance to find any problems and get them fixed before moving onto step 2.

    Is that something that would benefit from having some monster AWS EC2 server? I don't know much C but I do have credit card :)

  8. lovell commented on Sep 14, 2020

    @lovell
    Owner

    @soukicz OSS-Fuzz runs on Google's ClusterFuzz hardware, currently >25k cores of processing power.

  9. lovell commented on Sep 21, 2020

    @lovell
    Owner

    The addition of AVIF fuzzing to libvips is now merged at google/oss-fuzz#4463 - let's see what it finds in the next few days before moving onto step 3.

  10. lovell commented on Sep 25, 2020

    @lovell
    Owner

    There's lots of interest in this issue so I'd like to remind everyone that if you work at a for-profit organisation, and you are not already doing so, then please donate to https://opencollective.com/libvips if you benefit commercially from sharp and libvips.

  11. added this to the v0.27.0 milestone on Oct 7, 2020
  12. 4 remaining items

  13. ascorbic commented on Dec 1, 2020

    @ascorbic
    Contributor

    @lovell Is there an area where time/resources could be invested to get this over the line, or is this just lots of bugs in various dependencies?

  14. tomgallagher commented on Dec 1, 2020

    @tomgallagher

    As a side issue, I had read that encoding and decoding AVIF files was very slow. Are there any performance stats on this with libvips?

  15. lovell commented on Dec 1, 2020

    @lovell
    Owner

    @ascorbic There are a number of security-related fixes in libheif and libvips awaiting release.

    There are also a couple of open bugs relating to the use of clap (clean aperture) boxes:

  16. AndreiIgna commented on Dec 9, 2020

    @AndreiIgna

    When this is shipped it will make sharp even more helpful than already is 🎉

  17. lovell commented on Dec 18, 2020

    @lovell
    Owner

    libheif v1.10.0 and libvips v8.10.5 have now been released, plus (sadly but understandably) all the pubs in London are pandemically-shut, which means we're looking at this side of Christmas for a release of sharp that includes prebuilt binaries that support AVIF. 🎉

  18. lovell commented on Dec 21, 2020

    @lovell
    Owner

    If anyone would like to test the v0.27.0-beta1 pre-release, which includes prebuilt binaries for all the usual platforms, please use the following (this doesn't require a compiler, but does involve a git checkout of the whole repo so will still be slower than an npm-published package):

    $ npm install lovell/sharp
    

    I plan to publish this to npm as v0.27.0 tomorrow.

  19. lovell commented on Dec 22, 2020

    @lovell
    Owner

    sharp v0.27.0 is now available with prebuilt binaries that contain libaom and libheif for full AVIF decoding and encoding support.

    Please note the current lack of support in most browsers for AVIF images smaller than 16x16.

    https://sharp.pixelplumbing.com/api-output#avif

    If anyone discovers a problem image, please open a new issue and provide as much information as possible, ideally trying libheif's command line tools such as heif-convert first to ensure it is not an upstream issue - https://github.com/strukturag/libheif#example-programs

  20. joehoyle commented on Dec 22, 2020

    @joehoyle

    Amazing, thanks so much @lovell, I had done some work to update humanmade/tachyon#130 to the sharp branch, sorry I didn't manage to get beta-1 testing in time. So far everything looks to be working well!

  21. lovell commented on Dec 22, 2020

    @lovell
    Owner

    Here's a basic CLI tool to quickly/easily transcode a directory of images into AVIF, which might be useful to help assess the suitability of AVIF for a particular task.

    https://www.npmjs.com/package/avif

    Run npx avif --help for usage instructions.

  22. lovell commented on Dec 22, 2020

    @lovell
    Owner

    Reminder: if you work at a for-profit organisation that benefits commercially from sharp and libvips then please tell your manager to become a backer at https://opencollective.com/libvips

  23. ascorbic commented on Dec 23, 2020

    @ascorbic
    Contributor

    Reminder: if you work at a for-profit organisation that benefits commercially from sharp and libvips then please tell your manager to become a backer at https://opencollective.com/libvips

    That's awesome news @lovell. I'll certainly be raising this.

  24. ascorbic commented on Dec 27, 2020

    @ascorbic
    Contributor

    As a note to anybody using Apple Silicon who wants AVIF support: bear in mind that before compiling libvips from source you will need to compile and install libheif and aom from source too. Using homebrew doesn't work either, and it will either fail to include AVIF support, or it will include it but fail to generate images. You must first compile and install aom from git, then compile and install libheif (checking that it has found aom when running configure), then finally compile and install libvips.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions