The libavif package contains a library used for encoding and decoding AVIF files.
This package is known to build and work properly using an LFS 12.1 platform.
Download (HTTP): https://github.com/AOMediaCodec/libavif/archive/v1.0.4/libavif-1.0.4.tar.gz
Download MD5 sum: 8c786fd21f8757ace8cc011401e4d420
Download size: 11 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 .. &&
ninja
This 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.