2. AVIF is a better codec with better compression, bit depth and hardware decode support.
Without specifics of hardware it’s hard to know.
2. AVIF is not a codec but a container. Webm also can contain AV1 video (but usually contains VP9). Also, difference between VP9 and AV1 is not that huge to be noticable on small gif-like animated pictures
> Why .avifs when we have .webps already?
Webp and avif are both image containers, both of which support animated images. The key difference here between avif|mp4 and webp|webm is the mime type and the associated UX with each of these. Image types are presented without controls, and are looping by default if they have multiple frames. Video types are presented with controls and with many other options.
It's a good question as to why avif though. Webp is entirely sufficient in most situations. Where AV1 as a codec shines is for more advanced compression, which may not be necessary for a simple looped gif-analog, but you'll still get some gains. The gains come at a processing speed tradeoff though, so they're good to use when you have advanced hardware on a low-bandwidth connection. I personally don't find the tradeoff worth it, so all of my media encoding pipelines opt for webp/webm by default.
<video autoplay muted loop playsinline preload="auto">
<source src="video.mp4" type="video/mp4">
</video>
If you can't host the video yourself get a hoster that offers a link to the video file (e.g. Vimeo).I'm looking at you, Reddit o_O
0xy•6d 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•6d ago
0xy•6d ago
socalgal2•6d ago
Checking, neither AVIF with transparency nor WebM with transparency are suppored in Safari ... sigh
0xy•5d ago
Imustaskforhelp•6d 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•6d ago
If you're interested in video, you might be interested to know that AV2 is in development.
Imustaskforhelp•6d 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?
SquareWheel•6d ago
For the moment, I don't really mind if it requires more GPU power to encode media, since it only needs to happen once. I expect it will still be possible on a weaker card, but it would just take longer.
adzm•6d ago