Video Equivalent of "DateTimeOriginal"?

Started by Roy Brian, March 03, 2018, 03:18:01 AM

Previous topic - Next topic

Phil Harvey

Then QuickTime tags wouldn't have a time zone.

Perhaps you are talking about some other date/time tags?  Use the -G0:1 option and tell me what groups they are in.

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

Roy Brian

Thanks Phil.

1. Eventually, I'm trying to make Google Photos display the local time of a given video. If a video was taken at 3 PM in France and another at 8 AM in the USA, then Google Photos should show 3 PM and 8 AM, respectively. What causes the trouble I think might be the discrepancy between the EXIF date/time tags, which don't hold any time zone references whatsoever, and the Finder file properties, which contain the +03:00 values. So what I'm trying to do is to offset this by adding the +03:00 value to the EXIF values as well.

2. In what part of the command do I put -G0:1?

Phil Harvey

The command is:

exiftool -a -s -G0:1 -time:all FILE

This will show you all date/time tags and where they came from.

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

Roy Brian

Thanks. Here you go:


[File:System]   FileModifyDate                  : 2018:01:19 17:21:01+02:00
[File:System]   FileAccessDate                  : 2018:03:23 20:23:07+03:00
[File:System]   FileInodeChangeDate             : 2018:03:23 19:21:13+03:00
[QuickTime]     CreateDate                      : 2015:01:12 16:57:37
[QuickTime]     ModifyDate                      : 2015:01:12 16:57:37
[QuickTime:Track1] TrackCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track1] TrackModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track1] MediaCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track1] MediaModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track2] TrackCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track2] TrackModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track2] MediaCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track2] MediaModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track3] TrackCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track3] TrackModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track3] MediaCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track3] MediaModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track4] TrackCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track4] TrackModifyDate              : 2015:01:12 16:57:37
[QuickTime:Track4] MediaCreateDate              : 2015:01:12 16:57:37
[QuickTime:Track4] MediaModifyDate              : 2015:01:12 16:57:37

Phil Harvey

Right.  There are no time zones stored for any of these tags.  The system ones aren't part of the file, and they reflect only your system time zone.

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

Roy Brian

So, do you have any idea how to solve this?

And how did the QuickTime stuff get there in the first place? Is it because I'm on a mac? The videos were taken with a GoPro, and then transferred directly to my MacBook. Nothing more.

Phil Harvey

QuickTime is the base format used for MP4 and many other types of videos, which is why these are in the QuickTime group.

It sounds like you want to adjust the QuickTime date/time tags according to your time zone.  The command would be something like this to subtract 2 hours from these times:

exiftool -quicktime:time:all-=2 FILE

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

Roy Brian

Wouldn't it just set the time 2 hours behind the actual time?
The times shown above are the correct ones for that video. It's just that Google Photos show as if they were taken three hours later.

Phil Harvey

My suggestion was to shift the times before putting in Google Photos so it shows the correct time.  Am I missing something?  I thought this is what you wanted.  OK, 3 hours, not 2.

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

Roy Brian

#24
Hmm, to put things simply, I'm trying to figure out the following discrepancy:

Jan 12 2018, at 16:57:37 is the correct, actual time the video was taken.

The date/time were off by 3 years, so I applied -wm w -time:all="2018:01:12 16:57:37" to the file, and ExifTool as expected did its job well, as evident in the extracted value of -createDate:



However, this is what shows up in Google Photos. Everything's correct but the time, which is exactly three hours ahead.



The same happens with every video I've tried, so I guess I'm doing something wrong.

Phil Harvey

Did you ever try adding the -api quickTimeUTC option to the command when you are writing the time as I suggested?  We seem to be going around in circles.  Doing this will have the same effect as shifting the time by whatever time zone you are in.  The problem is that some software follows the QuickTime specification and stores times in UTC, and some doesn't.  I don't know what Google expects, you have to try it either way.

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

Roy Brian

Hi Phil,

I just tried to implement what you suggested. The time is still off, albeit now by 1 hour (ahead).



This is the full command I typed in:

exiftool -wm w -api quickTimeUTC -time:all="2018:01:12 16:57:37" /Users/****/Desktop/538067733.081182.mp4

Thanks!

Phil Harvey

The 1 hour difference could be due to daylight savings time since we are in daylight savings time now but we weren't on Jan 12.

But knowing this doesn't help.  The solution is still the same: set the time to whatever you need so that google will display it properly.  I don't even know what time zone google is using.

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

Roy Brian

I see. So you're suggesting to set the time one hour earlier than what it was actually?
It will indeed solve the Google Photos issue (at least while we're in daylight savings time), but may cause problems with other platforms.


Phil Harvey

I'm saying that this is the only way you'll get it to display properly in Google Photos.  If you use other software that displays it differently, then there is probably no way to get them all to agree on the proper time.  But you don't need to worry about that if you are only using Google Photos.

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