Can't update DateTimeOriginal in .mov file

Started by Hayo Baan, July 15, 2014, 03:23:59 PM

Previous topic - Next topic

Hayo Baan

Hi Phil,

I noticed that exiftool is unable to update the DateTimeOriginal field in a .mov file. When you set it (with an unspecified group), an XMP DateTimeOriginal tag is created instead. So now there are two tags in the file, but out of sync.
Worse, if you subsequently ask for the DataTimeOriginal, the old (MakerNote) value is reported instead of the newly created. So in effect rendering the update useless (perhaps not execute it at all?).

I know you have limited support for .mov files, but it would be great if you could allow for updating a number of additional tags, especially the DataTimeOriginal (and DateCreated) tags.

Thanks,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

Honestly, adding full write support for metadata in video files is so much work that I don't even want to think about it.  Like the "standard" video metadata, the makernote information you are referring to is likewise extremely messy and inconsistent between models.  Also, I lack the resources to fully test video formats for compatibility with other software.  So it is unlikely that this will get implemented in the near future.

But perhaps it is worthwhile to have the XMP take priority over other tags when the duplicate option is disabled.  I'll think about this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

Hi Phil,

I fully understand what you're saying but I was thinking about just updating the tags in-place (so no creation, reordering, deletion, growing, shrinking, etc. Basically just byte replacements). Would that be hard to do too?

Years ago when I started to write my own metadata editing/displaying script (in REXX...), in-place updating was the only editing I implemented, and only for a limited number of fields (basically only the datetime fields and the comment; that was all I needed at that time). I did this because that was the safest way for me to be able to update the files, making sure the structure would stay intact. Perhaps this would be a viable work-around, even if just for a couple of fields, and perhaps only for those groups that behave like tiff structures as these should be quite straightforward to decode.

If you do have support for binary block updates in .mov files, I could even try something like this:

  • exiftool -b -MakerNotes:Nikon
  • Change binary data to update tag in-place
  • exiftool -b -MakerNotes:Nikon=<changed data>

My initial tests, however, seem to indicate exiftool does not yet allow for the binary extraction of the makernotes (let alone updating them), is that correct? If it did work, this could be a work-around for me  ;D
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Quote from: HayoBaan on July 16, 2014, 10:21:48 AM
I fully understand what you're saying but I was thinking about just updating the tags in-place (so no creation, reordering, deletion, growing, shrinking, etc. Basically just byte replacements). Would that be hard to do too?

It would require a completely different mechanism for writing that would be incompatible with the current interface (which is designed to be functional with non-seekable streams, for piping files through exiftool).

QuoteMy initial tests, however, seem to indicate exiftool does not yet allow for the binary extraction of the makernotes (let alone updating them), is that correct?

Correct.

ExifTool 9.68 will raise the priority to XMP in QuickTime-based files so that it will be reported instead of any other same-named tags when reading back without the -a option.  This doesn't solve your problem, but it may help in some situations.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

Quote from: Phil Harvey on July 16, 2014, 10:27:51 AM
Quote from: HayoBaan on July 16, 2014, 10:21:48 AM
I fully understand what you're saying but I was thinking about just updating the tags in-place (so no creation, reordering, deletion, growing, shrinking, etc. Basically just byte replacements). Would that be hard to do too?

It would require a completely different mechanism for writing that would be incompatible with the current interface (which is designed to be functional with non-seekable streams, for piping files through exiftool).
Ah, right. That would indeed make it incompatible.

Quote from: Phil Harvey on July 16, 2014, 10:27:51 AM
QuoteMy initial tests, however, seem to indicate exiftool does not yet allow for the binary extraction of the makernotes (let alone updating them), is that correct?

Correct.

Any plans on making this possible so I could have a go at the work-around I described?

Quote from: Phil Harvey on July 16, 2014, 10:27:51 AM
ExifTool 9.68 will raise the priority to XMP in QuickTime-based files so that it will be reported instead of any other same-named tags when reading back without the -a option.  This doesn't solve your problem, but it may help in some situations
This will at least help prevent surprises where people adjusted the datetime and didn't see that reflected in the result.

Thanks,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

Quote from: HayoBaan on July 16, 2014, 01:31:22 PM
Quote from: Phil Harvey on July 16, 2014, 10:27:51 AM
QuoteMy initial tests, however, seem to indicate exiftool does not yet allow for the binary extraction of the makernotes (let alone updating them), is that correct?

Correct.

Any plans on making this possible so I could have a go at the work-around I described?

Sorry, not in the foreseeable future.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

Quote from: Phil Harvey on July 16, 2014, 01:34:18 PM
Sorry, not in the foreseeable future.

Ok, understood. Perhaps when I really need it (so far haven't shot many video and always with a correctly set camera datetime), I will have a look at a brute force binary hack to correct the fields myself  ::)

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl