How to change Media Created Date in Exiftool?

Katarina Perović picture Katarina Perović · Dec 25, 2018 · Viewed 14k times · Source

I have some MP4 videos that don't have Media Created date and time because they were recorded with Instagram camera. I want to set the date and time and I found out that I can do that with Exiftool software. I know that the software works by typing command lines, but I don't know where I should type what. I searched on Google and didn't find any helpful results.

I downloaded the software and got "exiftool(-k).exe" file. What should I do now? I have no idea how it works. I hope somebody can write simple steps just to set that Media Created date.

MP4 file with Media Created property

MP4 file without Media Created property

Answer

StarGeek picture StarGeek · Dec 26, 2018

While the question probably belongs on Superuser.com, here's the answer.

First you will probably want to rename the exiftool(-k).exe to just exiftool.exe and place it someplace in your PATH (see install exiftool-Windows).

Then you will want to use one of these commands. In the case of your example filename, the filename appears to have been named for the time it was taken i.e YearMonthDay_HourMinutesSeconds. In that case you can simply use
exiftool "-CreateDate<${Filename}" 20181223_000542.mp4

This will work correctly as long as the image was taken in the same time zone as the computer your currently working on. If not, you will have to add the time zone like this: ${Filename}-04:00. This is because the CreateDate tag for MP4 files is supposed to be UTC and Windows properties will read it as such. Exiftool will automatically write the correct time based upon the local computer time.

If you need to set the time to something different than what the filename is, then you would use (adding the time zone if needed):
exiftool "-CreateDate=2018:12:23 00:05:42" 20181223_000542.mp4

These commands creates backup files. Add -overwrite_original to suppress the creation of backup files. Add -r to recurse into subdirectories. If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation. You can process as many files and/or directories as you can put on the command line, so if you wanted to process all the files in c:\Dir1 and C:\Dir2, you would just list both of them at the end of the command c:\Dir1 C:\Dir2