Timezone offsett in the file category

Started by csidirop, August 20, 2021, 06:56:31 AM

Previous topic - Next topic

csidirop

Hi,
I have following issue for years:

There is some timezone offsett in the file category with I canont handle (remove or edit in some way).

exiftool.exe -time:all -s -G '.\MVI_6451 [enc].mp4'
[File]          FileModifyDate                  : 2021:08:08 11:24:06+02:00
[File]          FileAccessDate                  : 2021:08:20 12:14:51+02:00
[File]          FileCreateDate                  : 2021:08:08 11:24:06+02:00
[QuickTime]     TrackCreateDate                 : 2021:08:08 11:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 11:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 11:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 11:24:06
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06
[XMP]           CreateDate                      : 2021:08:08 11:24:06
[XMP]           ModifyDate                      : 2021:08:08 11:24:06

But Windows (and some other progs) shows the Create Time as 13:24.


More informations:

  • OS: Win 10
  • Exiftool version: 12.30
  • Camera Model: EOS M6
Ussualy I convert all my mp4s captured with the M6 using Handbreak to save some space. But unfortunatly Handbreak just cant keep the simplest metadata (like dates).
I use exiftool to copy the missing data manual or with exiftool -tagsfromfile %d%-.6f.%e and than fixing some missing or wrong dates like QuickTimeDates (MediaModifyDate, MediaCreateDate, TrackModifyDate, TrackCreateDate) by copying over the date from DateTimeOriginal.
I allready tried to set, unset shift the timezone using:

  • -timezone=00:00
  • -timezone=+03:00
  • -timeZoneOffset=-2
  • and more I don't remember.
But nothing worked.

For comparisson, here the time date of the original file:
exiftool.exe -time:all .\MVI_6451.MP4
File Modification Date/Time     : 2021:08:08 11:24:06+02:00
File Access Date/Time           : 2021:08:20 11:27:57+02:00
File Creation Date/Time         : 2021:08:18 09:00:49+02:00
Date/Time Original              : 2021:08:08 11:24:06
Time Zone                       : +03:00
Time Zone City                  : (not set)
Daylight Savings                : On
Sub Sec Time                    : 84
Sub Sec Time Original           : 84
Sub Sec Time Digitized          : 84
Create Date                     : 2021:08:08 08:24:46
Modify Date                     : 2021:08:08 08:24:46
Track Create Date               : 2021:08:08 08:24:06
Track Modify Date               : 2021:08:08 08:24:06
Media Create Date               : 2021:08:08 08:24:06
Media Modify Date               : 2021:08:08 08:24:06
Create Date                     : 2021:08:08 11:24:06.84
Date/Time Original              : 2021:08:08 11:24:06.84
Modify Date                     : 2021:08:08 11:24:06.84


I am sure I have made a logical mistake.
Any Ideas?

StarGeek

Quote from: csidirop on August 20, 2021, 06:56:31 AM
There is some timezone offsett in the file category with I canont handle (remove or edit in some way).

exiftool.exe -time:all -s -G '.\MVI_6451 [enc].mp4'
[File]          FileModifyDate                  : 2021:08:08 11:24:06+02:00
[File]          FileAccessDate                  : 2021:08:20 12:14:51+02:00
[File]          FileCreateDate                  : 2021:08:08 11:24:06+02:00

The [File] time stamps are taken from underlying file system.  The timezone component cannot be removed, it is part of the data. They will always be adjusted to the local timezone of the computer.  For example, you're 2021:08:08 11:24:06+02:00 timestamp will show up on my West coast US timezone as 2021:08:08 02:24:06-07:00.

Quote[QuickTime]     TrackCreateDate                 : 2021:08:08 11:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 11:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 11:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 11:24:06
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06
[XMP]           CreateDate                      : 2021:08:08 11:24:06
[XMP]           ModifyDate                      : 2021:08:08 11:24:06


But Windows (and some other progs) shows the Create Time as 13:24.

That is because most video timestamps are supposed to be in UTC. See the 4th paragraph on the Quicktime tags page. Windows understands this and will automatically shift the displayed time.

Also, because you didn't use the -a (-duplicates) option (see FAQ #3), your output is missing the QuickTime:CreateDate and Quicktime:ModifyDate, maybe also the Quicktime:DateTimeOriginal. The QuickTime:CreateDate and Quicktime:ModifyDate are the important ones because those are what Windows will read to display the time.

