The libavif package contains a library used for encoding and decoding AVIF files.
![[Note]](../images/note.png)
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Download (HTTP): https://github.com/AOMediaCodec/libavif/archive/v1.0.2/libavif-1.0.2.tar.gz
Download MD5 sum: ed7933a50b490c3eccef552e0e0602df
Download size: 10 MB
Estimated disk space required: 16 MB
Estimated build time: less than 0.1 SBU
Install libavif by running the following commands:
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DAVIF_CODEC_AOM=ON \
-DAVIF_BUILD_GDK_PIXBUF=ON \
-G Ninja .. &&
ninjaThis package does come with a test suite, but it requires gtest, which is not part of BLFS.
Now, as the root user:
ninja install
The AV1 format needs to be added to the loaders cache. As the
root user:
gdk-pixbuf-query-loaders --update-cache
-DAVIF_CODEC_AOM=ON: This switch enables using
the AOM codec. This package is useless without at least one codec
built in.
-DAVIF_BUILD_GDK_PIXBUF=ON: This switch builds
the AVIF loader for applications which use gdk-pixbuf. Remove it if you
have not installed gdk-pixbuf-2.42.10.
-DAVIF_CODEC_DAV1D=ON: Use this switch if you have
installed libdav1d
and wish to use it as a codec.
-DAVIF_CODEC_RAV1E=ON: Use this switch if you have
installed rav1e and
wish to use it as a codec.
-DAVIF_CODEC_SVT=ON: Use this switch if you have
installed svt-av1
and wish to use it as a codec.