Main Menu

Time shift MP4

Started by -Sulli-, August 31, 2016, 06:37:29 PM

Previous topic - Next topic

-Sulli-

Hi all

I'm trying to shift the time back 1 hour for a collection of JPG and MP4 files that were all taken on the same camera.  For testing I've copied 3 JPG files and 1 MP4 file into a folder along with the exiftool.exe and run the following code.

exiftool -AllDates-=1 DIR

This worked great on the JPG files but the date on the MP4 was changed to the date/time I copied the file to the folder.  I've copied the exiftool(-k) information below for the original and adjusted MP4 files and removed all information that I didn't think was relevant.

Original MP4
ExifTool Version Number         : 10.25
File Name                       : P1020564.MP4_original
...
File Modification Date/Time     : 2016:08:01 11:33:30+01:00
File Access Date/Time           : 2016:08:31 22:51:38+01:00
File Creation Date/Time         : 2016:08:31 22:51:28+01:00
...
Track Create Date               : 2016:08:01 11:33:31
Track Modify Date               : 2016:08:01 11:33:31
...
Media Create Date               : 2016:08:01 11:33:31
Media Modify Date               : 2016:08:01 11:33:31
...
Modify Date                     : 2016:08:01 11:33:31
...
Date/Time Original              : 2016:08:01 11:33:31
Create Date                     : 2016:08:01 11:33:31
...
Create Date                     : 2016:08:01 11:33:31.590
Date/Time Original              : 2016:08:01 11:33:31.590
Modify Date                     : 2016:08:01 11:33:31.590


Time Adjusted MP4
ExifTool Version Number         : 10.25
File Name                       : P1020564.MP4
...
File Modification Date/Time     : 2016:08:31 23:16:34+01:00
File Access Date/Time           : 2016:08:31 23:16:33+01:00
File Creation Date/Time         : 2016:08:31 22:51:28+01:00
...
Track Create Date               : 2016:08:01 11:33:31
Track Modify Date               : 2016:08:01 11:33:31
...
Media Create Date               : 2016:08:01 11:33:31
Media Modify Date               : 2016:08:01 11:33:31
...
Modify Date                     : 2016:08:01 11:33:31
...
Date/Time Original              : 2016:08:01 11:33:31
Create Date                     : 2016:08:01 11:33:31
...
Create Date                     : 2016:08:01 11:33:31.590
Date/Time Original              : 2016:08:01 11:33:31.590
Modify Date                     : 2016:08:01 11:33:31.590


This is a screenshot of what I'm seeing in Windows.



For this example file I'd like all date/times to be 1 hour earlier at 2016:08:01 10:33:31.

What am I doing wrong?

Thanks
Richard



Phil Harvey

Hi Richard,

I think that reading FAQ 24 may help.

I'll check back again later when I have more time  to think about this.

- 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 ($).

-Sulli-

#2
Hi Phil

I used the below code and it seems to have worked (at least for Windows Explorer). 

exiftool -alldates-=1 -filemodifydate-=1 \DIR

Although not all dates have changed when I view the exiftool(-k) information.

Thanks
Richard


Hayo Baan

#3
The reason you do not see the updates is that alldates does not include the quicktime dattime tags. You need to specify these explicitly (luckily you can use wildcards to match tag names), e.g, like so
exiftool '-*CreateDate-=1' '-*ModifyDate-=1' -DateTimeOriginal-=1 MOVIEFILESorDIRS
(use double quotes insteads of single quotes when on Windows, in fact here you can leave them off altogether)

This might not update the DataTimeOriginal, however if it inside makernotes (to verify run exiftool -G0:1 -DateTimeOriginal on the file. A while ago I wrote a script that is able to change these dates, please see this forum post for details. If the script doesn't fully do what you want, please let me me know so I can have a look at improving it.

Edited to complete answer...
Hayo Baan – Photography
Web: www.hayobaan.nl