# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, scoop, zypper 安装 libavif

查看 libavif 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:libavif
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libavif
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libavif
```

  证据: MacPorts ports tree: multimedia/libavif/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libavif
```

  证据: Alpine Linux edge package indexes: libavif from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install libavif
```

  证据: Fedora Rawhide package metadata: libavif from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libavif
```

  证据: nixpkgs package indexes: pkgs/by-name/li/libavif/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libavif
```

  证据: Arch Linux sync databases: libavif from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install libavif-bin
```

  证据: Debian stable package indexes: libavif-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install avif-tools
```

  证据: openSUSE Tumbleweed package metadata: avif-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/libavif
```

  证据: Scoop official bucket manifest trees: bucket/libavif.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:libavif
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libavif>
- **版本:** 1.4.2
- **来源摘要:** Library for encoding and decoding .avif files
- **主页:** <https://github.com/AOMediaCodec/libavif>
- **仓库:** <https://github.com/AOMediaCodec/libavif>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.4.2.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- avifdec (cli)
- avifenc (cli)
- avifgainmaputil (cli)
- avifdec (别名)
- avifenc (别名)
- avifgainmaputil (别名)

## 依赖

- aom
- dav1d
- jpeg-turbo
- libpng

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.4.2
- 本地数据: OK
- 上游仓库: https://github.com/AOMediaCodec/libavif
- 检测到的最新版本: v1.4.2 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

libavif is AOMedia's portable C implementation of the AV1 Image File Format. It provides the library API plus the `avifenc` and `avifdec` command-line tools used to encode, decode, inspect, and test AVIF images.

### 项目历史

The project was created around the AVIF specification, which maps AV1 image payloads into an ISO base media file format container. The repository copyright text names Joe Drago in 2019, and the codebase grew into an AOMedia-hosted implementation with codec back ends for libaom, dav1d, libgav1, rav1e, and SVT-AV1.

The changelog shows the project moving from fast-moving 0.x releases into a 1.0.0 release on 2023-08-24, where the maintainers stated the ABI would be more stable from that point. Later releases added gain-map work, image-sequence handling, stricter parsing, and build/dependency refinements.

### 采用历史

libavif became the practical Unix package for AVIF batch conversion because it ships simple tools and a small C API. Its README documents package-manager installation across Homebrew, MacPorts, Debian-style systems, Red Hat-style systems, MSYS2, and Windows via vcpkg or release binaries.

### 使用方式

Users commonly run `avifenc` to convert JPEG, PNG, or Y4M input to AVIF and `avifdec` to decode AVIF output back to common image formats. Developers link the library when they need AVIF support without embedding the full details of AV1 codec selection, metadata handling, tiling, alpha, gain maps, and color conversion.

### 为什么软件包爱好者会关心

libavif is the tiny command-line face of a much larger codec ecosystem. Package maintainers care about it because optional codec dependencies change feature coverage, performance, binary size, and patent-policy comfort while the same `avifenc` and `avifdec` commands appear in scripts and image pipelines.

### 时间线

- 2019: Repository license text records Joe Drago copyright for libavif.
- 2020: Version 0.8.0 adds image sequence encoding and related codec-layer refactoring.
- 2023: Version 1.0.0 marks a more stable ABI.
- 2024: Version 1.1.0 adds experimental gain-map API work.
- 2025: Version 1.2.0 installs `avifgainmaputil` and turns on gain-map API support.
- 2026: Version 1.4.2 requires C11 for compilation while keeping public headers C99.

### Related projects

- AV1 Image File Format, libaom, dav1d, libgav1, rav1e, SVT-AV1, libyuv, libjpeg, libpng, and image conversion pipelines are the main adjacent projects.

### 来源

