Change GoPro created date to EXIF date

Started by Mr. Mohon, May 11, 2022, 11:56:59 PM

Previous topic - Next topic

Mr. Mohon

Hi. I am trying to create an automator workflow that would utilize the ExifTool to scan the metadata within the video footage (GoPro videos) to find the original "Created Date" or "Track Create Date" and change the files "Date Created" to match using touch command. The reason I want this is that the camera uploads to the GoPro cloud automatically. When I download the file from the cloud to my computer the "Date Created" shows as the date it was downloaded and not the date the video was shot. I understand why this is happening but this makes it almost impossible to organize. Especially if I rename the file to something else. So It would be ideal to drop the file onto an automator workflow that would change the "Date Created" to the "Created Date" or Track Create Date" found within the metadata.


Gary over at MacMost.com did a great video on how to do this with photos but it does not work with videos, or at least not with the GoPro videos I am using. Here is a link to what he did with the photos. https://macmost.com/how-to-change-file-creation-dates-to-match-photo-metadata.html

StarGeek

The basic command would be something like
exiftool '-FileCreateDate<CreateDate' /path/to/files

But there is something to watch out for.  The time stamp in video files is supposed to be in UTC, but not all cameras will write it that way because they don't know what time zone they are in.  You would first want to run
exiftool -CreateDate file.mp4
and check if the time is in UTC or local time.  If the time is local time, then the above command is what you want.

If the time zone is already in UTC and you're computer is in the same time zone, then you want to adjust from UTC to local time by adding the -api QuickTimeUTC option
exiftool -api QuickTimeUTC '-FileCreateDate<CreateDate' /path/to/files
And exiftool will automatically adjust the video time to the correct local time.

AS for making that an Automator script, I can't help you there as I'm on Windows, but there are multiple examples in these forums.  The search here is disabled, but you can search using Google by adding site:exiftool.org to the search.  Example search
* 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).

Hubert

Just a couple of riders:

As I understand it, ExifTool uses the setfile Terminal command to change -FileCreateDate on macOS. This in turn requires the installation of the Xcode Command Line Tools. You don't need a full install of Xcode or an Apple Developer account. There's a fairly clear explanation at https://www.freecodecamp.org/news/install-xcode-command-line-tools/.

I'd also suggest getting your ExifTool command running to your satisfaction in Terminal before trying to wrap it in an Automator workflow. Debugging both at the same time is fraught with difficulties.


Mr. Mohon

So far I have been working with someone and this is what we came up with so far. It changes the "Date Created" to the date found within the metadata which is exactly what I was looking to do. Now I am trying to convert it into an automator workflow.

touch -t `exiftool -CreateDate -d "%Y%m%d%H%M.%S" -s3 /path/to/file.mp4` /path/to/file.mp4