You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
4. Addition of unit tests in sharp for aom+libheif+libvips combo to cover various dimensions and colour spaces etc.
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.)
Reacted by Aaron Silvas, Ali Rahbari, Ryan Aunur Rassyid, Jiri Spac, Michael Walsh, Sylvain Dumont, Simon Weaver, Steven, Brennanangel and Robert Einars
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.
Reacted by Aaron Silvas, Sylvain Dumont, Shwao, Petr Soukup, Jiri Spac, Robert O'Rourke, Billy Kwok, Craig Weber, Michael Walsh, Zach Leatherman and 8 more
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.
Reacted by Aaron Silvas, Jiri Spac, Martijn Saly, Billy Kwok, Aubrey, Alex, Michael Walsh, Neave Interactive, dada-amater, Tomasz Janowski and 3 more
Reacted by Jiri Spac, Robert Einars and Eivind Mikkelsen
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.
Reacted by Billy Kwok and Robert Einars
Reacted by JoeMorgan, Thorge Wandrei, Tomasz Janowski, Malte Ubl, Benjamin Rancourt, Alex, dada-amater, Sylvain Dumont, Nick Randall, Leif Niemczik and 5 more
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.
Reacted by Petr Soukup, Aaron Silvas, Malte Ubl, Kristofer Baxter, Marcus Spiegel, Billy Kwok, John Cupitt, Phumrapee Limpianchop, dada-amater, Simon Weaver and 7 more
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. 🎉
Reacted by Simon Rascovsky MD, M.Sc, Tom Gallagher, Joe Hoyle, Patrick Chong, David Murdoch, dryoma, GP, dada-amater, Steven, Matt Kane and 1 more
Reacted by George Petrov, Sylvain Dumont, Thorge Wandrei, Aaron Silvas, Adam Chalemian, Tomasz Janowski, Mark Johnson, Nikolas Evers, Neave Interactive, Frederick Hamon and 12 more
Reacted by Adam Chalemian, Mark Johnson, Petr Soukup, Zach Leatherman, GP, Joe Hoyle, Patrick Chong, David Murdoch, Albert Prat, Steven and 2 more
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.
Reacted by Andrei Igna, Simon Rascovsky MD, M.Sc, Tomasz Janowski, Mark Johnson and Matt Kane
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
Reacted by Adam Chalemian, Ali Rahbari, Michael Walsh, GP, dada-amater, Zach Leatherman, George Petrov, Steven, Simon Rascovsky MD, M.Sc, Mark Johnson and 7 more
Reacted by Adam Chalemian, GP, Zach Leatherman, Steven, dryoma, Mark Johnson, Aaron Hammer, Chris and UnKnoWn
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!
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.
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
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.
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.
Activity
lovell commentedon Jul 13, 2020
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.)
asilvas commentedon Jul 13, 2020
Thanks! I'll close.
lovell commentedon Aug 29, 2020
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.
[-]Why is HEIF experimental still?[/-][+]AVIF support in prebuilt binaries[/+]lovell commentedon Sep 6, 2020
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.
soukicz commentedon Sep 14, 2020
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 :)
lovell commentedon Sep 14, 2020
@soukicz OSS-Fuzz runs on Google's ClusterFuzz hardware, currently >25k cores of processing power.
lovell commentedon Sep 21, 2020
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.
lovell commentedon Sep 25, 2020
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.
4 remaining items
ascorbic commentedon Dec 1, 2020
@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?
tomgallagher commentedon Dec 1, 2020
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?
lovell commentedon Dec 1, 2020
@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:AndreiIgna commentedon Dec 9, 2020
When this is shipped it will make
sharpeven more helpful than already is 🎉lovell commentedon Dec 18, 2020
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. 🎉
lovell commentedon Dec 21, 2020
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):
I plan to publish this to npm as v0.27.0 tomorrow.
lovell commentedon Dec 22, 2020
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-convertfirst to ensure it is not an upstream issue - https://github.com/strukturag/libheif#example-programsjoehoyle commentedon Dec 22, 2020
Amazing, thanks so much @lovell, I had done some work to update humanmade/tachyon#130 to the
sharpbranch, sorry I didn't manage to get beta-1 testing in time. So far everything looks to be working well!lovell commentedon Dec 22, 2020
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 --helpfor usage instructions.lovell commentedon Dec 22, 2020
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
ascorbic commentedon Dec 23, 2020
That's awesome news @lovell. I'll certainly be raising this.
ascorbic commentedon Dec 27, 2020
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.
update sharp - prebuilt binaries include libaom and libheif now