ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: sscardoso on January 25, 2019, 06:54:05 PM

Title: HEIC Write Support?
Post by: sscardoso on January 25, 2019, 06:54:05 PM
Are there any plans to support writing to HEIC files? Would be nice to embed metadata directly to them and not have to export another format that can be written to.
Title: Re: HEIC Write Support?
Post by: StarGeek on January 25, 2019, 08:17:36 PM
**TV Announcer voice**
Previously (https://exiftool.org/forum/index.php/topic,8550.msg44140.html#msg44140), on (https://exiftool.org/forum/index.php/topic,9061.msg46806.html#msg46806) the Exiftool Forum.
Title: Re: HEIC Write Support?
Post by: sscardoso on January 25, 2019, 10:59:19 PM
Thanks for the reply, but neither of those posts helps me out.

Post 1: "The HEIC format is fairly complex, and it will be a while before I can accumulate enough samples and experience with this format to be able to be confident about adding the write ability."
Phil wrote this post on October 1, 2017, which was a while ago. I wanted to know if anything's changed since then.

Post 2: "I would not recommend HEIC.  This is a very complex format that will take some time before it is supported by a wide range of applications (if ever)."
Unfortunately, I am in a situation where abandoning HEIC is not an option. That's why I'm asking about writing specifically to HEICs and not looking for an alternative format.
Title: Re: HEIC Write Support?
Post by: Phil Harvey on January 26, 2019, 07:12:21 AM
The bottom line is that adding write support for HEIC is not likely to happen in the near future.  I know this doesn't help you out, and I'm sorry about that.

- Phil
Title: Re: HEIC Write Support?
Post by: sscardoso on January 26, 2019, 12:59:41 PM
Thanks, Phil! Just wanted to confirm that was the state of things.
Title: Re: HEIC Write Support?
Post by: Marsu42 on January 29, 2019, 02:57:04 PM
Quote from: Phil Harvey on January 26, 2019, 07:12:21 AM
The bottom line is that adding write support for HEIC is not likely to happen in the near future.  I know this doesn't help you out, and I'm sorry about that.

That's unfortunate, but for completeness' sake: The format will gain further traction in the future, because the new common web codec AV1 will support a still image format "AVIF" based on the same container HEIF/MIAF like HEIC.

https://github.com/AOMediaCodec/av1-avif

QuoteThis document describes how to use ISO-BMFF structures to generate a HEIF/MIAF compatible file that contains one or more still images encoded using AV1.

A pity they didn't chose the webp-like container, as the logic of av1->avif is the same as vp8->webp :-\
Title: Re: HEIC Write Support?
Post by: Phil Harvey on March 28, 2019, 11:41:35 AM
Expect HEIC write support in version 11.33 (to be released soon).

- Phil
Title: Re: HEIC Write Support?
Post by: Mac2 on March 30, 2019, 08:49:17 AM
That's great news.

Thank you very much Phil  :)
Your work on ExifTool is much appreciated. You help people manage the metadata mess, and that's just awesome.
Title: Re: HEIC Write Support?
Post by: Phil Harvey on March 30, 2019, 09:30:36 AM
Let me know how it goes for you.  For HEIC I'm writing the XMP in the same location as with MP4 files, but I have some HEIC files that store this in a different location.  Unfortunately HEIC is not part of the XMP specification yet, so I'm sort of on my own here.  If you have any apps that read XMP from HEIC, let me know if this works with them.

- Phil
Title: Re: HEIC Write Support?
Post by: dennis508 on April 29, 2019, 08:43:18 AM
A number of heic files in the Nokia samples at
https://github.com/nokiatech/heif/tree/gh-pages/content (https://github.com/nokiatech/heif/tree/gh-pages/content)
for instance
https://github.com/nokiatech/heif/blob/gh-pages/content/images/autumn_1440x960.heic (https://github.com/nokiatech/heif/blob/gh-pages/content/images/autumn_1440x960.heic)
get this error on an attempted write from ExifTool 11.38:

Error: Chunk offset in iloc atom is outside movie data

