I can't write "-exif:OffsetTimeOriginal" to a MOV-file.

Started by Jom, July 30, 2022, 07:25:36 PM

Previous topic - Next topic

Jom

I can't write "-exif:OffsetTimeOriginal" to a MOV-file.
Why?

PowerShell 7.2.5
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS D:\_temp\METADATAEXPERIMENTS> chcp 65001
Active code page: 65001
PS D:\_temp\METADATAEXPERIMENTS> exiftool -progress: -progress -charset filename='' -charset exif=UTF8 -s -f `
>> -XMP-exif:DateTimeOriginal `
>> -XMP-xmp:CreateDate `
>> -XMP-photoshop:DateCreated `
>> -exif:OffsetTimeOriginal `
>> -XMP-tiff:Model `
>> -XMP-xmp:CreatorTool `
>> -XMP-exifEX:SerialNumber `
>> -XMP-crs:RawFileName `
>> -XMP-xmp:Nickname `
>> -ext mov .
======== ./MVI_1748.MOV [1/1]
DateTimeOriginal                : -
CreateDate                      : -
DateCreated                     : -
OffsetTimeOriginal              : -
Model                           : -
CreatorTool                     : -
SerialNumber                    : -
RawFileName                     : -
Nickname                        : -
    1 directories scanned
    1 image files read
PS D:\_temp\METADATAEXPERIMENTS> exiftool -progress: -progress -charset filename='' -charset exif=UTF8 `
>> '-XMP-exif:DateTimeOriginal<${exif:DateTimeOriginal}+03:00' `
>> '-XMP-xmp:CreateDate<${exif:DateTimeOriginal}+03:00' `
>> '-XMP-photoshop:DateCreated<${exif:DateTimeOriginal}+03:00' `
>> -exif:OffsetTimeOriginal='+03:00' `
>> '-XMP-tiff:Model<${exif:Model}' `
>> '-XMP-xmp:CreatorTool<${exif:Model}' `
>> '-XMP-exifEX:SerialNumber<${exif:SerialNumber}' `
>> '-XMP-crs:RawFileName<${FileName}' `
>> '-XMP-xmp:Nickname<${FileName}' `
>> -ext mov .
======== ./MVI_1748.MOV [1/1]
    1 directories scanned
    1 image files updated
PS D:\_temp\METADATAEXPERIMENTS> exiftool -progress: -progress -charset filename='' -charset exif=UTF8 -s -f `
>> -XMP-exif:DateTimeOriginal `
>> -XMP-xmp:CreateDate `
>> -XMP-photoshop:DateCreated `
>> -exif:OffsetTimeOriginal `
>> -XMP-tiff:Model `
>> -XMP-xmp:CreatorTool `
>> -XMP-exifEX:SerialNumber `
>> -XMP-crs:RawFileName `
>> -XMP-xmp:Nickname `
>> -ext mov .
======== ./MVI_1748.MOV [1/1]
DateTimeOriginal                : 2022:07:31 02:13:11+03:00
CreateDate                      : 2022:07:31 02:13:11+03:00
DateCreated                     : 2022:07:31 02:13:11+03:00
OffsetTimeOriginal              : -
Model                           : Canon EOS 600D
CreatorTool                     : Canon EOS 600D
SerialNumber                    : 163066096287
RawFileName                     : MVI_1748.MOV
Nickname                        : MVI_1748.MOV
    1 directories scanned
    1 image files read
PS D:\_temp\METADATAEXPERIMENTS>

StarGeek

Because you can't write EXIF data to a video file.  See the Supported File Types table.

There is no standard for putting EXIF data in a video file but camera companies force an EXIF block into the files in non-standard ways.  Each one doing it differently.

Your best bet is to write to either Quicktime:CreationDate or Quicktime:DateTimeOriginal with the full local time stamp plus time zone.  By default, if you don't include a time zone, exiftool will write the local time zone of the computer automatically.
"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

Jom

EXIF only for images, not for other file type?

