Video Equivalent of "DateTimeOriginal"?

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

Previous topic - Next topic

Roy Brian

Thanks for the help. I think I'd rather set the true time and just live with the 1-hour offset.

Anyway, I made a small list containing all ExifTool commands that were suggested as various solutions in the recent topics I opened here. To maximize my learning, I'm going to utilize this discussion to ask for some explanations for the following:


-v ARGS | grep -E "(Error|Nothing)"
FindStr
-v2
-progress
-g1
-a
-s
-wm w
-G0:1
-a
-s


And, I would love to hear some more about the usage of < or > and -TagsFromFile @.

Is there a page listing ALL ExifTool commands with an explanation (and usage example) for each?

Phil Harvey

This is all explained in the exiftool application documentation (download in PDF format).

You can also see this documentation by running exiftool with no arguments.

I don't know about FindStr though, and "grep" is another utility that has its own documentation.

- 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 a lot, Phil.

And a small update:

Apple Photos also shows the videos with an offset of 2 hours:



No matter what the command is. It's driving me crazy. Should I just live with it?
A makeshift solution would be to set -time:all= two hours behind, but I'm afraid it would "get back" at me one day should those services should get repaired.
I believe it all stems from the +03:00 values in those 3 believes. If only there was a way to remove those...



Phil Harvey

It looks to me as if Apple Photos is doing the correct thing, and should agree with ExifTool if you use the -api quicktimeutc option, which is actually per the QuickTime specification (but not the default in ExifTool because most cameras don't write it this 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'm helpless. Google Photos shows the time of video as if it was taken three hours ahead; Apple's Photos shows two hours (I guess the 1-hour difference between the apps comes from DST observation in Google Photos).
Using -wm w -api quickTimeUTC doesn't change the output, so I was using what I'd figure to be simplest command to set all times correctly: exiftool -time:all=. Doesn't help anyway.
There are only 2 ways I could think of that would circumvent this and show the video's true time: either use exiftool -time:all= to set the time to be 3 hours earlier than what it really was, or, in Google Photos, set the time zone to be to be GMT+00:00. Both are less than ideal solutions, of course.

Phil Harvey

I can't reproduce your problem with Apple Photos.  The date/time it displayed by Apple Photos was the same as I set with this command:

exiftool -wm w -time:all="2017:01:02 03:04:05" -api quicktimeutc test.mp4

And ExifTool shows this:

> exiftool -api quicktimeutc -time:all -G1 -a test.mp4
[System]        File Modification Date/Time     : 2018:04:02 10:55:05-04:00
[System]        File Access Date/Time           : 2018:04:02 10:56:25-04:00
[System]        File Inode Change Date/Time     : 2018:04:02 10:55:22-04:00
[QuickTime]     Create Date                     : 2017:01:02 03:04:05-05:00
[QuickTime]     Modify Date                     : 2017:01:02 03:04:05-05:00
[Track1]        Track Create Date               : 2017:01:02 03:04:05-05:00
[Track1]        Track Modify Date               : 2017:01:02 03:04:05-05:00
[Track1]        Media Create Date               : 2017:01:02 03:04:05-05:00
[Track1]        Media Modify Date               : 2017:01:02 03:04:05-05:00
[Track2]        Track Create Date               : 2017:01:02 03:04:05-05:00
[Track2]        Track Modify Date               : 2017:01:02 03:04:05-05:00
[Track2]        Media Create Date               : 2017:01:02 03:04:05-05:00
[Track2]        Media Modify Date               : 2017:01:02 03:04:05-05:00


My current time zone is -04:00, and on Jan 2 it was -05:00.

- 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

Eureka! I saw your comment and decided (for some reason, maybe our of despair) to give this command a shot:
exiftool -api quicktimeutc -time:all+="3:0:0 0:0:0" -G1 -a
And guess what, it worked!
Apple Photos now shows the correct time, and Google Photos shows an offset a just an extra hour. I think I could live with that. Any idea what happened here?

Phil Harvey

There seem to be a number of things that don't add up each time you post:

Quote from: Roy Brian on April 02, 2018, 11:26:25 AM
Eureka! I saw your comment and decided (for some reason, maybe our of despair) to give this command a shot:
exiftool -api quicktimeutc -time:all+="3:0:0 0:0:0" -G1 -a

1. -api quicktimeutc  will make no difference when just shifting times

2. -time:all+="3:0:0 0:0:0"  will add 3 years to the date/times

3. -G1 -a  are meaningless options when writing

- 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

You're right, I apologize, I was so excited upon reaching a solution that I forgot to mention a few facts:

When I first noticed those imprecisions with the videos, with the limited ExifTool knowledge I have, I used exiftool -time:all to check the video's date/time values, and as you can see, only the years appear to be incorrect. The time is fine (the video was taken at 2018:01:06 14:16:15).



So when I saw the command you used yourself for testing (exiftool -api quicktimeutc -time:all -G1 -a), and gave it a shot, I saw that not only the date was off by 3 years, but so does the time - by two hours!



That's what I've been seeing in Apple Photos (and Google Photos adds an additional hour, probably due to DST observation). So every time I typed exiftool -api quicktimeutc -time:all+="3:0:0 0:0:0" -G1 -a, apparently I should have decreased two hours from the time as well.

Still, Google Photos adds an additional hour, but I think I can live with that.

I have no idea how did that 16:16:15 got there in the first place. And, how come there are such critical discrepancies between dates inside the same file?

Moreover, from now on, should I use -quicktime utc to check and edit the values of every video I have?

Thanks!

Phil Harvey

I see no discrepancies.  Everything is consistent with your camera clock being set to the correct day/time in 2015 instead of 2018, and the camera not knowing the time zone.  Since the camera doesn't know the time zone, it stores the times as local time instead of UTC.  But Apple Photos does know the time zone, and assumes the times in the videos are UTC, so you get this difference when it shows them in the local system time zone.  If you set your camera to the correct UTC time, then Apple Photos should show the correct time.  ExifTool should be used with the -api quicktimeutc option (when reading and writing) to agree with Apple Photos, or without the -api quicktimeutc option to agree with what the camera displays.  (Hence the need for the -api quicktimeutc option.)
...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.

That's odd because some of the videos were taken with the newest GoPro model which offers Geotagging capabilities for media.

Anyway, do you believe Google Photos relies on -api quicktimeutc as well?

Phil Harvey

I would think that Google Photos assumes the times are stored as UTC, but they may have a bug with their handling of daylight savings times.
...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 ($).