Do you know anything about this error or these files? Thanks
Title: Re: HEIC Write Support?
Post by: Phil Harvey on April 29, 2019, 11:57:20 AM
Thanks for this report.

ExifTool was checking that the base offset for the data was inside idat, which as it happens is not true for these files.  This is legal, but somewhat unexpected.  Strictly, ExifTool should be checking that the base offset plus the individual offsets are inside idat.  I will fix this for ExifTool 11.39.

- Phil
Title: Re: HEIC Write Support?
Post by: dennis508 on April 30, 2019, 05:05:01 PM
OK. Thanks for all the great work.
Title: Re: HEIC Write Support?
Post by: dennis508 on May 10, 2019, 09:56:51 AM
Here's another "Chunk offset in iloc atom is outside movie data" error, this time in ExifTool 11.41.

This file came from gourd-clipart-1.heic in a zip file at
https://avi.alkalay.net/2018/08/heic-lossless-images.html (https://avi.alkalay.net/2018/08/heic-lossless-images.html)

Title: Re: HEIC Write Support?
Post by: Phil Harvey on May 10, 2019, 10:22:58 AM
Thanks!  I've been gearing up to add full write support for HEIC images, so this report is very timely.

- Phil
Title: Re: HEIC Write Support?
Post by: Marsu42 on February 15, 2020, 08:59:19 AM
With exiftool 11.87, this buggy using the Netflix AV1 test images from here: http://download.opencontent.netflix.com/?prefix=AV1/Chimera/AVIF/

With -tagsfromfile from the original image (Lightroom tif or png), this results in the error: "Warning: Can't create EXIF. Invalid iloc offset size - test.avif", same error if I try copying xmp only.

I currently encode my own files with ffmpeg => rav1e or aomenc (ivf output) => mp4box (avif output)... this is probably what Netflix did, too
Title: Re: HEIC Write Support?
Post by: Phil Harvey on February 15, 2020, 11:27:45 AM
Thanks.  I'll take a look at this when I get a chance (probably on Tuesday), and post back here when I know more.

- Phil
Title: Re: HEIC Write Support?
Post by: Phil Harvey on February 19, 2020, 10:56:17 AM
This was more challenging than I thought.  It took me a few hours to re-learn the ISO 14496-12 specification so I could understand what was happening.  But I've figured it out now, and ExifTool 11.88 (to be released maybe later today) will support writing files like this.

- Phil

Edit: Or maybe the release will be tomorrow
Title: Re: HEIC Write Support?
Post by: Zetorg on December 20, 2020, 03:28:16 PM
Is it possible to add/change Title and Description like explained in this thread?
https://exiftool.org/forum/index.php?topic=11951.0
Title: Re: HEIC Write Support?
Post by: StarGeek on December 20, 2020, 03:52:31 PM
Yes.
exiftool -Title="new title" -Description="New Description" /path/to/files/

It's best not to post in months old threads.  There was a big red warning that was displayed when you posted this.
Title: Re: HEIC Write Support?
Post by: Zetorg on December 22, 2020, 02:06:04 PM
Quote from: StarGeek on December 20, 2020, 03:52:31 PM
Yes.
exiftool -Title="new title" -Description="New Description" /path/to/files/

It's best not to post in months old threads.  There was a big red warning that was displayed when you posted this.
Thank you very much, worked perfectly fine!

About old threads, some users/moderators want to keep a single thread for that specific topic related, and others just want a new thread for each new inquiry even on same exact matter. So I decided to do the first, which I think it's better that Google gives me a single thread than 150 duplicate threads about HEIC metadata. So forum warning should be like "Make a new thread even if it's same exact topic because this is already old".
Title: Re: HEIC Write Support?
Post by: Phil Harvey on December 22, 2020, 09:38:52 PM
But this was a different topic.  The original topic was a feature request to add the ability to write metadata to HEIC files.

- Phil
Title: Re: HEIC Write Support?
Post by: Zetorg on December 23, 2020, 04:50:23 AM
Yes, but since the ability already existed there's no further point.