News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Modify Date Taken from filename in video

Started by user56468, June 24, 2020, 10:58:22 PM

Previous topic - Next topic

user56468

I converted all my home video's with Handbrake but the "Date Taken" field has changed to a recent date.

The filename for example is 'Vid 20160131 204350' and with Advanced Renamer i changed Modify, Create, Last Opened but Date Taken still stays the same.

Is there an command in my case? I hope so because this give me sorting problems in OneDrive.

I tried "-datetimeoriginal<filemodifydate" -P -overwrite_original DIR" without any succes.

See attachments.

Thank you very much.

StarGeek

While DateTimeOriginal exists in video files, it's not the tag that Windows reads (Apple Photos does but also needs a timezone).

Handbrake will change these tags to the current time (not sure if it's when the writing starts or ends)
CreateDate
ModifyDate
TrackCreateDate
TrackModifyDate
MediaCreateDate
MediaModifyDate


The first is the one that Windows will read and display under Properties, though you can change the others as well.

I'm guessing that the filename is the date/time that you want the video to be set to?  If so, you could run this command:
exiftool -api QuickTimeUTC "-CreateDate<Filename" /path/to/files

If you wanted to update all the above timestamps, you could use
exiftool -api QuickTimeUTC "-CreateDate<Filename" "-ModifyDate<Filename" "-Track*Date<Filename" "-Media*Date<Filename" /path/to/files

These commands create backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories. 
* 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).

user56468

Thank you so much sir for contributing in your free time to help other people! It works, changed hundreds of video's in a few seconds ❤.