Video Equivalent of "DateTimeOriginal"?

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

Previous topic - Next topic

Roy Brian

Hello!

In the vast array of time-related tags associated with a given picture, "DateTimeOriginal" is the usually the decisive one, in the sense that based on this tag, other websites and software (operating systems, Google Photos, Apple's Photos and more) will determine the photo's date and time and catalog it accordingly.

What's the equivalent of this tag in video files? When examining my GoPro videos I saw many candidates to this title, but couldn't reach a conclusion.

Here are those tags (there might be more, but those are the ones I managed to spot):

File Modification Date/Time
File Access Date/Time     
File Creation Date/Time   
Create Date               
Modify Date               
Track Create Date         
Track Modify Date         
Media Create Date         
Media Modify Date       
 

Thanks!

TooManyPictures

Hello,

I use MediaCreateDate or FileCreateDate for videos since many (or all) of them lack DateTimeOriginal

This is based on empirical data I encountered while trying to sort files from 12+ different devices.

StarGeek

Quote from: Roy Brian on March 03, 2018, 03:18:01 AM
Here are those tags (there might be more, but those are the ones I managed to spot):

Run exiftool -time:all -g1 -a -s FILE to see all the time tags and the groups they belong to.

I personally thing that CreateDate is probably the best.  With the command above, you'll see that there are multiple TrackCreateDate and MediaCreateDate tags, one for each track.  In a video taken straight from a camera, these probably are going to be the same as CreateDate, but if the video has been edited or if a track from some other video has been muxed in (think youtube video where the audio has been replaced by music or if a subtitle track has been added), it might be undependable.

@TooManyPictures suggestion of FileCreateDate is probably fine for a Windows system, but becomes problematic for a Mac and is non-existent on Linux, so if the file might be transferred to/from one of those systems, it becomes undependable.
* 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).

Roy Brian

#3
Thanks everyone.

Alright, then CreateDate it is!

Moreover:

1. Is it possible to append usercomment to a video?

2. I'm asking this specifically in the context of this thread, but the question is valid for all kinds of ExifTool manipulations:
How can I put a group of video files into folders, based on the years and months of a video's CreateDate?
ExifTool should refer to the years and months of the files only, and put them into folders accordingly, in the following naming format: yyyy-mm.

Thanks!

StarGeek

Quote from: Roy Brian on March 05, 2018, 02:49:24 PM
1. Is it possible to append usercomment to a video?

Maybe, sorta...

It depends upon multiple variables.  First, if exiftool can write to the file.  For example, if it's an MKV, then no.  But since you talk about Apple, I'm going to assume MP4/MOV.  In this case, exiftool can write to the XMP-exif:UserComment tag.  With regards to the EXIF:UserComment tag, EXIF blocks in video files aren't very common and exiftool can't create them.  The question then becomes whether the other programs you are using can read the XMP-exif:UserComment tag or not.

Quote2. I'm asking this specifically in context of this thread, but the question is valid for all kinds of ExifTool manipulations:
How can I put a group of video files into folders, based on the years and months of a video's CreateDate?
ExifTool should refer to the years and months of the files only, and put them into folders accordingly, in the following naming format: yyyy-mm.

Take a look at the -d option, the Renaming examples, and the FileName and Directory tags pages for examples.
* 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).

Roy Brian

Thanks! (I absolutely love this software!)

I adjusted the CreateDate value but Google Photos for some reason displays the time two hours late (all other values are correct).
I guess it's a timezone thing, as the video was taken in a different one (GMT+1) than where I'm now at (GMT+2). How can I fix that?

StarGeek

I don't know, as Google Photos and video files are not something I've extensively tested.  See this recent thread.
* 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).

Roy Brian

Yep, Google Photos is indeed quite buggy. So I think I'll try first taking the "brute force" approach and simply changed every time-related tag to the desired value.
How do I do that quickly? (there are hundreds of those)
I noticed that many of the tags include a "+02:00" value that might confuse Google Photos.

Roy Brian

Well, I tried to "brute force" every date-time related tag with -time:all and -alldates but Google Photos displayed time is still two hours ahead.

I examined the file further and there are some tags with a +02:00 suffix, which I suspect causes the problem. For example:



I live in a UTC+02:00 time-zone, and that might explain the appearance of this, but the video was taken in a UTC+01:00 time-zone.

Anyhow, is it possible to simply remove any reference to a time-zone whatsoever, and simply store the date-time as is?


Phil Harvey

Sorry, I missed your question about how to set all date/time tags at once.

exiftool -wm w -time:all="SOME TIME" DIR

I doubt the time zone is confusing google, but you could try not including a time zone in the above command.  The FileXxxx times won't be affected by this command -- they are stored in the filesystem, not in the file itself.

- 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,

Thanks for the reply.

For a bunch of videos, I want to apply the same date and time under the "Date Created" Finder column and apply it to all date/time tags using the command you specified.

Is this achievable?

Moreover, I guess what confuses Goolge Photos are the UTC values appended to the end of the actual date/time values. Is there's any way to simply erase the UTC values?
I don't see why they're even there, the true time where I live is the time pictured below WITHOUT the UTC values (in other words, the time shown below WITH the UTC values translates to two/three hours ahead of the current time here).


Phil Harvey

#11
The file times are correct for your local system time.  The "+02:00" and "+03:00" just indicate the time zone that was active at that time.  So it would be 17:19:17 local time, and +02:00 indicates that this was 15:19:17 UTC.

To copy from the MacOS file creation time, do this:

exiftool -wm w "-time:all<MDItemFSCreationDate" DIR

If Google Photos doesn't like these times, then try adding -api QuickTimeUTC to the command.

- 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 for the reply Phil.

How do I set the time zone to +3 UTC for all date/time-related tags?

Phil Harvey

You don't.  If you are using -api QuickTimeUTC, then all QuickTime tags are stored in UTC, and converted to the local system time for display purposes.  So they will appear in whatever time zone you have set for your system.

- 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

And without using the -api QuickTimeUTC?