So when you set -CreateDate=2021:08:08 11:24:06, you are setting it to 2021:08:08 11:24:06 UTC, but you want to be setting it to 2021:08:08 09:24:06 UTC.  Now as long as you have the correct timezone with the date, you can add the -api QuickTimeUTC option and exiftool will make the adjustment for you.
exiftool -api QuickTimeUTC -CreateDate="2021:08:08 11:24:06+02:00" file.mp4

Or, since the FileModifyDate is correctly set, you can copy from that.
exiftool -api QuickTimeUTC "-CreateDate<FileModifyDate" file.mp4

If the FileModifyDate is correct on the original file you are copying from, you can use this
exiftool -api QuickTimeUTC -TagsFromFile %d%-.6f.%e "-CreateDate<FileModifyDate" "ModifyDate<FileModifyDate" "-Media*Date<FileModifyDate" -Track*Date<FileModifyDate" /path/to/files/
Here I used a wildcard to copy to both the Create and Modify tags of the Track and Media tags at the same time.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

csidirop

Quote from: StarGeek on August 20, 2021, 11:24:50 AM
Also, because you didn't use the -a (-duplicates) option (see FAQ #3), your output is missing the QuickTime:CreateDate and Quicktime:ModifyDate
Yes, but I set all those to the same date via a custom var:
QuoteQuickTimeDates => ['QuickTime:CreateDate',
                  'QuickTime:ModifyDate',
                  'Track1:MediaModifyDate',
                  'Track1:MediaCreateDate',
                  'Track1:TrackModifyDate',
                  'Track1:TrackCreateDate',
                  'Track2:MediaModifyDate',
                  'Track2:MediaCreateDate',
                  'Track2:TrackModifyDate',
                  'Track2:TrackCreateDate']

I tried (with completly new exports just to be save) a little bit with your command and found that the date parameter obviously just copy to those values "CreateDate" "ModifyDate" "Media*Date" "Track*Date". So nothing else like camera model, lens or anything else is copied.
So I tried following:

  • First copying everthing from source to targed with exiftool -api QuickTimeUTC -tagsfromfile %d%-.7f.%e TARGETFILE (pretty sure api parameter is useless here)
  • Than using youre command altered to set correct dates with exiftool -api QuickTimeUTC -tagsfromfile %d%-.7f.%e "-AllDates<FileModifyDate" "-QuickTimeDates<FileModifyDate" TARGETFILE

Now it seams correct and I get following:
exiftool.exe -time:all -s -G -a '.\MVI_6451 [enc3].mp4'
[File]          FileModifyDate                  : 2021:08:20 18:28:15+02:00
[File]          FileAccessDate                  : 2021:08:20 18:28:19+02:00
[File]          FileCreateDate                  : 2021:08:20 18:27:14+02:00
[QuickTime]     CreateDate                      : 2021:08:08 09:24:06
[QuickTime]     ModifyDate                      : 2021:08:08 09:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[XMP]           CreateDate                      : 2021:08:08 11:24:06+02:00
[XMP]           ModifyDate                      : 2021:08:08 11:24:06+02:00

Every QuickTimeDate is in UTC and anything else with correct TimeZone. Is that correct? Did I made any mistake? Anyway date and time are read correctly.

StarGeek

Quote from: csidirop on August 20, 2021, 01:19:59 PMFirst copying everthing from source to targed with exiftool -api QuickTimeUTC -tagsfromfile %d%-.7f.%e TARGETFILE (pretty sure api parameter is useless here)

One thing to watch out for here is covered in FAQ #9b.  Because there are multiple tags with the same exact name in Quicktime and this operation is the equivalent to -tagsfromfile %d%-.7f.%e -All, this means that the actual locations of some of the tags may change.  For example, if your original file has a tag in the Quicktime:Keys location, such as -Quicktime:Keys:Artist, a copy like this will move it to the Quicktime:ItemList:Artist location.

This may or may affect how other programs read the data. Video metadata is a complete mess and some programs are very picky.

Use -tagsfromfile %d%-.7f.%e -All:All and tags will be copied to the exact same locations as the original.

QuoteDid I made any mistake? Anyway date and time are read correctly.

Looks good.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

csidirop

#4
Quote from: StarGeek on August 20, 2021, 03:18:48 PM
Use -tagsfromfile %d%-.7f.%e -All:All and tags will be copied to the exact same locations as the original.

This is strange, with -All:All parameter there are a lot of tags missing (eg. the whole XMP block)

With -All:All: 97 tags
exiftool.exe -s -G -a '.\MVI_6451 [enc6].mp4'
[ExifTool]      ExifToolVersion                 : 12.30
[File]          FileName                        : MVI_6451 [enc6].mp4
[File]          Directory                       : .
[File]          FileSize                        : 37 MiB
[File]          FileModifyDate                  : 2021:08:20 17:57:31+02:00
[File]          FileAccessDate                  : 2021:08:21 09:47:33+02:00
[File]          FileCreateDate                  : 2021:08:08 11:24:48+02:00
[File]          FilePermissions                 : -rw-rw-rw-
[File]          FileType                        : MP4
[File]          FileTypeExtension               : mp4
[File]          MIMEType                        : video/mp4
[QuickTime]     MajorBrand                      : MP4 v2 [ISO 14496-14]
[QuickTime]     MinorVersion                    : 0.2.0
[QuickTime]     CompatibleBrands                : mp42, iso2, mp41
[QuickTime]     MovieHeaderVersion              : 0
[QuickTime]     CreateDate                      : 2021:08:08 08:24:48
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:48
[QuickTime]     TimeScale                       : 1000
[QuickTime]     Duration                        : 0:00:31
[QuickTime]     PreferredRate                   : 1
[QuickTime]     PreferredVolume                 : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     PreviewTime                     : 0 s
[QuickTime]     PreviewDuration                 : 0 s
[QuickTime]     PosterTime                      : 0 s
[QuickTime]     SelectionTime                   : 0 s
[QuickTime]     SelectionDuration               : 0 s
[QuickTime]     CurrentTime                     : 0 s
[QuickTime]     NextTrackID                     : 3
[QuickTime]     TrackHeaderVersion              : 0
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackID                         : 1
[QuickTime]     TrackDuration                   : 0:00:31
[QuickTime]     TrackLayer                      : 0
[QuickTime]     TrackVolume                     : 0.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     ImageWidth                      : 1920
[QuickTime]     ImageHeight                     : 1080
[QuickTime]     MediaHeaderVersion              : 0
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaTimeScale                  : 90000
[QuickTime]     MediaDuration                   : 0:00:31
[QuickTime]     MediaLanguageCode               : und
[QuickTime]     HandlerType                     : Video Track
[QuickTime]     HandlerDescription              : VideoHandler
[QuickTime]     GraphicsMode                    : srcCopy
[QuickTime]     OpColor                         : 0 0 0
[QuickTime]     CompressorID                    : hvc1
[QuickTime]     SourceImageWidth                : 1920
[QuickTime]     SourceImageHeight               : 1080
[QuickTime]     XResolution                     : 72
[QuickTime]     YResolution                     : 72
[QuickTime]     BitDepth                        : 24
[QuickTime]     ColorRepresentation             : nclx 1 1 1
[QuickTime]     PixelAspectRatio                : 1:1
[QuickTime]     BufferSize                      : 0
[QuickTime]     MaxBitrate                      : 9665758
[QuickTime]     AverageBitrate                  : 9665758
[QuickTime]     VideoFrameRate                  : 50
[QuickTime]     TrackHeaderVersion              : 0
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackID                         : 2
[QuickTime]     TrackDuration                   : 0:00:31
[QuickTime]     TrackLayer                      : 0
[QuickTime]     TrackVolume                     : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     MediaHeaderVersion              : 0
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaTimeScale                  : 48000
[QuickTime]     MediaLanguageCode               : eng
[QuickTime]     HandlerType                     : Audio Track
[QuickTime]     HandlerDescription              : Stereo
[QuickTime]     Balance                         : 0
[QuickTime]     AudioFormat                     : mp4a
[QuickTime]     AudioChannels                   : 2
[QuickTime]     AudioBitsPerSample              : 16
[QuickTime]     AudioSampleRate                 : 48000
[QuickTime]     Track2Name                      : Stereo
[QuickTime]     Track2Title                     : Stereo
[QuickTime]     HandlerType                     : Metadata
[QuickTime]     HandlerVendorID                 : Apple
[QuickTime]     Encoder                         : HandBrake 1.4.1 2021081500
[QuickTime]     Author                          : XXX
[QuickTime]     UserRating                      : 0
[QuickTime]     Copyright                       :
[QuickTime]     Make                            : Canon
[QuickTime]     Model                           : Canon EOS M6
[QuickTime]     MediaDataSize                   : 39264554
[QuickTime]     MediaDataOffset                 : 42012
[Composite]     ImageSize                       : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     AvgBitrate                      : 9.99 Mbps
[Composite]     Rotation                        : 0


without: 174 tags (69 from XMP)
exiftool.exe -s -G -a '.\MVI_6451 [enc7].mp4'
[ExifTool]      ExifToolVersion                 : 12.30
[File]          FileName                        : MVI_6451 [enc7].mp4
[File]          Directory                       : .
[File]          FileSize                        : 38 MiB
[File]          FileModifyDate                  : 2021:08:20 17:57:31+02:00
[File]          FileAccessDate                  : 2021:08:21 09:49:28+02:00
[File]          FileCreateDate                  : 2021:08:21 09:48:36+02:00
[File]          FilePermissions                 : -rw-rw-rw-
[File]          FileType                        : MP4
[File]          FileTypeExtension               : mp4
[File]          MIMEType                        : video/mp4
[QuickTime]     MajorBrand                      : MP4 v2 [ISO 14496-14]
[QuickTime]     MinorVersion                    : 0.2.0
[QuickTime]     CompatibleBrands                : mp42, iso2, mp41
[QuickTime]     MovieHeaderVersion              : 0
[QuickTime]     CreateDate                      : 2021:08:08 08:24:48
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:48
[QuickTime]     TimeScale                       : 1000
[QuickTime]     Duration                        : 0:00:31
[QuickTime]     PreferredRate                   : 1
[QuickTime]     PreferredVolume                 : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     PreviewTime                     : 0 s
[QuickTime]     PreviewDuration                 : 0 s
[QuickTime]     PosterTime                      : 0 s
[QuickTime]     SelectionTime                   : 0 s
[QuickTime]     SelectionDuration               : 0 s
[QuickTime]     CurrentTime                     : 0 s
[QuickTime]     NextTrackID                     : 3
[QuickTime]     TrackHeaderVersion              : 0
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackID                         : 1
[QuickTime]     TrackDuration                   : 0:00:31
[QuickTime]     TrackLayer                      : 0
[QuickTime]     TrackVolume                     : 0.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     ImageWidth                      : 1920
[QuickTime]     ImageHeight                     : 1080
[QuickTime]     MediaHeaderVersion              : 0
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaTimeScale                  : 90000
[QuickTime]     MediaDuration                   : 0:00:31
[QuickTime]     MediaLanguageCode               : und
[QuickTime]     HandlerType                     : Video Track
[QuickTime]     HandlerDescription              : VideoHandler
[QuickTime]     GraphicsMode                    : srcCopy
[QuickTime]     OpColor                         : 0 0 0
[QuickTime]     CompressorID                    : hvc1
[QuickTime]     SourceImageWidth                : 1920
[QuickTime]     SourceImageHeight               : 1080
[QuickTime]     XResolution                     : 72
[QuickTime]     YResolution                     : 72
[QuickTime]     BitDepth                        : 24
[QuickTime]     ColorRepresentation             : nclx 1 1 1
[QuickTime]     PixelAspectRatio                : 1:1
[QuickTime]     BufferSize                      : 0
[QuickTime]     MaxBitrate                      : 9665758
[QuickTime]     AverageBitrate                  : 9665758
[QuickTime]     VideoFrameRate                  : 50
[QuickTime]     TrackHeaderVersion              : 0
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     TrackID                         : 2
[QuickTime]     TrackDuration                   : 0:00:31
[QuickTime]     TrackLayer                      : 0
[QuickTime]     TrackVolume                     : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     MediaHeaderVersion              : 0
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:48
[QuickTime]     MediaTimeScale                  : 48000
[QuickTime]     MediaDuration                   : 0:00:31
[QuickTime]     MediaLanguageCode               : eng
[QuickTime]     HandlerType                     : Audio Track
[QuickTime]     HandlerDescription              : Stereo
[QuickTime]     Balance                         : 0
[QuickTime]     AudioFormat                     : mp4a
[QuickTime]     AudioChannels                   : 2
[QuickTime]     AudioBitsPerSample              : 16
[QuickTime]     AudioSampleRate                 : 48000
[QuickTime]     Track2Name                      : Stereo
[QuickTime]     Track2Title                     : Stereo
[QuickTime]     HandlerType                     : Metadata
[QuickTime]     HandlerVendorID                 : Apple
[QuickTime]     Encoder                         : HandBrake 1.4.1 2021081500
[QuickTime]     Author                          : XXXXX
[QuickTime]     Copyright                       :
[QuickTime]     CompressorVersion               : CanonMP4_002/08.00.00/00.00.00
[QuickTime]     LensSerialNumber                : XXXXX
[QuickTime]     DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[QuickTime]     SerialNumber                    : XXXXX
[QuickTime]     UnknownThumbnail                : (Binary data 36202 bytes, use -b option to extract)
[QuickTime]     Make                            : Canon
[QuickTime]     Model                           : Canon EOS M6
[QuickTime]     HandlerType                     : Metadata Tags
[QuickTime]     Balance                         : 0
[QuickTime]     UserRating                      : 0
[QuickTime]     MediaDataSize                   : 39264554
[QuickTime]     MediaDataOffset                 : 86566
[XMP]           XMPToolkit                      : Image::ExifTool 12.30
[XMP]           AudioBitsPerSample              : 16
[XMP]           MinorVersion                    : 0.0.1
[XMP]           Categories                      : (none)
[XMP]           Lens                            : 15.0 - 45.0 mm
[XMP]           ColorTemperature                : 5200
[XMP]           ToneCurve                       : Standard
[XMP]           ApertureValue                   : 3.5
[XMP]           ColorSpace                      : sRGB
[XMP]           ComponentsConfiguration         : Y, Cb, Cr, -
[XMP]           CompressedBitsPerPixel          : 3
[XMP]           Contrast                        : Normal
[XMP]           CustomRendered                  : Normal
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06
[XMP]           DigitalZoomRatio                : 1
[XMP]           ExifVersion                     : 0230
[XMP]           ExposureCompensation            : 0
[XMP]           ExposureMode                    : Manual
[XMP]           ExposureProgram                 : Not Defined
[XMP]           ExposureTime                    : 1/1000
[XMP]           FNumber                         : 5.6
[XMP]           FileSource                      : Digital Camera
[XMP]           FlashFired                      : False
[XMP]           FlashFunction                   : False
[XMP]           FlashMode                       : Off
[XMP]           FlashRedEyeMode                 : False
[XMP]           FlashReturn                     : No return detection
[XMP]           FlashpixVersion                 : 0100
[XMP]           FocalLength                     : 15.0 mm
[XMP]           GPSVersionID                    : 2.3.0.0
[XMP]           ISO                             : 100
[XMP]           ImageUniqueID                   : fa1c5a3e5d81ef8d7c8e18a937a38c40
[XMP]           MeteringMode                    : Multi-segment
[XMP]           ExifImageWidth                  : 160
[XMP]           ExifImageHeight                 : 120
[XMP]           Saturation                      : Normal
[XMP]           SceneCaptureType                : Standard
[XMP]           SensingMethod                   : One-chip color area
[XMP]           Sharpness                       : Normal
[XMP]           ShutterSpeedValue               : 1/1002
[XMP]           UserComment                     :
[XMP]           WhiteBalance                    : Auto
[XMP]           SerialNumber                    : XXXXXX
[XMP]           OwnerName                       :
[XMP]           InteropIndex                    : THM - DCF thumbnail file
[XMP]           LensModel                       : EF-M15-45mm f/3.5-6.3 IS STM
[XMP]           LensSerialNumber                : XXXXXX
[XMP]           LensInfo                        : 15-45mm f/0
[XMP]           RecommendedExposureIndex        : 100
[XMP]           SensitivityType                 : Recommended Exposure Index
[XMP]           Author                          : XXX
[XMP]           SequenceNumber                  : 0
[XMP]           BitsPerSample                   : 8
[XMP]           Copyright                       :
[XMP]           ImageDescription                :
[XMP]           ImageHeight                     : 1080
[XMP]           ImageWidth                      : 1920
[XMP]           Make                            : Canon
[XMP]           Model                           : Canon EOS M6
[XMP]           Orientation                     : Horizontal (normal)
[XMP]           ResolutionUnit                  : inches
[XMP]           XResolution                     : 72
[XMP]           YCbCrPositioning                : Co-sited
[XMP]           YCbCrSubSampling                : YCbCr4:2:2 (2 1)
[XMP]           YResolution                     : 72
[XMP]           CreateDate                      : 2021:08:08 10:24:48+02:00
[XMP]           ModifyDate                      : 2021:08:08 10:24:48+02:00
[XMP]           AudioSampleRate                 : 48000
[XMP]           VideoFrameRate                  : 50
[Composite]     Aperture                        : 5.6
[Composite]     ImageSize                       : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     ShutterSpeed                    : 1/1000
[Composite]     AvgBitrate                      : 9.99 Mbps
[Composite]     Rotation                        : 0
[Composite]     Flash                           : Off, Did not fire
[Composite]     FocalLength35efl                : 15.0 mm
[Composite]     LightValue                      : 14.9
[Composite]     LensID                          : EF-M15-45mm f/3.5-6.3 IS STM


Is that how it is meant to be? If so, is it possible to at least still copy the XMP block? I tried to recopy with -XMP:All and -exif:All but both left the file unchanged.

csidirop

I read the FAQ #9b several times, and tried few other parameter but none worked.
I saw in another post, that XMP has same strange tags which exiftool cannot create:
Quote from: StarGeek on August 21, 2021, 10:25:27 AM
For example, proprietary or obscure tags in XMP, which exiftool can list but cannot create.
Is this the case here? But unfortunatly I already tried to copy the whole XMP block with -XMP without success.

Thats the output everytime:
Warning: [minor] Missing 2 entries in CanonCustom2 group 4 directory - ./MVI_6451.mp4
Warning: No writable tags set from ./MVI_6451.mp4
    0 image files updated
    1 image files unchanged


Is it even possible to copy the whole XMP block after copying like before? The block should be complete emty.

StarGeek

Quote from: csidirop on August 21, 2021, 04:14:43 AM
Is that how it is meant to be?

Yes, because you are creating XMP tags that do not exist in the original file.

For example, Quicktime:Make and Quicktime:Model. If you check, you don't have XMP:Make and XMP:Model in the original file.  Simply using -All will create new tags in XMP.  This is because, as it says on the Quicktime tag page
     When writing, ExifTool creates both QuickTime and XMP tags by default...

QuoteIf so, is it possible to at least still copy the XMP block? I tried to recopy with -XMP:All and -exif:All but both left the file unchanged.

If you want exiftool to create the new XMP tags, try combining the two -tagsfromfile %d%-.7f.%e -All:All -All-All:All will make sure that all the Quicktime tags are copied to the exact same location as the original, then -All will copy the tags to new locations in XMP and preferred locations in Quicktime.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

StarGeek

Quote from: csidirop on August 21, 2021, 11:41:32 AM
Thats the output everytime:
Warning: [minor] Missing 2 entries in CanonCustom2 group 4 directory - ./MVI_6451.mp4
Warning: No writable tags set from ./MVI_6451.mp4
    0 image files updated
    1 image files unchanged

You don't include the exact command you used so I can't really say what's happening.  But the warning seems unrelated, as it appears to be MakerNotes tags, and exiftool cannot copy MakerNotes or EXIF tags into a video file.  That is because there is no standard for embedding EXIF data in a video file and every company forces such data into the file in different ways.

QuoteIs it even possible to copy the whole XMP block after copying like before? The block should be complete emty.

It is possible, but are you sure your original file actually has XMP tags in the first place?  XMP tags are not normally in video files unless they've been processed by an Adobe program or exiftool.  And Adobe programs are about the only programs that will read XMP in video files.
Run this on the original file to see if there is actually XMP to start with.
exiftool -XMP:All original.mp4
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

csidirop

#8
Quote from: StarGeek on August 21, 2021, 11:54:04 AM
You don't include the exact command you used so I can't really say what's happening.
Sorry, that was just the same output for every test I did with the different parameters like "-xmp:all>all:all"

Quote from: StarGeek on August 21, 2021, 11:54:04 AM
It is possible, but are you sure your original file actually has XMP tags in the first place? 

Ooooooh, I got confused. The original file has only EXIF tags. But with -tagsfromfile %d%-.7f.%e -All:All -All I get all EXIF tags into the XMP group. Thats totally ok, so they don't get lost no matter if any program can read them now.

Btw. have I understood correctly that exiftool cant edit EXIF tags in a mp4?


Edit: There is something wrong. Except of my workaround few posts back none of the ways copying the dates correct.

Orig:
exiftool.exe -time:all -s -G -a .\MVI_6451.MP4
[File]          FileModifyDate                  : 2021:08:08 11:24:06+02:00
[File]          FileAccessDate                  : 2021:08:21 19:21:05+02:00
[File]          FileCreateDate                  : 2021:08:20 17:42:35+02:00
[EXIF]          ModifyDate                      : 2021:08:08 11:24:06
[EXIF]          DateTimeOriginal                : 2021:08:08 11:24:06
[EXIF]          CreateDate                      : 2021:08:08 11:24:06
[MakerNotes]    TimeZone                        : +03:00
[MakerNotes]    TimeZoneCity                    : (not set)
[MakerNotes]    DaylightSavings                 : On
[EXIF]          SubSecTime                      : 84
[EXIF]          SubSecTimeOriginal              : 84
[EXIF]          SubSecTimeDigitized             : 84
[QuickTime]     CreateDate                      : 2021:08:08 08:24:46
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:46
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[Composite]     SubSecCreateDate                : 2021:08:08 11:24:06.84
[Composite]     SubSecDateTimeOriginal          : 2021:08:08 11:24:06.84
[Composite]     SubSecModifyDate                : 2021:08:08 11:24:06.84


