Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. libavif

libavif

NOASSERTIONCv1.4.1

A portable C library for encoding and decoding AV1 Image File Format (.avif) images with support for all AV1 YUV formats and alpha.

GitHubGitHub
2.1k stars281 forks0 contributors

What is libavif?

libavif is a C library for encoding and decoding images in the AV1 Image File Format (AVIF). It provides a standardized way to leverage the AV1 video codec for high-efficiency image compression, enabling smaller file sizes with better quality than traditional formats like JPEG and PNG. The library supports all AV1 YUV formats, bit depths, and alpha channels, making it suitable for modern image processing needs.

Target Audience

Developers and engineers working on multimedia applications, web services, or tools that require efficient image compression and support for the AVIF format. It is particularly relevant for those integrating AVIF support into software, creating image conversion utilities, or optimizing media delivery pipelines.

Value Proposition

Developers choose libavif because it is a portable, well-tested reference implementation of the AVIF standard with support for multiple AV1 codec backends. Its permissive BSD license, comprehensive feature set, and included command-line tools make it a reliable and flexible choice for adding AVIF capabilities without vendor lock-in.

Overview

libavif - Library for encoding and decoding .avif files

Use Cases

Best For

  • Adding AVIF support to image processing applications
  • Creating command-line tools for batch image conversion to/from AVIF
  • Integrating high-efficiency image compression into web servers or CDNs
  • Developing multimedia software that requires modern image format support
  • Researching or benchmarking AV1-based image compression techniques
  • Building cross-platform libraries that need a portable AVIF implementation

Not Ideal For

  • Projects needing quick integration without build system configuration, as libavif requires CMake and manual enabling of codec dependencies.
  • Applications requiring hardware-accelerated AV1 encoding/decoding for real-time performance, as it relies on software codecs without GPU optimization.
  • Developers looking for a high-level, object-oriented API, since it's a low-level C library with minimal abstraction.
  • Environments with strict binary size constraints, due to potential bloat from linking multiple codec backends and dependencies.

Pros & Cons

Pros

Complete AVIF Compliance

Supports all AV1 YUV formats, bit depths up to 12-bit, and alpha channels per the specification, ensuring full format compatibility.

Portable C Codebase

Written in C99, it's easily integrable across platforms, evidenced by availability in package managers like apt, Homebrew, and vcpkg.

Flexible Codec Backends

Configurable support for multiple AV1 codecs like libaom, dav1d, and SVT-AV1 via CMake flags, allowing performance or licensing trade-offs.

Handy Command-Line Tools

Includes avifenc and avifdec utilities for straightforward image conversion, with examples like 'avifenc -q 75 input.jpg output.avif'.

Performance Optimizations

Optional libyuv integration accelerates color space conversions, though it requires additional setup as noted in the README.

Cons

Complex Dependency Setup

No AV1 codecs are enabled by default; users must manually configure CMake to enable at least one, and managing LOCAL vs SYSTEM dependencies can be error-prone.

Steep Learning Curve for API

As a low-level C library, it lacks high-level abstractions, and API documentation is minimal, forcing reliance on example code for integration.

Potential Build Overhead

Building all dependencies from scratch, as shown in the 'Build everything from scratch' example, is time-consuming and involves multiple external projects.

Frequently Asked Questions

Quick Stats

Stars2,051
Forks281
Contributors0
Open Issues129
Last commit4 days ago
CreatedSince 2019

Tags

#c-library#avif#command-line-tool#av1#open-standards#cross-platform#image-compression

Built With

G
GoogleTest
C
C99
C
CMake

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

DLIBDLIB

A toolkit for making real world machine learning and data analysis applications in C++

Stars14,366
Forks3,453
Last commit26 days ago
libfacedetectionlibfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.

Stars12,740
Forks3,025
Last commit7 months ago
QOIQOI

The “Quite OK Image Format” for fast, lossless image compression

Stars7,472
Forks373
Last commit3 days ago
mozjpegmozjpeg

Improved JPEG encoder.

Stars5,674
Forks435
Last commit10 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub