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
{{ message }}
Repository navigation
AVIF: "Error: source: bad seek to ..." with 0.28.1 #2688
What is the expected behaviour?
With sharp 0.27.2, an output image is correctly generated and null is logged to the console. With sharp 0.28.1, the bad seek error is logged. An output file is present but appears to be empty.
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
See above.
Are you able to provide a sample image that helps explain the problem?
See attached.
What is the output of running npx envinfo --binaries --system?
@lovell ahhh ok, thanks for checking this. My confusion was having a previously working test in a package that depends on sharp fail when I tried to drop the newer version in. Just for my own understanding, does it blow up the size of the libraries to have the additional bit depths?
Definitely think a more specific error message wouold be really helpful, although I appreciate arranging something specific for this case could be a challenge. I was a little surprised that an empty file would be written, but I guess that is because the error actually comes out of the stream as it sees bytes that aren't understood (and as it happens the way it's used in the dependent module wouldn't result in this).
Yes, not supporting higher bit depths reduces the binary size of the aom dependency by ~30%. Output AVIF images from sharp/libvips were and still are always 8-bit per channel.
Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again.
It looks like libheif generates a "warning" for this image with the message Unspecified: Success (2.0) so that's probably the first thing to fix.
@Zutatensuppe Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again.
Reacted by Zutatensuppe, lllleonnnn and Oleguer Llopart
Reacted by Zutatensuppe, Hara Kang and Oleguer Llopart
Activity
lovell commentedon May 2, 2021
This looks like a 10-bit AVIF image.
Please see the changelog for v0.28.0 at https://sharp.pixelplumbing.com/changelog#v0280---29th-march-2021
We should probably try to improve the error messaging, which is likely to involve a libvips or libheif change.
alexjeffburke commentedon May 2, 2021
@lovell ahhh ok, thanks for checking this. My confusion was having a previously working test in a package that depends on sharp fail when I tried to drop the newer version in. Just for my own understanding, does it blow up the size of the libraries to have the additional bit depths?
Definitely think a more specific error message wouold be really helpful, although I appreciate arranging something specific for this case could be a challenge. I was a little surprised that an empty file would be written, but I guess that is because the error actually comes out of the stream as it sees bytes that aren't understood (and as it happens the way it's used in the dependent module wouldn't result in this).
lovell commentedon May 2, 2021
Yes, not supporting higher bit depths reduces the binary size of the aom dependency by ~30%. Output AVIF images from sharp/libvips were and still are always 8-bit per channel.
Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again.
It looks like libheif generates a "warning" for this image with the message
Unspecified: Success (2.0)so that's probably the first thing to fix.Update sharp to ~0.28.0
lovell commentedon May 8, 2021
PR to improve the libheif error messaging at strukturag/libheif#497
Zutatensuppe commentedon Dec 21, 2023
any hope of getting images with bit depth 10 supported? (by default)
lovell commentedon Dec 21, 2023
@Zutatensuppe Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again.