When I export a live photo from the photos app on my mac, it creates two separate files: a jpg and a mov. The jpg comes with all its exif data, while the mov file seems always off by five hours.
More concretely, I used exiftool -option filename. These were the results for the jpg (the yyyy-mm-dd was the same for all, so I'm just including the time output).
DateTimeOriginal 10:24:38
GPSDateTime 15:24:38Z
MediaCreateDate none
FileModifyDate 15:47:46-05:00
ModifyDate 10:24:38
These were the results for the mov.
DateTimeOriginal none
GPSDateTime none
MediaCreateDate 15:24:38
FileModifyDate 15:47:29-05:00
ModifyDate 15:24:40
The time it should display is DateTimeOriginal of the jpg. It looks like MediaCreateDate of the mov is off by five hours, due to perhaps a timezone-related glitch.
Anyway, the reason I'm asking the question is that I want to transition from using Apple photos to a plain folder tree in dropbox. The problem is having a good naming scheme to keep things sorted. I googled a bit and using Hazel (plus the script below) works just fine, if it weren't for the mov files of live photos. to sort all my photos (and live photos) with a decent naming scheme.
How can I tweak the script below to get the correct name for the mov files?
Or, alternatively
How can I use Hazel to tell each mov file to have the DateTimeOriginal of the jpg with the same name?
By this last thing I mean having a script which if fed a mov file looks for a jpg of the same name and uses its DateTimeOriginal.
By the way, the second answer here (Apple Live Photo file format) seems to explain how Photos keeps track of the metadata for the mov file, but I have no idea how to use it.
I actually found two scripts. The first here (https://www.macstories.net/reviews/better-dropbox-camera-uploads-with-camerasync/).
<?php
date_default_timezone_set("Europe/Rome");
$date = exif_read_data($argv[1],"EXIF");
$date = $date["DateTimeOriginal"];
$time = date_parse_from_format("Y:m:d H:i:s",$date);
$time = mktime($time["hour"],$time["minute"],$time["second"],$time["month"],$time["day"],$time["year"]);
touch($argv[1],$time,$time);
?>
The second (https://www.noodlesoft.com/forums/viewtopic.php?f=4&t=2218) is
exiftool -P -d '%Y.%m.%d at %H.%M.%S' \
'-filename<${FileModifyDate;}.%e' \
'-filename<${GPSDateTime;}.%e' \
'-filename<${MediaCreateDate;}.%e' \
'-filename<${ModifyDate;}.%e' \
'-filename<${DateTimeOriginal;}.%e' \
"$1"
I previously asked this on apple.stackexchange but got no attention. https://apple.stackexchange.com/questions/236377/live-photos-metadata