Video file creation date not reading after update?

Started by MrSimmo, May 28, 2024, 11:48:01 AM

Previous topic - Next topic

MrSimmo

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

Phil Harvey

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

MrSimmo

#2
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

Phil Harvey

This is common mistake #3.

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