# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.4.2
- **来源摘要:** Library for encoding and decoding .avif files
- **主页:** <https://github.com/AOMediaCodec/libavif>
- **仓库:** <https://github.com/AOMediaCodec/libavif>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.4.2
## 项目历史与用法

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
