Provides high level information about the AVIF container.

Clone this repo:


  1. 96f34d9 Split Get() into Identity and Features by Yannis Guyon · 8 weeks ago main
  2. c39192c Remove unused num_read_bytes by Yannis Guyon · 8 weeks ago
  3. 808a236 Remove file_size overloads by Yannis Guyon · 8 weeks ago
  4. 6b8141e Streamed input API by Yannis Guyon · 8 weeks ago
  5. ca1fb3c Abort after reading 32 sub-items by Yannis Guyon · 9 weeks ago


libavifinfo is a standalone library that can be used to extract the width, height, bit depth and number of channels from an AVIF payload.

See avifinfo.h for details on the API and avifinfo.c for the implementation. See for usage examples.


  1. How to use

    1. Build
    2. Test
  2. Development

    1. Coding style
    2. Submitting patches
  3. Bug reports

How to use

libavifinfo can be used when only a few AVIF features are needed and when linking to or including libavif is not an option. For decoding an image or extracting more features, please rely on libavif.

AvifInfoFeatures features;
if (AvifInfoGet(bytes, number_of_available_bytes, &features) == kAvifInfoOk) {
  // Use 'features.width' etc.

Note: AvifInfoGet() is designed to return the same avifImage field values as avifDecoderRead(). However libavifinfo is more permissive and may return features of images considered invalid by libavif.


avifinfo.c is written in C. To build from this directory:

mkdir build && \
cd build && \
cmake .. && \
cmake --build . --config Release


Tests are written in C++. GoogleTest is required.

mkdir build && \
cd build && \
cmake --build . --config Debug && \
ctest .


Coding style

Google C/C++ Style Guide is used in this project.

Submitting patches

If you would like to contribute to libavifinfo, please follow the steps for libaom at

Bug reports

Bug reports can be filed in the Alliance for Open Media issue tracker.