Exiftool, Photos.app and GMT offset for videos

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Exiftool, Photos.app and GMT offset for videos Mon Apr 17, 2017 8:34 pm • by rpedro
I take pictures and videos with both an iPhone and a Sony camera and import them into the Photos.app in the Mac.
I do a little cleanup, delete unwanted photos and then export the original JPG files to a folder (no conversion). Pictures are automatically renamed and sorted into subfolders using Hazel and a Exiftool script.

The pictures for both devices register the correct GMT offset for date and time and Exiftool renames then perfectly.

Videos are a different story.
The iPhone register the correct GMT offset and videos are correctly renamed.
The Sony camera theoretically does it right too and when I import into the Photos.app the time is correct (in my case GMT -3) when I look at the info pane.
The Problem: When I export the original videos the metadata does not recognize the GMT offset, so the time of the videos are always 3 hours more than it should. It resets to GMT +0.

When I export the videos I don’t know which device took it unless I look at the metadata.

Is the a script or Hazel rule to identify just the videos taken with the Sony Camera and correct the GMT offset?
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

In Hazel, you can try using a date adjustment to correct the date. You can try detecting the camera via metadata (sometimes the camera model is stored there).
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:In Hazel, you can try using a date adjustment to correct the date. You can try detecting the camera via metadata (sometimes the camera model is stored there).


The video metadata does not store the camera model, weird.
The pictures are fine, I can see the Sony camera model.
I'll scan through all the fields and see if I can get anything unique to the videos taken with the Sony camera.

Thanks
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am

I found this unique tag for the Sony camera videos. It happens to be the file path of the memory card.

    Description : AVCHD: /Volumes/RPBG_SD32/PRIVATE/AVCHD/BDMV

I used this script to correct the time to GMT-3:
Code: Select all
exiftool -if '$Description eq "AVCHD: /Volumes/RPBG_SD32/PRIVATE/AVCHD/BDMV"' -globalTimeShift "-0:0:0 3:0:0" -d  %Y-%m-%d_%H%M%S  '-filename<${CreationDate;}.%e' "$1"


In case it helps someone else, what it does is look in the metadata for the Description tag and if it returns the stated value (AVCHD...), renames the file using the Creation Date -3 hours.
rpedro
 
Posts: 29
Joined: Wed Jun 27, 2012 6:17 am


Return to Support