MOV files: shot in one time zone, stored in UTC, sitting in another zone

Started by AdamF, October 15, 2016, 06:55:01 PM

Previous topic - Next topic

AdamF

I've read a whole bunch of threads on this forum about naming MOV files with date/time and the fact that MOV files typically store the created date in UTC. This all makes sense to me so I started using "-api QuickTimeUTC=1" in my script which was working fine for a while. But what about this situation? I have MOV files that I shot in Tokyo (JST), the created date is in UTC and the system that I'm running the script from (where I live) is EST. QuickTimeUTC=1 no longer works because it simply treats each MOV file the same and simply adjusts UTC based on my current time zone.

In my script, I capture the time offset from UTC in which the video was shot hoping to adjust it properly when renaming my MOV files. Two questions I have:

1. My iPhone always shows the proper date/time all videos were shot regardless of where they were shot. For instance, the aforementioned JST videos show the time they were shot when I was in Japan even though the created date is stored in UTC and I'm currently sitting in EST. How does it do this? Does iPhone store another metadata file so that it can display the proper times?

2. How would I achieve a time shift when renaming if I'm taking in the time offset as an input to the script? This is my current line of code to rename the MOV files but I'm not sure how to incorporate the shift. fName is the path and filename to be renamed. I set QuickTimeUTC=0 since I'm taking in the offset from UTC so don't want exiftool doing any shifting to my current time zone.

exiftool -api QuickTimeUTC=0 '-FileName<CreateDate' -d '%Y%m%d%H%M_%%f.%%e' '" & fName & "'"

Thank you in advance.

Phil Harvey

Hi Adam,

1. There is time zone information in the H264 video stream that ExifTool currently isn't decoding (I had a couple of tries at this, but it is complex and I have inadequate documentation, so I haven't managed to figure it out yet).

2. Did you see the -globalTimeOffset option?  I think this will allow you to do what you want.

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

AdamF

Thank for the reply, Phil. Did you mean -globalTimeShift? I couldn't find anything for -globalTimeOffset.

Phil Harvey

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

AdamF

Thank you. That seems to have worked. I need to do some more testing but just to be clear, the time shift is just used on naming and it doesn't actually update the EXIF data in the MOV file, correct? Sincerely appreciate your help.

Phil Harvey

Quote from: AdamF on October 17, 2016, 10:23:04 AM
just to be clear, the time shift is just used on naming and it doesn't actually update the EXIF data in the MOV file, correct?

It shifts the extracted date/time values.  It won't affect anything unless you write these values back again somehow.  In your case it will affect the FileName since you are only doing this: '-FileName<CreateDate'

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

AdamF

Quote from: Phil Harvey on October 17, 2016, 11:44:48 AM
Quote from: AdamF on October 17, 2016, 10:23:04 AM
just to be clear, the time shift is just used on naming and it doesn't actually update the EXIF data in the MOV file, correct?

It shifts the extracted date/time values.  It won't affect anything unless you write these values back again somehow.  In your case it will affect the FileName since you are only doing this: '-FileName<CreateDate'

- Phil

Thanks again.