Hi all,
Wonder if you could help me?
I've used Photomator to batch convert a bunch of HEIC files to still image MP4 video files. This works fine but it didn't copy across the original creation dates from the HEIC source files.
So I used exiftool to do that - using this script (MacOS) -
for file in ./*.heic; do
exiftool -overwrite_original -TagsFromFile "$file" "-CreateDate>alldates" "${file%.heic}.mp4"
done
When I run exiftool to analyse any of the mp4 files, all the dates have been updated as planned...but
When I look at the mp4 file in Mac OS's Finder or when I import the mp4 file into DaVinci resolve; the creation date is still listed as the wrong date rather than the exif tags that I've just written.
Does anyone know how I can fix this?
Many Thanks
MacOS Finder shows the filesystem FileCreateDate as the creation date. AllDates is a shortcut for the common EXIF date/time tags, and doesn't include FileCreateDate. Try adding "-CreateDate>FileCreateDate" to your command, and maybe write FileModifyDate as well.
- Phil
Great stuff, thanks Phil - works a treat. Thanks!
This is what I updated the script to for anybody who has similar question in the future:
for file in ./*.heic; do
exiftool -overwrite_original -TagsFromFile "$file" "-CreateDate>alldates" "-CreateDate>FileCreateDate" "-CreateDate>FileModifyDate" "${file%.heic}.mp4"
done
This is common mistake #3 (https://exiftool.org/mistakes.html#M3).
You can do this in a single ExifTool command. I could give you the command, but I don't know that "${file%.heic}.mp4" is doing. Maybe it is replacing the ".heic" with ".mp4", in which case the command could be:
exiftool -overwrite_original -TagsFromFile %d%f.heic "-CreateDate>alldates" "-CreateDate>FileCreateDate" "-CreateDate>FileModifyDate" -ext mp4 .
- Phil
Quote from: Phil Harvey on May 29, 2024, 10:11:43 AMThis is common mistake #3 (https://exiftool.org/mistakes.html#M3).
You can do this in a single ExifTool command. I could give you the command, but I don't know that "${file%.heic}.mp4" is doing. Maybe it is replacing the ".heic" with ".mp4", in which case the command could be:
exiftool -overwrite_original -TagsFromFile %d%f.heic "-CreateDate>alldates" "-CreateDate>FileCreateDate" "-CreateDate>FileModifyDate" -ext mp4 .
- Phil
Thanks Phil - my script was reading the tags from a batch of source .heic files and then applying them to the converted .mp4 files. Sorry - my mistake for not including the narrative