Change mp4 filename to MediaCreatedate

Started by castellum, August 03, 2019, 06:53:35 AM

Previous topic - Next topic

castellum

Hi There,

I am very new to this so have lots to learn
I would like to rename a couple of hundred files to a format something like this. Track_YY/MM/DD_HH/MM
The date should be the Track or media create date.


I read a lot about this bu somehow using the examples in this Forum I keep getting error messages like File not found.
exiftool -d %Y-%m-%d-%H%M_%%f.%%e "-VIRB_0001.mp4<mediacreatedate"
MAybe I just simply don't understand teh use of the program jet. In my exampel -VIRB_0001.mp4 is the original filename.

Can anybody help with the correct tags etc?

Thanks
Menno

castellum

I think I figured it out  ;)
Just had to ad the filename or wildcard at front.

exiftool *.mp4  -d %Y-%m-%d-%H%M_%%f.%%e "-filename<mediacreatedate"

The orriginal filename is now added to the end of the new filename. "2019-07-15-0135_VIRB_0156.mp4"
How can I replace that part by something else?

Kind regards

Phil Harvey

Quote from: castellum on August 03, 2019, 07:23:59 AM
exiftool *.mp4  -d %Y-%m-%d-%H%M_%%f.%%e "-filename<mediacreatedate"

The orriginal filename is now added to the end of the new filename. "2019-07-15-0135_VIRB_0156.mp4"
How can I replace that part by something else?

Like this?:

exiftool -d %Y-%m-%d-%H%M_SOMETHING_ELSE.%%e "-filename<mediacreatedate" -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 ($).

castellum

#3
Great, Thanks

The additional -Ext is to make sure the original extension is not lost I assume

I have one more question.
After analyzing the files I noticed the Time stamp in the original files is 8hours 'off'. Probably due to a wrong setting in the Camera's config.
Can I add 8hours to the MediaCreateDate?
I need to match the MP4 to data provided from a GPS tracker.

Thanks

Update
I got it
I did this
exiftool VIRB_0001.mp4 "-mediacreatedate+=0:0:0 8:0:0"





StarGeek

Quote from: castellum on August 03, 2019, 08:50:18 AM
The additional -Ext is to make sure the original extension is not lost I assume

No, the -ext (extension) option is there to tell exiftool to only process files with the specified extension, in this case, .MP4

QuoteAfter analyzing the files I noticed the Time stamp in the original files is 8hours 'off'. Probably due to a wrong setting in the Camera's config.

Was the video taken on the west coast of North America?  If so, then the time has been properly set according to the spec.  The time stamps in video files are supposed to be set in UTC.  See the fourth paragraph under Quicktime tags.

Try adding -api QuicktimeUTC to see if it's the correct time, assuming you're still in the same time zone as where the video was shot.
* 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).

castellum

QuoteWas the video taken on the west coast of North America?  If so, then the time has been properly set according to the spec.  The time stamps in video files are supposed to be set in UTC

These specific ones where taken in the French Alps.
I can only assume the setup of the camera was not correct.
You can set the Timezone there manually.
I did a factory reset and set it to Auto (Based on the GPS location) now.
Dates seem to be correct now. Just took an example.

File Modification Date/Time : 2019:08:03 17:01:58+02:00
File Access Date/Time         : 2019:08:03 17:01:58+02:00
File Creation Date/Time      : 2019:08:03 17:01:53+02:00
Create Date                       : 2019:08:03 17:01:53
Modify Date                       : 2019:08:03 17:01:53

These are all UTC times. I was at 19:01 myself

 

Hayo Baan

Hmm, if you're at 19:01, wouldn't file modification time need to be 19:01:58+02:00 (i.e. UTC 17:01:58)?

Also, since CreateDate and ModifyDate now look to be UTC times, make sure you use the -api QuickTimeUTC=1 command-line option. This will show the media times in your local time zone (+02:00, I presume?)
Hayo Baan – Photography
Web: www.hayobaan.nl