From CIPA DC-010-2020 Exif 2.32 metadata for XMP
Quote1 Scope
This standard defines a set of metadata-mapping definitions between the tag based ones defined in the Exif standard and the XML properties used in XMP for still-image files, but does not specify the full definition of each metadata item, methods of embedding the metadata set into image files or reconciliation policy when an image file can have different forms of metadata.
This standard is applicable to devices and application software that create image data files with Exif metadata in XMP.
Is this it? Does it say here that only for images?

Phil Harvey

You're talking about XMP now.  You can write this to MP4/MOV.

- 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 ($).

StarGeek

Note the name of the standard.  Exif 2.32 metadata for XMP (emphasis mine).  Exiftool can write any of the XMP tags listed in that standard into MOV/Mp4 files, but they are XMP, not EXIF.

If you check page page 14 (numbered page 10), you'll see that the OffsetTime (and SubSecond) tags are not used in XMP.  Instead, the time zone and SubSeconds are directly included in the regular tag, such as CreateDate.

And it looks like I missed something at some point. Exiftool seems to have the ability to edit EXIF blocks in MOV files, as per the table I linked.  It just can't create them.  Phil, has this been there all along and I've just been an idiot? :D
"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

Phil Harvey

@StarGeek:  This has been there all along, but you're not an idiot.  ExifTool currently can only write EXIF from some of the various methods used to store it in QuickTime-based files.

- 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 ($).

Jom

Quote from: Phil Harvey on July 30, 2022, 08:08:29 PMYou're talking about XMP now.  You can write this to MP4/MOV.

- Phil
I'm confused. I'm talking about the OffsetTimeOriginal tag (-exif:OffsetTimeOriginal if ExifTool syntax), is it an EXIF tag, not XMP?

Phil Harvey

Quote from: CIPA DC-010-2020 Exif 2.32 metadata for XMP, page 10
Exif field nameDecHexDescriptionXMP name
OffsetTimeOriginal368819011Offset from UTC of the time of DateTimeOriginal.Not used a
a Mapping to XMP property is not given to this Exif tag field because the value of this tag field is mapped to an XMP property corresponding to a different Exif tag field.

- 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 ($).

Jom

I see this text. I can't translate it into Russian accurately and unambiguously. Is it possible to rephrase it in plain English in other words?
Quotebecause the value of this tag field is mapped to an XMP property corresponding to a different Exif tag field.
— I can't understand this piece, some nonsense in Russian.

StarGeek

The "Exif 2.32 metadata for XMP" standard is for mapping various EXIF tags to their corresponding locations in XMP.

The OffsetTime* tags are not separate tags in XMP like they are in EXIF.  They are instead included as part of the regular XMP Date/Time tags. For example, in EXIF data, the time stamp when a photo was taken is spread across three tags.
C:\>exiftool -e -EXIF:time:all -G -a -s y:\!temp\Test4.jpg
[EXIF]          DateTimeOriginal                : 2022:07:30 12:00:00
[EXIF]          OffsetTimeOriginal              : -07:00
[EXIF]          SubSecTimeOriginal              : 33

But when copied to the corrisponiding XMP tag, all three of these are combined.
C:\>exiftool -e -EXIF:time:all -XMP:Time:All -G -a -s y:\!temp\Test4.jpg
[EXIF]          DateTimeOriginal                : 2022:07:30 12:00:00
[EXIF]          OffsetTimeOriginal              : -07:00
[EXIF]          SubSecTimeOriginal              : 33
[XMP]           DateCreated                     : 2022:07:30 12:00:00.33-07:00

A similar situation occurs with GPS coordinates, which are split into two tags in EXIF (coordinates and reference direction) but are combined in the corrisponding XMP tags.
"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

Jom

Thanks a lot for the explanation, StarGeek. I've noticed these things, but I wouldn't be able to guess for myself, that this phrase is means this. I can confidently read only plain English.

