[gdal-dev] AVIF write support
Andrew C Aitchison
andrew at aitchison.me.uk
Tue Oct 7 04:00:35 PDT 2025
On Sun, 5 Oct 2025, Stefan Gofferje via gdal-dev wrote:
>>> I would have a use case for AVIF tiles in a pipeline for creating xyz
>>> tiles from satellite imagery but it seems, as of now, gdal doesn't support
>>> AVIF writing. Are there any plans to implement that?
On 10/5/25 12:09, Andrew C Aitchison via gdal-dev wrote:>>
>> ??
>>
>> # gdalinfo --version
>> GDAL 3.10.2, released 2025/02/11
>> # gdalinfo --formats | egrep -i "avif|support"
>> Supported Formats: (ro:read-only, rw:read-write, +:update, v:virtual-I/O
>> s:subdatasets)
>> AVIF -raster- (rwvs): AV1 Image File Format (*.avif)
>>
>> which suggests to me that GDAL *does* support writing AVIF files.
On Tue, 7 Oct 2025, Stefan Gofferje wrote privately:
> ┌─[sgofferj at enterprise][~]
> └──▪ gdalinfo --formats | egrep -i "avif|support"
> Supported Formats: (ro:read-only, rw:read-write, +:write from scratch,
> u:update, v:virtual-I/O s:subdatasets)
> AVIF_HEIF -raster- (rov): AV1 Image File Format (using libheif) (*.avif)
> ┌─[sgofferj at enterprise][~]
> └──▪ gdalinfo --version
> GDAL 3.11.4 "Eganville", released 2025/09/04
>
> Ubuntu 24.04, installed via gdal install script.
Hmm. I am on Ubuntu 25.10. The gdal installed from the Ubuntu .deb
supports writing AVIF with the AVIF driver.
... but I have built 3.10.2 with GCC and with Clang and only the Clang
version has the AVIF driver. Something odd is going on.
I see the following in frmts/heif/heifdataset.cpp
// If the AVIF dedicated driver is not available, register an AVIF driver,
// called AVIF_HEIF, based on libheif, if it has AV1 decoding capabilities.
if (heif_have_decoder_for_format(heif_compression_AV1))
{
poDriver->SetMetadataItem("SUPPORTS_AVIF", "YES", "HEIF");
poDriver->SetMetadataItem("SUPPORTS_AV1", "YES", "HEIF");
}
if (heif_have_encoder_for_format(heif_compression_AV1))
{
poDriver->SetMetadataItem("SUPPORTS_AV1_WRITE", "YES", "HEIF");
}
so you have been doubly unlucky;
firstly the AVIF dedicated driver is not available and
secondly your HEIF library has readonly AVIF suport.
--
Andrew C. Aitchison Kendal, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list