Add duration via TimeShift Option possible?

Started by CRNEFmat, December 03, 2023, 05:03:15 PM

Previous topic - Next topic

CRNEFmat

Hi there,
I am trying to correct the FileCreateDate of GoPro mp4 files. The reason is that I forgot to set the date of my Hero6 Black, so the file starts from 2016/01/01 00:00:00...

In GoPro files the FileCreateDate is the end point of the video.

So it's no problem to set the FileCreateDate to the timeshifted Create Date, but now I need to add the duration time.

Is there a way using 0:0:${duration#} within the timeshift option?

Best regards,
Matthias



StarGeek

I grab streaming videos sometimes and it ends up with a FileModifyDate equal to the when the stream ended, where as I would prefer that it would be at the start.  This is what I use to subtract the duration from the FileModifyDate
"-FileModifyDate<${FileModifyDate;ShiftTime('-0:0:'.$self->GetValue('Duration','ValueConv'))}"

This uses the ShiftTime helper function and GetValue from the raw library functions.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

CRNEFmat

Hi StarGeek,
thank you so much!

Now, I modified your code along my needs for the GoPro Hero6.
-FileCreateDate<${CreateDate;ShiftTime('+5:7:7 11:46:55+1:0');ShiftTime('+0:0:'.$self->GetValue('Duration','ValueConv'))}

Original:
Create Date                               : 2016:01:01 00:00:00
File Modification Date/Time     : 2016:01:01 00:00:00+01:00
File Creation Date/Time            : 2016:01:01 00:00:00+01:00
Duration                                    : 5.39 s

Corrected to the real date and time 2021/08/08
Create Date                                :2021:08:08 11:46:55
File Modification Date/Time      : 2021:08:08 11:47:00+02:00
File Creation Date/Time             : 2021:08:08 11:47:00+02:00

Again, thank you very much!

Best,
Matthias