Skip to content

Commit

Permalink
Optimize AVIF assets
Browse files Browse the repository at this point in the history
The `animated-avif.avif` and `green.avif` files are generated as follows:

```sh
ffmpeg -loglevel error -hide_banner -f lavfi -i color=red:2x2 -frames:v 1 -y /tmp/red.png;
ffmpeg -loglevel error -hide_banner -f lavfi -i color=green:2x2 -frames:v 1 -y /tmp/green.png;
avifenc --duration 1 /tmp/red.png --duration 1800 /tmp/green.png /tmp/animated-avif.avif;
avifenc --duration 1 /tmp/green.png /tmp/green.avif;
```

Allow differences of up to 3 per color channel
  • Loading branch information
mathiasbynens committed Sep 30, 2022
1 parent 741d640 commit 6f2cab7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion animated-avif/animated-avif-timeout.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<html class="reftest-wait">
<title>Animated AVIF: Second frame displays quickly, replacing red with green.</title>
<link rel="match" href="animated-avif-timeout-ref.html"/>
<img src=../images/animated-avif.avif onload="loaded()"/>
<meta name="fuzzy" content="maxDifference=3">
<img src="../images/animated-avif.avif" onload="loaded()"/>
<script>
function loaded() {
setTimeout(function() {
Expand Down
Binary file modified images/animated-avif.avif
Binary file not shown.
Binary file modified images/green.avif
Binary file not shown.

0 comments on commit 6f2cab7

Please sign in to comment.