Skip to content

Instantly share code, notes, and snippets.

@craftgear
Last active March 5, 2021 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craftgear/d1fb791886ce2a3a289ece936b8eeb29 to your computer and use it in GitHub Desktop.
Save craftgear/d1fb791886ce2a3a289ece936b8eeb29 to your computer and use it in GitHub Desktop.
avifについて調べたことまとめ 2021年3月時点

比較

表示

  • Chrome 85以降
  • Firefox 77以降
    • about:configでフラグを立てる必要あり

編集

  • gimp 2.10.22以降
    • cavif-rsでエンコードしたものは gimp invalid input no hdlr box というエラーで開けない
  • paint.net 4.2.2以降
    • Windowsのみ
    • cavifでエンコードしたものは開けない
    • cavif-rsでエンコードしたものは開けない

avifに変換

  • https://github.com/Kagami/go-avif
    • go実装
    • 画像が少しくすんだ感じになる
  • https://github.com/link-u/cavif
    • c実装
    • 別途libvmafの導入が必要
  • https://github.com/kornelski/cavif-rs
    • rust 実装
    • デフォルトの変換速度が一番遅い設定(=1)になっている。最速(=10)から徐々に下げていくのが良さそう。
    • go-avifのような色変化は起きない
    • カラーPNGを変換するとファイルサイズが10分の1前後になる
    • 一方、白黒2値PNGを変換するとファイルサイズが7〜8倍になる
    • 0.6.6の時点ではgimp/Windowsペイントで開けないファイルを生成する

avifから変換

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment