ExifTool Forum

ExifTool => Newbies => Topic started by: exifex on June 03, 2020, 11:05:09 AM

Title: Date and time tags in MP4 video files
Post by: exifex on June 03, 2020, 11:05:09 AM
Hi, I'm using exiftool 11.99 to shift the time of one camera forward by 46 minutes and 8 seconds to match the other camera. I have both JPG images and MP4 videos in a folder. This command worked well, but only with JPG files:

exiftool "-AllDates+=0:0:0 0:46:08" .

Unfortunately, macOS still displays the old time on the MP4 files. Upon further inspection using this command:

exiftool -a -s -G1 -time:all 123.MP4

It looks like my MP4 files contain many more tags related to time and date. How can I shift all relevant tags easily, and how do I know which ones to change without resorting to guesswork? Some tags also seem to be using a longer format to accommodate time zones:

[System]        FileModifyDate                  : 2020:05:25 10:27:02-05:00
[System]        FileAccessDate                  : 2020:06:03 09:32:10-05:00
[System]        FileInodeChangeDate             : 2020:06:03 09:32:10-05:00
[QuickTime]     CreateDate                      : 2020:05:25 13:31:34
[QuickTime]     ModifyDate                      : 2020:05:25 13:31:34
[Track1]        TrackCreateDate                 : 2020:05:25 11:13:10
[Track1]        TrackModifyDate                 : 2020:05:25 11:13:10
[Track1]        MediaCreateDate                 : 2020:05:25 11:13:10
[Track1]        MediaModifyDate                 : 2020:05:25 11:13:10
[Track2]        TrackCreateDate                 : 2020:05:25 11:13:10
[Track2]        TrackModifyDate                 : 2020:05:25 11:13:10
[Track2]        MediaCreateDate                 : 2020:05:25 11:13:10
[Track2]        MediaModifyDate                 : 2020:05:25 11:13:10
[IFD0]          ModifyDate                      : 0000:00:00 00:00:00
[ExifIFD]       DateTimeOriginal                : 2020:05:25 10:27:02
[ExifIFD]       CreateDate                      : 2020:05:25 10:27:02
[Panasonic]     TimeStamp                       : 2020:05:25 16:27:02
[ExifIFD]       SubSecTime                      : 651
[ExifIFD]       SubSecTimeOriginal              : 651
[ExifIFD]       SubSecTimeDigitized             : 651
[Composite]     SubSecCreateDate                : 2020:05:25 10:27:02.651
[Composite]     SubSecDateTimeOriginal          : 2020:05:25 10:27:02.651
[Composite]     SubSecModifyDate                : 0000:00:00 00:00:00.651

Title: Re: Date and time tags in MP4 video files
Post by: StarGeek on June 03, 2020, 11:13:23 AM
Try shifting Quicktime:Time:All.

AllDates only affects three tags, DateTimeOriginal, ModifyDate, and CreateDate.  It's main use is for modifying the most common EXIF time stamps.  There just happens to be some overlap between EXIF and Quicktime tags.

In your file, the EXIF based ones will not be editable because EXIF is non-standard in video files, though camera makers keep forcing it into the file.

The System tags are part of the underlying OS and not embedded metadata.  The Composite tags are tags exiftool creates from combining multiple other tags and are not embedded.
Title: Re: Date and time tags in MP4 video files
Post by: exifex on June 03, 2020, 01:28:53 PM
Since EXIF tags are non-standard and therefore non-editable in video files, could there be date confusion issues with some software that reads those tags, and if so, can they be removed completely?

Or should I leave them as-is?
Title: Re: Date and time tags in MP4 video files
Post by: Phil Harvey on June 03, 2020, 02:38:04 PM
Basically, there is nothing but ExifTool that will read the EXIF in MP4 videos.

- Phil
Title: Re: Date and time tags in MP4 video files
Post by: jwilleke on June 03, 2024, 11:56:59 AM
Thanks for the explanations.

So I am using

exiftool --ext pdf --ext json --ext log --ext _gs --ext gsl -r -d /Volumes/hd5/media/photos/%Y/%Y-%m "-directory<dateTimeOriginal" .

So to sort "all" media files into folder based on /%Y/%Y-%m and it appears this does not work on mp4 or DNG files.


Any suggestion?
Title: Re: Date and time tags in MP4 video files
Post by: StarGeek on June 03, 2024, 12:31:15 PM
Use CreateDate as the secondary source tag.

Note #1 from the -TAG[+-^]=[VALUE] option (https://exiftool.org/exiftool_pod.html#TAG---VALUE)
QuoteMany tag values may be assigned in a single command. If two assignments affect the same tag, the latter takes precedence

"-directory<CreateDate" "-directory<dateTimeOriginal"