Very cool. I didn't know that AVIFs had a full alpha layer, which seems to imply that we now have a format that can do animation AND transparency at reasonable file sizes in all modern browsers.
Perhaps I have a niche use case but I need to display animated images (or video) that has adaptive transparency (meaning the transparent area changes, for example think of a bonfire with smoke as an isolated object).
Previously I was using some Frankenstein setup with old encoders so I could feature detect and serve either WebMs (which have animation+transparency) or Apple ProRes for Safari (because Safari does support WebM, but not the full spec). Frustrating, and a workflow nightmare!
singpolyma3•1h ago
WebP also has animation and transparency does it not?
0xy•1h ago
That's a good alternative however I need full programmatic control (start/stop/events). You can't do that with images.
Imustaskforhelp•1h ago
(A little off topic?) but your comment made me appreciate AVIF.
Now if I may ask as I am not familiar with the encoder space but how good would AVIF be for say video streaming.
Like If I may ask, what's the best encoder for video live streaming in general (and is AVIF within the picture?) and an additional question being which is a good format for text based videos where there might be a huge amount of texts which might change (think a person showing terminal etc.), yes one can have a direct change of text which could be the most efficient and I am just asking it out of curiosity but what would be the second best option?
linolevan•1h ago
You have the right intuition – AVIF is an image format based on the encoder for AV1 (which is a really, really good video codec).
If you're interested in video, you might be interested to know that AV2 is in development.
Imustaskforhelp•11m ago
> If you're interested in video, you might be interested to know that AV2 is in development.
Oh interesting to know that! What would be the differences between Av1 and AV2?
AV2 delivers 30% better compression efficiency than AV1, which already compresses 30% better than HEVC (H.265).
AV2 encoding demands 2-3 times more computational power than AV1, requiring advanced hardware like RTX 5090 for practical use.
AV2 will officially release by end of 2025, with widespread hardware support expected around 2027 or later.
AV2 introduces advanced features like split-screen delivery, enhanced AR/VR support, and dynamic bitrate switching for adaptive streaming.
88% of AOMedia members plan to implement AV2 within two years, despite infrastructure and hardware compatibility challenges.
If there's any other difference then let me know too but Honestly a bit curious but it mentions that it requires RTX 5090
Wouldn't this be a little bad for the market too? Sure it compresses 30% more but not everybody has rtx 5090
Are we gonna see multi codec in things like say netflix where to devices which don't support av2 will be sent av1 but they would prefer to send av2 if the hardware category is matched?
adzm•27m ago
AVIF frames are independent; you'd want an actual video codec for streaming. AV1 is probably the most advanced video codec that has wide support.
throwaway09809•1h ago
I wish avif images had more reasonable computational requirements. I find the format inferior to jpeg-xl but the difference isn’t that huge - both are good enough imo. Sadly a folder full of avif files will make pretty much any consumer cpu in existence chug like mad, it’s completely unusable for actually using those images as an average end user does unless you happen to have something silly like 64 core epyc.
jxl is already slower than I’d like, but it’s good enough on a modern machine. avif… isn’t.
mrbluecoat•1h ago
This is exactly my experience. On paper and in laboratory settings with 64-core machines and 128GB memory, AV1/AVIF is better in every way but in the real world it's too taxing on ordinary hardware.
james-bcn•1h ago
What is the advantage of using avif over using an MP4 file?
rchaud•34m ago
smaller file size, transparency support and circumventing autoplay restrictions on Safari.
zamadatix•32m ago
Alpha transparency is supported which you won't get with (normal) AV1 in MP4. The author seems more interested in the default behavior which seems like a waste since AV1 will do videos better.
adzm•26m ago
Since every frame is independent they can be quickly decoded
out_of_protocol•34m ago
Why .avifs when we have .webm already? Seems like overcomplicated replacement for already existing de-facto standard.
dagmx•28m ago
1. How does one say that webm is the de facto standard? It’s common but not so ubiquitous that it can’t be replaced easily.
2. AVIF is a better codec with better compression, bit depth and hardware decode support.
nine_k•6m ago
If it has better hardware decode support, why are there complaints in another thread that a folder full of avifs would slow a computer to a crawl? I'd expect hardware-accelerated decoding to be smooth and efficient.
thisislife2•5m ago
I think OP is referring to the container than the codec when they talk about .avif and .webm - https://www.webmproject.org/docs/container/ (e.g. MP4 or MKV are container formats that support multiple codec within them like OPUS, AVC, HEVEC, AV1, mp3 etc).
0xy•1h ago
Perhaps I have a niche use case but I need to display animated images (or video) that has adaptive transparency (meaning the transparent area changes, for example think of a bonfire with smoke as an isolated object).
Previously I was using some Frankenstein setup with old encoders so I could feature detect and serve either WebMs (which have animation+transparency) or Apple ProRes for Safari (because Safari does support WebM, but not the full spec). Frustrating, and a workflow nightmare!
singpolyma3•1h ago
0xy•1h ago
Imustaskforhelp•1h ago
Now if I may ask as I am not familiar with the encoder space but how good would AVIF be for say video streaming.
Like If I may ask, what's the best encoder for video live streaming in general (and is AVIF within the picture?) and an additional question being which is a good format for text based videos where there might be a huge amount of texts which might change (think a person showing terminal etc.), yes one can have a direct change of text which could be the most efficient and I am just asking it out of curiosity but what would be the second best option?
linolevan•1h ago
If you're interested in video, you might be interested to know that AV2 is in development.
Imustaskforhelp•11m ago
Oh interesting to know that! What would be the differences between Av1 and AV2?
Found a website (https://www.geekextreme.com/av1-vs-av2-video-codec/) which gave me some interesting results
AV2 delivers 30% better compression efficiency than AV1, which already compresses 30% better than HEVC (H.265). AV2 encoding demands 2-3 times more computational power than AV1, requiring advanced hardware like RTX 5090 for practical use. AV2 will officially release by end of 2025, with widespread hardware support expected around 2027 or later. AV2 introduces advanced features like split-screen delivery, enhanced AR/VR support, and dynamic bitrate switching for adaptive streaming. 88% of AOMedia members plan to implement AV2 within two years, despite infrastructure and hardware compatibility challenges.
If there's any other difference then let me know too but Honestly a bit curious but it mentions that it requires RTX 5090
Wouldn't this be a little bad for the market too? Sure it compresses 30% more but not everybody has rtx 5090
Are we gonna see multi codec in things like say netflix where to devices which don't support av2 will be sent av1 but they would prefer to send av2 if the hardware category is matched?
adzm•27m ago