file in abyss
フォーマット一覧へ戻る

Image

AVIF AV1 Image File Format

AV1圧縮画像をISO BMFFコンテナに格納する画像形式。高圧縮なWeb画像として使われます。

Extensions .avif
MIME image/avif

マジックナンバー

ファイルを解析
オフセット 4 ISO BMFF file type box
66 74 79 70
ftyp

構造

  1. ftyp box
  2. meta box
  3. Item properties
  4. AV1 item data

注意点

  • HEIF/HEICなども同じISO BMFF系なので、ftypのブランド確認が必要です。

判定コード例

SIGNATURE = bytes.fromhex("66747970")
OFFSET = 4

def is_avif(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

実践的な使い方

ユースケース

AV1 Image File Format は画像のプレビュー、サムネイル、メタデータ確認、アップロード検証などで広く使われます。解像度・アルファ・圧縮・ファイルサイズが実装の挙動に影響するため、複数のサイズでテストしてください。

よくある判定ミス

  • .avif という拡張子だけではファイルの中身を保証できません。アップロードや変換の処理では、拡張子・MIMEタイプ・先頭バイト・形式固有の構造チェックを組み合わせるべきです。
  • AV1 Image File Format は 66 74 79 70 のようなシグネチャで始まりますが、関連するコンテナや破損ファイルでは追加の検証が必要になる場合があります。

セキュリティ上の注意

メディアファイルも、壊れたメタデータ・極端な寸法・長い再生時間・異常なチャンクでデコーダに負荷をかけることがあります。処理前にサイズ・寸法・長さを読み取ってください。

サンプルの活用

11 個のサンプルで、極小画像・高解像度画像・アルファチャンネル・圧縮しにくいアセットをテストできます。

サンプルファイル

11 / 11 files
Sample Traits Size Source / license / SHA-256
Blue Sky AVIF preview

Blue Sky AVIF

Blue Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 96 x 72. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.avif
Resolution 96 x 72 7 Kpx
Preview
1.1 KB
SHA-256 8a0a2757408cae6bdb999ded923210cb2e03050e4c493c82ab00329cd287724f
Download
Flower Garden AVIF preview

Flower Garden AVIF

Flower Garden AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 160 x 90. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.avif
Resolution 160 x 90 14 Kpx
Preview
4.6 KB
SHA-256 63ca2ed1b3b5affa91a5a29da9dcf6e68e2fd49b06ce9172a23c9ce37e9ca122
Download
Navy Blue Sky AVIF preview

Navy Blue Sky AVIF

Navy Blue Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 256 x 128. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.avif
Resolution 256 x 128 33 Kpx
Preview
1.4 KB
SHA-256 2a063d12422e346f9b14c0e120aec94c55b85427af018385d1f8f5a8a742b60a
Download
Nature of the Sky AVIF preview

Nature of the Sky AVIF

Nature of the Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 360 x 270. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.avif
Resolution 360 x 270 97 Kpx
Preview
1.1 KB
SHA-256 be183d737210b98ff1851872fafabdfddf06f994f10d6f903cc270c87db169d4
Download
Sky Landscape AVIF preview

Sky Landscape AVIF

Sky Landscape AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 512 x 384. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.avif
Resolution 512 x 384 197 Kpx
Preview
11 KB
SHA-256 3ecf61a6fa1ad8b0cfd36023c3f7b4e74cdd9cc596afd12c922d492ab62a05cb
Download
Starry Sky AVIF preview

Starry Sky AVIF

Starry Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 720 x 480. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.avif
Resolution 720 x 480 346 Kpx
Preview
2.1 KB
SHA-256 e98d7442eb39abc4ec72980c7a9990678cb92dcab5400bff1d61332fd9d04d33
Download
Blue Night Sky AVIF preview

Blue Night Sky AVIF

Blue Night Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 960 x 640. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.avif
Resolution 960 x 640 614 Kpx
Preview
82 KB
SHA-256 e2864c1530e5df65cb90bafd61a44d58e945d711807ad2e5ff297d3e0c8964e3
Download
Hibiscus Flower AVIF preview

Hibiscus Flower AVIF

Hibiscus Flower AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 591 x 1280. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.avif
Resolution 591 x 1280 756 Kpx
Preview
106 KB
SHA-256 6d091d0f9cd9cb575f5a86be0bb896ede82bd0208cb0d4bd2ea500c46fe58203
Download
Arctic Sky AVIF preview

Arctic Sky AVIF

Arctic Sky AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 1600 x 1063. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.avif
Resolution 1600 x 1063 1.7 MP
Preview
39 KB
SHA-256 de02099cae1fc520cbc3e76732e73b487bfa9f736ef6d723e6a1d73f1ecc7da2
Download
Sunset Rays AVIF preview

Sunset Rays AVIF

Sunset Rays AVIF is a AV1 Image File Format sample based on Wikimedia Commons, 720 x 515. It can be used to test downloads, parsers, previews, and file type detection.

10-sunset-rays.avif
Resolution 720 x 515 371 Kpx
Preview
12 KB
SHA-256 eca0c5c016d0982ddaa50436ca13f71259dc6f8c1af9846647dd730be9f0bf6c
Download
NASA Blue Marble AVIF preview

NASA Blue Marble AVIF

NASA Blue Marble AVIF is a AV1 Image File Format sample based on NASA Image and Video Library, 640 x 640. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.avif
Resolution 640 x 640 410 Kpx
Preview
46 KB
SHA-256 99babdbefe84976c0c8c5ceae8bebc51d91e050179c334dde30583453bfbe22e
Download

よくある質問

AV1 Image File Format のマジックナンバー(ファイルシグネチャ)は?

AV1 Image File Format ファイルはバイトシグネチャ 66 74 79 70 ("ftyp") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。

AV1 Image File Format のMIMEタイプは?

AV1 Image File Format のMIMEタイプは image/avif です。

AV1 Image File Format の拡張子は?

AV1 Image File Format ファイルは .avif 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。

関連フォーマット