ExifTool Forum

ExifTool => Newbies => Topic started by: castellum on August 03, 2019, 06:53:35 AM

Title: Change mp4 filename to MediaCreatedate
Post by: castellum on August 03, 2019, 06:53:35 AM
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
Title: Re: Change mp4 filename to MediaCreatedate
Post by: castellum on August 03, 2019, 07:23:59 AM
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
Title: Re: Change mp4 filename to MediaCreatedate
Post by: Phil Harvey on August 03, 2019, 08:15:25 AM
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
Title: Re: Change mp4 filename to MediaCreatedate
Post by: castellum on August 03, 2019, 08:50:18 AM
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"




Title: Re: Change mp4 filename to MediaCreatedate
Post by: StarGeek on August 03, 2019, 10:20:27 AM
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 (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension) 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 (https://exiftool.org/TagNames/QuickTime.html).

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.
Title: Re: Change mp4 filename to MediaCreatedate
Post by: castellum on August 03, 2019, 01:08:57 PM
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

 
Title: Re: Change mp4 filename to MediaCreatedate
Post by: Hayo Baan on August 03, 2019, 01:15:42 PM
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?)