- <https://aomediacodec.github.io/av1-avif/>
- <https://github.com/AOMediaCodec/libavif>
- <https://raw.githubusercontent.com/AOMediaCodec/libavif/main/CHANGELOG.md>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libavif
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - libavif-bin - 1.2.1-1.2: normalized package name match | Debian stable package indexes: libavif-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for handling .avif files (utilities) | https://github.com/AOMediaCodec/libavif
- Debian apt - libavif-dev - 1.2.1-1.2: normalized package name match | Debian stable package indexes: libavif-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for handling .avif files (development files) | https://github.com/AOMediaCodec/libavif
- Debian apt - libavif-gdk-pixbuf - 1.2.1-1.2: normalized package name match | Debian stable package indexes: libavif-gdk-pixbuf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for handling .avif files (GDK pixbuf plugin) | https://github.com/AOMediaCodec/libavif
- Debian apt - libavif16 - 1.2.1-1.2: normalized package name match | Debian stable package indexes: libavif16 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for handling .avif files | https://github.com/AOMediaCodec/libavif
- Nix - libavif: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libavif/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libavif-bin - 1.0.4-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: libavif-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for handling .avif files (utilities) | https://github.com/AOMediaCodec/libavif
- Ubuntu apt - libavif-dev - 1.0.4-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: libavif-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for handling .avif files (development files) | https://github.com/AOMediaCodec/libavif
- Ubuntu apt - libavif-gdk-pixbuf - 1.0.4-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: libavif-gdk-pixbuf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for handling .avif files (GDK pixbuf plugin) | https://github.com/AOMediaCodec/libavif
- Ubuntu apt - libavif16 - 1.0.4-1ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: libavif16 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for handling .avif files | https://github.com/AOMediaCodec/libavif
- apk - libavif - 1.4.2-r0: normalized package name match | Alpine Linux edge package indexes: libavif from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for encoding and decoding .avif files | https://aomediacodec.github.io/av1-avif/
- apk - libavif-apps - 1.4.2-r0: normalized package name match | Alpine Linux edge package indexes: libavif-apps from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for encoding and decoding .avif files | https://aomediacodec.github.io/av1-avif/
- apk - libavif-dev - 1.4.2-r0: normalized package name match | Alpine Linux edge package indexes: libavif-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Library for encoding and decoding .avif files (development files) | https://aomediacodec.github.io/av1-avif/
- dnf - libavif - 1.3.0-4.fc44: normalized package name match | Fedora Rawhide package metadata: libavif from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Library for encoding and decoding .avif files | https://github.com/AOMediaCodec/libavif
- dnf - libavif-devel - 1.3.0-4.fc44: normalized package name match | Fedora Rawhide package metadata: libavif-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for libavif | https://github.com/AOMediaCodec/libavif
- dnf - libavif-tools - 1.3.0-4.fc44: normalized package name match | Fedora Rawhide package metadata: libavif-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Tools to encode and decode AVIF files | https://github.com/AOMediaCodec/libavif
- pacman - libavif - 1.4.2-1: normalized package name match | Arch Linux sync databases: libavif from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Library for encoding and decoding .avif files | https://github.com/AOMediaCodec/libavif


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://pkg.so/zh-hans/media-graphics-tools/) - Matched media, image, audio, video, or graphics metadata.
- [libpng](https://pkg.so/zh-hans/brew/libpng/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://pkg.so/zh-hans/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [dav1d](https://pkg.so/zh-hans/brew/dav1d/) - Runtime dependency declared by Homebrew.
- [aom](https://pkg.so/zh-hans/brew/aom/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [gd](https://pkg.so/zh-hans/brew/gd/) - Popular package that depends on this formula.
- [chafa](https://pkg.so/zh-hans/brew/chafa/) - Popular package that depends on this formula.
- [mapnik](https://pkg.so/zh-hans/brew/mapnik/) - Popular package that depends on this formula.
- [webkitgtk](https://pkg.so/zh-hans/brew/webkitgtk/) - Popular package that depends on this formula.
- [libsail](https://pkg.so/zh-hans/brew/libsail/) - Popular package that depends on this formula.
- [jxrlib](https://pkg.so/zh-hans/brew/jxrlib/) - Shares pkgdb curated category or tags: cli, decoder, encoder, image-codec, image-codecs.
- [libheif](https://pkg.so/zh-hans/brew/libheif/) - Shares pkgdb curated category or tags: avif, cli, decoder, encoder, image-codec.
- [djvulibre](https://pkg.so/zh-hans/brew/djvulibre/) - Shares pkgdb curated category or tags: cli, decoder, encoder, library, media.
- [jpeg-xl](https://pkg.so/zh-hans/brew/jpeg-xl/) - Shares pkgdb curated category or tags: cli, decoder, encoder, image-codec, media.
- [jasper](https://pkg.so/zh-hans/brew/jasper/) - Shares pkgdb curated category or tags: cli, image-codec, library, media.
- [musepack](https://pkg.so/zh-hans/brew/musepack/) - Shares pkgdb curated category or tags: cli, decoder, encoder, media.
- [libmpeg2](https://pkg.so/zh-hans/brew/libmpeg2/) - Shares pkgdb curated category or tags: cli, decoder, library, media.
- [openexr](https://pkg.so/zh-hans/brew/openexr/) - Shares pkgdb curated category or tags: cli, library, media.
- [grokj2k](https://pkg.so/zh-hans/brew/grokj2k/) - Both packages work with overlapping file formats or content types. Shared terms: cli, codec, image, image-codec, jpeg.
- [jbig2enc](https://pkg.so/zh-hans/brew/jbig2enc/) - Both packages work with overlapping file formats or content types. Shared terms: cli, encoder, image, jpeg, jpeg-turbo.

## Combined YAML source

View the package source record on GitHub. [combined/libavif.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libavif.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
