Adjust all dates/times by duration of a video

Started by gheppell, August 20, 2025, 06:31:22 PM

Previous topic - Next topic

gheppell

Hello.

Is there a command in the exiftool command processor that will allow me to shift all dates/times by the duration of the file (MP4 videos in my case)?  

I know that I can do this for a specific tag using something like the following as an example:
-FileModifyDate<${FileModifyDate;ShiftTime('-0:0:'.$self->GetValue('Duration','ValueConv'))}

However, I would like to do this for every tag that has a date/time instead of having to do this for each specific tag.  

Any ideas?
Thank you


Mario

The ExifTool Command Processor uses the standard ExifTool ARG file syntax. You can use the same commands in the ECP you can use in an ARG file - one argument per line (not one option per line!). You can directly use your command.

Keep in mind that MP4 is a container, it can contain all kinds of data, from video streams to audio streams to captions etc. 
Fiddling with "all" in an MP4 file may have unwanted side-effects, so make sure you know exactly what you are doing...

There is a reason IMatch uses only the two XMP timestamps, even for video files. Don't break things.