Using  -api QuickTimeUTC -tagsfromfile %d%-.7f.%e and -api QuickTimeUTC -tagsfromfile %d%-.7f.%e "-AllDates<FileModifyDate" "-QuickTimeDates<FileModifyDate"

exiftool.exe -time:all -s -G -a '.\MVI_6451 [enc3].mp4'
[File]          FileModifyDate                  : 2021:08:20 17:57:31+02:00
[File]          FileAccessDate                  : 2021:08:21 19:21:34+02:00
[File]          FileCreateDate                  : 2021:08:21 19:15:02+02:00
[QuickTime]     CreateDate                      : 2021:08:08 09:24:06
[QuickTime]     ModifyDate                      : 2021:08:08 09:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 09:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 09:24:06
[QuickTime]     DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[XMP]           CreateDate                      : 2021:08:08 11:24:06+02:00
[XMP]           ModifyDate                      : 2021:08:08 11:24:06+02:00


Using -api QuickTimeUTC -tagsfromfile %d%-.7f.%e -All:All
exiftool.exe -time:all -s -G -a '.\MVI_6451 [enc6].mp4'
[File]          FileModifyDate                  : 2021:08:20 17:57:31+02:00
[File]          FileAccessDate                  : 2021:08:21 19:21:57+02:00
[File]          FileCreateDate                  : 2021:08:21 19:07:11+02:00
[QuickTime]     CreateDate                      : 2021:08:08 08:24:46
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:46
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06


and using -api QuickTimeUTC -tagsfromfile %d%-.7f.%e -All:All -All
exiftool.exe -time:all -s -G -a '.\MVI_6451 [enc8].mp4'
[File]          FileModifyDate                  : 2021:08:20 17:57:31+02:00
[File]          FileAccessDate                  : 2021:08:21 19:22:11+02:00
[File]          FileCreateDate                  : 2021:08:21 18:21:16+02:00
[QuickTime]     CreateDate                      : 2021:08:08 08:24:46
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:46
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     DateTimeOriginal                : 2021:08:08 11:24:06+02:00
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06
[XMP]           CreateDate                      : 2021:08:08 10:24:46+02:00
[XMP]           ModifyDate                      : 2021:08:08 10:24:46+02:00


(all untouched copies of the handbreak export. Numbering is inconsistent)

We said that 09:24:06 in UTC and 11:24:06+02:00 else is correct? So what did I wrong again?

StarGeek

Quote from: csidirop on August 21, 2021, 12:54:57 PMBtw. have I understood correctly that exiftool cant edit EXIF tags in a mp4?

Yes.  Most likely no program can, because there is not a standard for putting such data in a video file and every camera company inserts the data in different ways.




QuoteEdit: There is something wrong. Except of my workaround few posts back none of the ways copying the dates correct.
<snip>
We said that 09:24:06 in UTC and 11:24:06+02:00 else is correct? So what did I wrong again?

Quote
[MakerNotes]    TimeZone                        : +03:00

The original shows +03:00 timezone, not +02:00 timezone, so it looks like the camera may not have been properly set, which will throw all the timestamps off to begin with. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

csidirop

Quote from: StarGeek on August 22, 2021, 12:49:53 AM
[MakerNotes]    TimeZone                        : +03:00
The original shows +03:00 timezone, not +02:00 timezone, so it looks like the camera may not have been properly set, which will throw all the timestamps off to begin with.

Stange. because all pictures have correct timezones and match my phone pictures.
Okay, but thats an other issue. First I need to fix the timezone and than copy the metadata over.

csidirop

Quote from: csidirop on August 23, 2021, 10:42:36 AM
First I need to fix the timezone and than copy the metadata over.

I need help again. First of all we have mixed up something with the time zones, mostly because I didnt make it clear.
- My locale timezone is +2
- Where I did the pictures and movies is +3

With that in mind the correct dates should be: 2021:08:08 08:24:06 UTC and 2021:08:08 11:24:06+03:00
So -tagsfromfile %d%-.7f.%e -All:All -All writes correcte dates except of the missing tinezone.

Because nether QuickTime:TimeZone nor makernote is writeable, I tried adding EXIF tags but that didn't work:
exiftool.exe "-OffsetTime=+03:00" "-OffsetTimeOriginal=+03:00" "-OffsetTimeDigitized=+03:00" -overwrite_original -P .\MVI_6451.MP4
    0 image files updated
    1 image files unchanged

