.avif metadata support

Started by wywh, October 18, 2024, 01:56:46 PM

Previous topic - Next topic

wywh

What metadata is supported in .avif images?

It seems Description can be readily written to XMP while GPS and date are ignored:

exiftool -overwrite_original '-Description=Description' '-GPSLatitude*=-36.6101' '-GPSLongitude*=-66.91515' '-GPSAltitude*=119.9' '-DateTimeOriginal=2001:06:01 12:00:00' a.avif
    1 image files updated

exiftool -a -G1 -s -n a.avif
[XMP-dc]        Description                     : Description

GPS and date are written if explicitly set to XMP. macOS Sequoia 15 displays these tags.

exiftool -overwrite_original '-Description=Description' '-XMP:GPSLatitude*=-36.6101' '-XMP:GPSLongitude*=-66.91515' '-XMP:GPSAltitude*=119.9' '-XMP:DateTimeOriginal=2001:06:01 12:00:00' a.avif

exiftool -a -G1 -s -n a.avif
[XMP-dc]        Description                     : Description
[XMP-exif]      DateTimeOriginal                : 2001:06:01 12:00:00
[XMP-exif]      GPSAltitude                     : 119.9
[XMP-exif]      GPSAltitudeRef                  : 0
[XMP-exif]      GPSLatitude                     : -36.6101
[XMP-exif]      GPSLongitude                    : -66.91515

- Matti

StarGeek

Strange. It appears to be working here
C:\>exiftool -all= -P -overwrite_original "-Description=Description" "-GPSLatitude*=-36.6101" "-GPSLongitude*=-66.91515" "-GPSAltitude*=119.9" "-DateTimeOriginal=2001:06:01 12:00:00"  Y:\!temp\x\y\test.avif
    1 image files updated

C:\>exiftool -G1 -a -s -n -description -DateTimeOriginal -gps* Y:\!temp\x\y\test.avif
[XMP-dc]        Description                     : Description
[ExifIFD]       DateTimeOriginal                : 2001:06:01 12:00:00
[GPS]           GPSVersionID                    : 2 3 0 0
[GPS]           GPSLatitudeRef                  : S
[GPS]           GPSLatitude                     : 36.6101
[GPS]           GPSLongitudeRef                 : W
[GPS]           GPSLongitude                    : 66.91515
[GPS]           GPSAltitudeRef                  : 0
[GPS]           GPSAltitude                     : 119.9
[Composite]     GPSAltitude                     : 119.9
[Composite]     GPSLatitude                     : -36.6101
[Composite]     GPSLongitude                    : -66.91515
[Composite]     GPSPosition                     : -36.6101 -66.91515
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wywh

#2
Quote from: StarGeek on October 18, 2024, 05:47:13 PMStrange. It appears to be working here

Strange indeed. A few days ago AFAIR it worked but yesterday it did not so I presumed I misremembered my early test (I did optionally clear with '-all=' previous tags while testing then).

But today it works as expected again and also ExifIFD:DateTimeOriginal and GPS:GPSLatitude can be readily used instead XMP-exif:

exiftool -all= -P -overwrite_original '-Description=Description' '-GPSLatitude*=-36.6101' '-GPSLongitude*=-66.91515' '-GPSAltitude*=119.9' '-DateTimeOriginal=2001:06:01 12:00:00' a.avif

exiftool -G1 -a -s -n -description -DateTimeOriginal '-gps*' a.avif
[XMP-dc]        Description                     : Description
[ExifIFD]       DateTimeOriginal                : 2001:06:01 12:00:00
[GPS]           GPSVersionID                    : 2 3 0 0
[GPS]           GPSLatitudeRef                  : S
[GPS]           GPSLatitude                     : 36.6101
[GPS]           GPSLongitudeRef                 : W
[GPS]           GPSLongitude                    : 66.91515
[GPS]           GPSAltitudeRef                  : 0
[GPS]           GPSAltitude                     : 119.9
[Composite]     GPSAltitude                     : 119.9
[Composite]     GPSLatitude                     : -36.6101
[Composite]     GPSLongitude                    : -66.91515
[Composite]     GPSPosition                     : -36.6101 -66.91515

...maybe this is related macOS Sequoia 15.0.1 and Xcode 16 initial hiccups (or just user error)? For example, in earlier macOS Sonoma 14.7 and Xcode 15.3 "Warning: Error 512 running "/usr/bin/setfile" to set FileCreateDate" message does not occur although the output is still as expected also with macOS 15.0.1 and Xcode 16.

That warning can be fixed by editing time zone off from the .xmp sidecar that is copied to the .jpg:

<photoshop:DateCreated>2000-01-01T12:00:00+02:00</photoshop:DateCreated>
...to:
<photoshop:DateCreated>2000-01-01T12:00:00</photoshop:DateCreated>

...but then in that command is "Warning: Error converting value for ExifIFD:OffsetTimeOriginal (PrintConvInv)" obviously because the time zone Offset is missing from the .xmp.

exiftool -m -overwrite_original -ext jpg -ext heic '-IPTC:CodedCharacterSet=UTF8' -tagsFromFile %d%f.xmp '-AllDates<XMP-photoshop:DateCreated' '-ExifIFD:OffsetTime*<XMP-photoshop:DateCreated' '-XMP-photoshop:DateCreated<XMP-photoshop:DateCreated' '-EXIF:All<XMP-exif:All' '-GPS:GPSLatitudeRef<Composite:GPSLatitudeRef' '-GPS:GPSLongitudeRef<Composite:GPSLongitudeRef' '-XMP:All<XMP:All' --XMP-exif:GPSDateTime '-IPTC:ObjectName<XMP-dc:Title' '-IPTC:Caption-Abstract<XMP-dc:Description' '-EXIF:ImageDescription<XMP-dc:Description' '-IPTC:Keywords<XMP-dc:Subject' '-FileCreateDate<XMP-photoshop:DateCreated' '-FileModifyDate<XMP-photoshop:DateCreated' .
Warning: Error 512 running "/usr/bin/setfile" to set FileCreateDate - ./image_jpg_ok.jpg
    1 directories scanned
    1 image files updated

- Matti