Now I have some summary of my understanding of the world of metadata for video and I want to voice it so that you can say whether I understand everything correctly or not.

1. EXIF is not for video files, only for images and audio.
2. Videos have their own metadata standards with own independent formats for various purposes, but it is better to use the IPTC Video Metadata Hub
https://iptc.org/standards/video-metadata-hub/recommendation/
which allows all metadata for videos to be contained in common XMP format.

Am I getting all right?

StarGeek

Quote from: Jom on July 31, 2022, 01:19:20 AM1. EXIF is not for video files, only for images and audio.

I would say mostly for images.  I don't recall ever seeing an audio file with EXIF data.  In most audio files, such as Mp3/ogg/flac, you'll find ID3 data, which exiftool does not write.  There are lots of apps that do.  Unless it's M4A/M4B audio, which is basically a MP4 video file without a video stream.

As for video, in my opinion, it's a bit more nuanced. Afaik, there isn't any program that can create an EXIF block in a video file.  As I said, there isn't a standard for doing so.  But I wouldn't say that it shouldn't be done.  Some of the EXIF data that various cameras write into video streams can be useful.

Basically, you can't create EXIF data in a video, but don't be surprised if you find some.

Quote2. Videos have their own metadata standards with own independent formats for various purposes, but it is better to use the IPTC Video Metadata Hub
https://iptc.org/standards/video-metadata-hub/recommendation/
which allows all metadata for videos to be contained in common XMP format.

Video metadata is messy. The IPTC standard uses XMP, but I don't think any program out there actually reads XMP data in a video file.  Adobe programs are the exception.  In the case of MP4/Mov files, it's almost always Quicktime tags that are used.  A large part of this is because that is what FFMpeg will write.  Most free and open source video programs use that as the core of their video processing.  Then there's MKV (Matroska) files, which (I think) doesn't have set tags.  Instead, they use a free form KEY/VALUE model, where you can create any tag name and set a value to it.

For the most part, you have to figure out what the programs in your workflow will read and adjust your data to fill those tags.
"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

Jom

Quote from: StarGeek on July 31, 2022, 10:22:56 AMAs I said, there isn't a standard for doing so.  But I wouldn't say that it shouldn't be done.  Some of the EXIF data that various cameras write into video streams can be useful.
Yes, I understand this. If EXIF is non standard for video, I'm will not use his. I'm of course will read and use exif metadata in my workflow, but will not write.

Quote from: StarGeek on July 31, 2022, 10:22:56 AMVideo metadata is messy.
...all metadata is messy. I can call it "standards" only formally...

Quote from: StarGeek on July 31, 2022, 10:22:56 AMFor the most part, you have to figure out what the programs in your workflow will read and adjust your data to fill those tags.
In order not to do this, I use only ExifTool and only manual control via the command line. Also, I don't want to be tied to specific photo and video formats, I'm building a universal workflow based on ExifTool, so I have to spend so much time studying standards and tagging.

Now, after these clarifications, can you answer my questions more briefly?

1. Videos have their own metadata standards with own independent formats for various purposes, but it is better to use the IPTC Video Metadata Hub
https://iptc.org/standards/video-metadata-hub/recommendation/
which allows all metadata for videos to be contained in common XMP format.

Am I getting all right?


To create documentation of my workflow, I must clearly define the theory, but for this I need the confirmation of a more experienced person. The ideal answer to my questions for me is "Yes", but if there are more nuances, then tell me about them, and I will continue to create a workflow further.




Jom

looks like my question got lost again...
I just started being interested in metadata for videos a couple of days ago and I don't have a systematic understanding about their standards. I do not know English to fully and correctly understand the standards, so it will help me a lot if someone confirms my assumptions.

StarGeek

Quote from: Jom on August 01, 2022, 07:35:15 PMlooks like my question got lost again...

No, just don't have any answer beyond what I already posted.  I haven't seen anything that uses that standard.  Most videos out on the net just use the basic Quicktime tags that can be written with FFMpeg.
"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