Is there any way while doing -tagsfromfile %d%-.7f.%e -All:All -All telling exiftool that it must not use the locale timezone? Unfortunately the camera saved those information as makernotes and not anywhere useful (or?).

So I need to change the timezone from +2 to +3.

Btw. what did worked is to change systems settings to +3, copy tags, rewriting some with "-AllDates<XMP:DateTimeOriginal" and than setting system zone back to normal. Which looks good to me:

exiftool.exe -time:all -s -G -a '.\MVI_6451 [enc6].mp4'
[File]          FileModifyDate                  : 2021:08:20 18:57:31+02:00
[File]          FileAccessDate                  : 2021:08:24 12:36:46+02:00
[File]          FileCreateDate                  : 2021:08:24 12:31:30+02:00
[QuickTime]     CreateDate                      : 2021:08:08 08:24:06
[QuickTime]     ModifyDate                      : 2021:08:08 08:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     TrackModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaCreateDate                 : 2021:08:08 08:24:06
[QuickTime]     MediaModifyDate                 : 2021:08:08 08:24:06
[QuickTime]     DateTimeOriginal                : 2021:08:08 11:24:06+03:00
[XMP]           DateTimeOriginal                : 2021:08:08 11:24:06
[XMP]           CreateDate                      : 2021:08:08 11:24:06
[XMP]           ModifyDate                      : 2021:08:08 11:24:06


StarGeek

Quote from: csidirop on August 24, 2021, 05:41:47 AM
Because nether QuickTime:TimeZone nor makernote is writeable, I tried adding EXIF tags but that didn't work:
exiftool.exe "-OffsetTime=+03:00" "-OffsetTimeOriginal=+03:00" "-OffsetTimeDigitized=+03:00" -overwrite_original -P .\MVI_6451.MP4
    0 image files updated
    1 image files unchanged

As I said
Quote from: StarGeek on August 21, 2021, 11:54:04 AM... and exiftool cannot copy MakerNotes or EXIF tags into a video file.  That is because there is no standard for embedding EXIF data in a video file and every company forces such data into the file in different ways.

QuoteIs there any way while doing -tagsfromfile %d%-.7f.%e -All:All -All telling exiftool that it must not use the locale timezone? Unfortunately the camera saved those information as makernotes and not anywhere useful (or?).

So I need to change the timezone from +2 to +3.

Btw. what did worked is to change systems settings to +3, copy tags, rewriting some with "-AllDates<XMP:DateTimeOriginal" and than setting system zone back to normal. Which looks good to me:

These files will take a bit of manual work.  As you found, you could change the system settings and there are a few posts on these forums that show a way to quickly flip time zones back and forth using an ENV variable, but those are Linux/Mac based and I'm not sure if it would work on Windows.

The other way would be set a non-UTC timestamp (Quicktime:DateTimeOriginal) or the file system timestamp (FileModifyDate)as you would above, then edit those to adjust the time by the hour, and then copy the data back into the other timestamps.  Or you could use the GlobalTimeShift option to shift the time by an hour when you copy it.

The last would probably be the easiest.  But it would require some editing of the timestamps that include the timezone, such as Quicktime:DateTimeOriginal, as a second command.  You also would have to run it only on the +03:00 time zones files and make sure no +02:00 files were included.
exiftool -GlobalTimeShift +1 -tagsfromfile %d%-.7f.%e -All:All -All /path/to/files/
Followed by (no -api QuickTimeUTC in this command)
exiftool -api "filter=s/\+02:00/+03:00/" -TagsFromFile @ -Time:All /path/to/files/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

csidirop

First of all, thank you for all your detailed answers! Never saw that an awsome forum. Hopefully one day those tags getting standardized ...

Quote from: StarGeek on August 24, 2021, 11:28:41 AM
exiftool -GlobalTimeShift +1 -tagsfromfile %d%-.7f.%e -All:All -All /path/to/files/
Followed by (no -api QuickTimeUTC in this command)
exiftool -api "filter=s/\+02:00/+03:00/" -TagsFromFile @ -Time:All /path/to/files/

The last one throw an error:
exiftool -api "filter=s/\+02:00/+03:00/" -TagsFromFile -Time:All '.\MVI_6451 [enc8].mp4'
File '-Time:All' does not exist for -tagsFromFile option

StarGeek

You forgot the @ sign.  Using the @ sign after the -TagsFromFile option in this case means it will copy all the time related tags back onto the same file after the api option changes the data.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).