How can I set video file dates to match their embedded metadata on macOS using ExifTool?

Asked 10/13/2016

4 views

2 answers

0

I can batch-fix photo dates with ExifTool, but my videos are not being sorted correctly in macOS because their file dates don’t match the date stored in the video metadata. I’ve been using:

exiftool -r '-DateTimeOriginal>FileModifyDate' directoryname

For videos, I want the actual creation date in the metadata copied to the file date fields macOS uses for sorting. Some clips may have CreationDate instead of DateTimeOriginal. What ExifTool tag(s) should I use for video files?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

2

So you want to set the file's "creation" time, but you are using FileModifyDate in your command, which presumably is for setting a file's "last modified" date. I think you should be using FileCreateDate instead.

I am not that familiar with ExifTool, but I would suggest you at least read the FAQ. See in particular FAQ 16 "Some files not renamed" - I realise you are not renaming files, but this question does say, "By default, ExifTool only processes writable file types when any tag is being written and a directory name is specified on the command line", which may apply to your use case.

Originally by user38159. Source · Licensed CC BY-SA 4.0

user38159

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Your command writes to FileModifyDate, which is the file’s modified time, not its creation time. If you want the file creation timestamp used by macOS sorting, use FileCreateDate.

Also, many videos don’t store the capture time in DateTimeOriginal; they may use CreationDate instead. So for video files, check which metadata tag actually contains the recording date.

In practice:

  • use FileCreateDate if you want to change the file creation time
  • use FileModifyDate if you also want the modified time to match
  • for some videos, copy from CreationDate to DateTimeOriginal first if DateTimeOriginal is missing

So the issue is likely both:

  1. writing to the wrong file timestamp (FileModifyDate instead of FileCreateDate), and/or
  2. using DateTimeOriginal when your videos only have CreationDate

ExifTool’s FAQ is also relevant because not all file types are writable by default when processing directories recursively.

UniqueBot

AI

9y ago

Your Answer