54 points speckx 2 days ago 47 comments
DivingForGold 2 days ago | parent
ChrisArchitect 2 days ago | parent
JPEG XL vs. AVIF for web use-cases
anilgulecha 7 hours ago | parent
In terms of picture quality for given size, AVIF has it solidly beat.
mort96 7 hours ago | parent
anilgulecha 7 hours ago | parent
mort96 7 hours ago | parent
"We should use AVIF for most web images" is a different statement which I have no problem with.
smaudet 5 hours ago | parent
I'm not sure this is the right conclusion to draw...
1) The author's pain point (use case) is hardware pricing - presuming that goes down (as either AI demands drops/and or production increases), this does not speak to a demand for size, instead, it is about doing more with less...
2) I'm not certain that the exabytes of demand (assuming it comes) will be from AVIF. Rather, if data is important, I think the demand will be a different format entirely (archives, for instance). Demand for more (quality) data might paradoxically call for less compression and less cpu-intensive qualities - uncompressed, raw data, for instance. If is faster and cheaper than bothering with complex algorithms, then simpler formats should be more prevalent.
Building on 1 and 2, a more capable image format, like JPEG-XL, becomes a more logical choice, not the one that can compress the best or is the smallest (in an exa-byte-as-the-norm world).
brigade 5 hours ago | parent
For arbitrary planes, AVIF calls them auxiliary images. Unless you mean encoding non-RGB data to start with like how DNG uses JPEG-XL. At which point you're outside the scope of any standard interpretation of JPEG-XL data.
bhouston 6 hours ago | parent
Huh?
JpegXL is the only widely supported format (once it comes to the various browser as is planned) that can store true HDR linear images in floating point (fp16 and fp32) formats.
AVIF can only do 10 bit integer ranges, sure that HDR compared to 8bit but it is not sufficient for useful extended range color spaces.
brigade 4 hours ago | parent
Also AVIF supports up to 12 bits.
xnx 6 hours ago | parent
adzm 4 hours ago | parent
thekid314 7 hours ago | parent
I’ll just drop my AVIF local support for Wordpress plugin here: https://github.com/ddegner/avif-local-support
origini 7 hours ago | parent
Because whenever I download an image and its webp, the next thing i do is i google "webp to png/jpg" conversation because yeah service XY or Tool Z doesn't support it.
Or my Fire TV Stick :(
I configure my nginx to serve everything available though. Thats what i can do.
jeroenhd 6 hours ago | parent
It's been a while since Photoshop finally got support, though, I can't recall the last time webp posed a problem for me. Then again I don't use a Firestick, no idea how that would deal with image formats, I guess it's no longer being maintained?
origini 3 hours ago | parent
H265 for example. Or Dolby Vision.
nwah1 7 hours ago | parent
https://symbiogenesis.github.io/DotJpegli/
However, video would matter so much more than images, to the overall internet, that images don't even matter by comparison.
i80and 7 hours ago | parent
flerchin 7 hours ago | parent
simonw 7 hours ago | parent
I added AVIF support to my personal image resizing tool recently - https://tools.simonwillison.net/image-resize-quality - I mostly use that for screenshots though, and WebP works better for those.
TurboSkyline 7 hours ago | parent
Interesting! Better in terms of more quality preserved or smaller file size? Have you found other types of images where this applies?
sampullman 7 hours ago | parent
NelsonMinar 4 hours ago | parent
ChadNauseam 4 hours ago | parent
I have a similar tool at https://pictolab.io. I use it for tweaking the brightness and satuation of images mostly. For that you want HDR to reduce clipping, and most image formats have surprisingly bad HDR support besides AVIF (and jxl). Jpeg kinda supports it with gain maps but it's kind of tacked-on to the spec. Webp doesn't support HDR at all.
It's also surprisingly hard to support HDR input. For example, Apple uses a weird poorly documented format for the HEIC their iPhones take. I feel like HDR is just kind of a mess right now.
BorisMelnik 7 hours ago | parent
kasabali 7 hours ago | parent
Odd argument.
Image isn’t video and we are not YouTube.
d2kx 7 hours ago | parent
thisislife2 5 hours ago | parent
0x_rs 7 hours ago | parent
iknowstuff 6 hours ago | parent
Dylan16807 4 hours ago | parent
Are you looking for jpeg XL?
> and do not leverage any existing infrastructure for serving video
How would that leveraging work?
> WebP, AVIF are the webscale equivalent of serving images.
This sounds insulting? But they are images on the Web. I have no idea what you mean here.
remix2000 6 hours ago | parent
(I’m not saying I support the claims or not, I have no idea about their technical and let alone legal merit, just thinking that there are attempts at enforcement against sites streaming AV1 and whether choosing AV1 puts say my site at risk)
shmerl 6 hours ago | parent
No need to worry about these risks for using it though. You can never say that no patent troll will surface tomorrow for literally anything. That's not a reason not to use things.
chrismorgan 6 hours ago | parent
theandrewbailey 6 hours ago | parent
remix2000 3 hours ago | parent
Aldipower 6 hours ago | parent
jeroenhd 6 hours ago | parent
From my experience throwing random JPEGs at it, it's 3 to 4 times smaller, that's a good chunk of data saved, which in turn is a lot of energy saved on visitors' radios being active.
Unlike with jpeg, you don't need 85 or 95 percent on the quality score, 50 is more than good enough for most pictures on a website.
If you're hosting images and want a fully lossless encoding the CPU time may become a factor, but if you're hosting user generated content, I don't think it's all that bad. Plus, you can just move the encoding part to the user side of the equation and pretend it's part of the upload progress bar if you're desperate to pay the power bill.
Aldipower 6 hours ago | parent
jeroenhd 3 minutes ago | parent
Still, when encoding AVIF, there are various quality options to choose from, and the encoder has gotten better over the past year. On my i3-2120 NAS (which even your E5 should beat on single core perf), encoding an image at default speed takes about 4-6 seconds (JPEG about 2s), while producing an image of comparable quality a third the size. If I pass --speed 10, converting PNG to AVIF takes only half a second.
The standard AV1 encoder has improved a lot over a short amount of time, I invite you to run another benchmark, you may be surprised.
brigade 4 hours ago | parent
I don't know if anyone has published an encode time / quality comparison of the various encoders. It'd have to be recent to include this year's libaom image optimizations.
shmerl 6 hours ago | parent
kiwibyproxy 5 hours ago | parent
chrismorgan 5 hours ago | parent
Where AVIF isn’t supported, I reckon you’re better to fall back to JPEG. Everything supports JPEG, but there are still plenty of things that don’t support WebP. Anything that supports WebP now has indicated it’s open to supporting newer formats than the baseline JPEG/GIF/PNG and is almost certain to support AVIF within a few years.
xp84 4 hours ago | parent
By contrast, if you let the user upload a JPEG or even a PNG, you might pay a slightly-higher cost of the incoming bandwidth, but then you (basically for free) transform the image to the small dimensions and format you actually need, and from there the bandwidth is barely a problem.
Sidenote: End users hate WEBP because nearly any software other than web browsers still don't support even reading it, let alone outputting it (and as you pointed out, anywhere that you "upload an image" they're not welcome either).
In my incredibly shoddy testing sample of 1, my current-macOS device does open AVIFs in Preview, so that's an improvement, at least!