Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-avif

> 开发工具
Open source

:art: Go AVIF library

342 stars0 likes2 views
WebsiteGitHub

About

:art: Go AVIF library

go-avif

go-avif implements AVIF (AV1 Still Image File Format) encoder for Go using libaom, the high quality AV1 codec.

Requirements

Make sure libaom is installed. On typical Linux distro just run:

Debian (and derivatives):

bash
sudo apt-get install libaom-dev

RHEL (and derivatives):

bash
sudo dnf install libaom-devel

Usage

To use go-avif in your Go code:

go
import "github.com/Kagami/go-avif"

To install go-avif in your $GOPATH:

bash
go get github.com/Kagami/go-avif

For further details see GoDoc documentation.

Example

…

CLI

go-avif comes with handy CLI utility avif. It supports encoding of JPEG and PNG files to AVIF:

bash
# Compile and put avif binary to $GOPATH/bin
go get github.com/Kagami/go-avif/...

# Encode JPEG to AVIF with default settings
avif -e cat.jpg -o kitty.avif

# Encode PNG with slowest speed
avif -e dog.png -o doggy.avif --best -q 15

# Lossless encoding
avif -e pig.png -o piggy.avif --lossless

# Show help
avif -h

Static 64-bit builds for Windows, macOS and Linux are available at releases page. They include latest libaom from git at the moment of build.

Display

To display resulting AVIF files take a look at software listed here. E.g. use avif.js web viewer.

License

go-avif is licensed under CC0.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goav1avifcligolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具