Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated AVIF #182

Closed
mathiasbynens opened this issue Oct 5, 2022 · 3 comments
Closed

Animated AVIF #182

mathiasbynens opened this issue Oct 5, 2022 · 3 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@mathiasbynens
Copy link

mathiasbynens commented Oct 5, 2022

Description

AV1 Image File Format (AVIF) is an image file format specification for storing images or image sequences compressed with AV1 in the HEIF container format.

Rationale

AVIF is a modern image format based on the AV1 video format. AVIF offers significant compression gains over other image formats like JPEG, WebP, PNG, and GIF. While the exact savings depend on the content, encoding settings, and quality target, Google and Netflix have seen greater than 50% savings vs. JPEG.

Although all major browsers (except for Edge) already support AVIF for still images, animated AVIF is not yet as widely supported. Until all browsers advertising AVIF support also support animations, this poses an interoperability problem where developers cannot rely on the browser to do format selection by using <picture> + <source>. Consider the following HTML, where the developer properly makes use of <picture> to let the browser pick the most appropriate image format to display an animation:

<picture>
  <source srcset="animation.avif" type="image/avif">
  <source srcset="animation.webp" type="image/webp">
  <source srcset="animation.apng" type="image/apng">
  <img src="animation.gif" width="420" height="420" alt="">
</picture>
  • In browsers with animated AVIF support, and browsers without AVIF support, this renders an animation. ✅
  • In browsers that advertise AVIF support without supporting animations, it renders a still image. ❌

Any web pages using this pattern are broken in current versions of Firefox and Safari for iOS.

Specification

https://aomediacodec.github.io/av1-avif/

Tests

WPT covers animated AVIF in the ImageDecoder tests:
https://wpt.fyi/results/webcodecs/image-decoder.https.any.html?label=experimental&label=master&aligned (Subtests: “Test multi-track AVIF image decoding”)

https://wpt.fyi/results/avif?label=experimental&label=master&aligned&view=subtest (added in web-platform-tests/wpt#36044) tests animated AVIF support without the ImageDecoder dependency.

@mathiasbynens mathiasbynens added the focus-area-proposal Focus Area Proposal label Oct 5, 2022
@gsnedders gsnedders added this to the Interop 2023 milestone Oct 5, 2022
@foolip foolip moved this to Proposed in Interop 2023 Oct 7, 2022
@foolip foolip removed this from the Interop 2023 milestone Oct 7, 2022
@foolip
Copy link
Member

foolip commented Nov 11, 2022

In the State of CSS 2022 question about browser incompatibilities, there were 6 mentions of AVIF. They were:

  • JPEGXL please! Animated AVIF please. We desperately need better standard image formats, especially on Safari which takes forever.
  • avif
  • AVIF background-image on MS Edge
  • image-set() has terrible supporty making it harder to use AVIF and JPEG XL. Nesting is also sorely needed
  • WebP, AVIF image formats
  • :has, jpegxl & avif, subgrid

So only one of those was about animated AVIF specifically. This was not enough to make the top list in #248.

Since the survey was about CSS I don't think much can be made of the small number of responses, but I'm commenting on all proposals where I could find something in the State of CSS 2022 results.

@nairnandu
Copy link
Contributor

Thank you for proposing Animated AVIF for inclusion in Interop 2023.

We wanted to let you know that this proposal was not selected to be part of Interop this year. We had many strong proposals, and could not accept them all. This should not be taken as a comment on the technology as a whole.

For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!

Posted on behalf of the Interop team.

@foolip
Copy link
Member

foolip commented Feb 6, 2023

For anyone following this issue, these are the browser engine bugs to follow for animated AVIF support:

@kypflug do you know how to follow support in Edge? I found https://learn.microsoft.com/en-us/answers/questions/809434/avif-format-not-supported-in-microsoft-edge but I don't know if that'll be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
No open projects
Status: Proposed
Development

No branches or pull requests

4 participants