Canon EOS 1100D videos : Date shift

Started by SamMat, March 16, 2020, 06:02:52 PM

Previous topic - Next topic

SamMat

Hello ! I discoverd ExifTool, it's fantastic ! Thank you Phil Harvey !

I used my Canon EOS 1100D to take photos and videos of my family. But videos taken with the Canon EOS 1100D have an incorrect shooting date. It is offset by 1 hour (Brussels time, UTC+1) in winter and 2 hours in summer (UTC+2). This offset is very annoying when you want to view photos and videos in chronological order (the date of the photos is correct).

Here is the offset (difference between the time displayed in the viewing application and the actual time of shooting), for each tested software:

Summer / Winter: (0 is OK, means no offset)
- Mac Photos app (Catalina): + 2h / + 1h
- Windows 10 Photos app: + 2h / + 1h
- Windows 10 file properties (Media created): + 2h / + 1h
- Adobe Bridge: 0/0
- iCloud (web): + 2h / + 1h
- OneDrive (web): 0/0
- Google Photos (web): + 2h / + 1h
- iPhone iOS 13 Photos app: + 2h / + 1h

This means, for example that a video taken at 12:00 during summer appears at 14:00 in Mac Photos app (+2h).

To fix the date of the videos, I use the ExifTool tool (it's magic !!!  :D ).

The command lines are:
1. Display date type metadata: exiftool.exe -time:all -a -G1 -s -api quicktimeutc FILE / DIR
2a. For summer videos, remove 2h from CreateDate: exiftool.exe "-quicktime:createdate-=0:0:0 2:0:0" -api quicktimeutc FILE / DIR
2b. For winter videos, remove 1 hour from CreateDate: exiftool.exe "-quicktime:createdate-=0:0:0 1:0:0" -api quicktimeutc FILE / DIR
3. Correct the main dates: exiftool.exe "-alldates<quicktime:createdate" -api quicktimeutc FILE / DIR

After these corrections, the result looks as follows:
- Mac Photos app (Catalina): 0/0
- Windows 10 Photos app: 0/0
- Windows 10 file properties (Media created): 0/0
- Adobe Bridge: 0/0
- iCloud (web): not tested
- OneDrive (web): -2h / -1h (!)
- Google Photos (web): 0/0
- iPhone iOS 13 Photos app: 0/0

As you can see, the problem is fixed for most software (but not OneDrive web) !  :D

Here is a result, for a video taken in summer (UTC + 2), on August 6, 2018 at 19:59:34:
exiftool.exe -time:all -a -G1 -s -api quicktimeutc [[FILE = "Canon_20180806_195934-MVI_0837_OK.MOV"]]
[System]        FileModifyDate                  : 2020:03:15 12:07:55+01:00
[System]        FileAccessDate                  : 2020:03:15 12:28:00+01:00
[System]        FileCreateDate                  : 2020:03:15 12:07:55+01:00
[IFD0]          ModifyDate                      : 2018:08:06 19:59:34
[ExifIFD]       DateTimeOriginal                : 2018:08:06 19:59:34
[ExifIFD]       CreateDate                      : 2018:08:06 19:59:34
[ExifIFD]       SubSecTime                      : 46
[ExifIFD]       SubSecTimeOriginal              : 46
[ExifIFD]       SubSecTimeDigitized             : 46
[XMP-exif]      DateTimeOriginal                : 2018:08:06 19:59:34+02:00
[XMP-xmp]       CreateDate                      : 2018:08:06 19:59:34+02:00
[XMP-xmp]       ModifyDate                      : 2018:08:06 19:59:34+02:00
[UserData]      DateTimeOriginal                : 2018:08:06 19:59:34+02:00
[QuickTime]     CreateDate                      : 2018:08:06 19:59:34+02:00
[QuickTime]     ModifyDate                      : 2018:08:06 19:59:34+02:00
[Track1]        TrackCreateDate                 : 2018:08:06 21:59:34+02:00
[Track1]        TrackModifyDate                 : 2018:08:06 21:59:34+02:00
[Track1]        MediaCreateDate                 : 2018:08:06 21:59:34+02:00
[Track1]        MediaModifyDate                 : 2018:08:06 21:59:34+02:00
[Track2]        TrackCreateDate                 : 2018:08:06 21:59:34+02:00
[Track2]        TrackModifyDate                 : 2018:08:06 21:59:34+02:00
[Track2]        MediaCreateDate                 : 2018:08:06 21:59:34+02:00
[Track2]        MediaModifyDate                 : 2018:08:06 21:59:34+02:00
[Composite]     SubSecCreateDate                : 2018:08:06 19:59:34.46
[Composite]     SubSecDateTimeOriginal          : 2018:08:06 19:59:34.46
[Composite]     SubSecModifyDate                : 2018:08:06 19:59:34.46


Now, my questions :
- Is my method OK, or do I miss something? (I'm a new user of ExifTool)
- In steps, 2a and 2b, how can I avoid to write  "-=0:0:0 2:0:0" (for summer videos) and "-=0:0:0 1:0:0" (for winter videos)? (I would like to have a single command suitable for summer and winter)
- How could I merge steps 2 and 3 in only one step ?
- The date of the videos in OneDrive (web) are OK before ExifTool process, but after it's KO... what is happening? I can not find the solution for this...

When I have an answer to these 4 questions, I will be able to apply the correction to all of my videos (there are several hundred, that's why I prefer to be certain of what I do).

Attachment: one video example.

THANK YOU VERY MUCH!  :)

StarGeek

#1
Quote from: SamMat on March 16, 2020, 06:02:52 PM
- In steps, 2a and 2b, how can I avoid to write  "-=0:0:0 2:0:0" (for summer videos) and "-=0:0:0 1:0:0" (for winter videos)? (I would like to have a single command suitable for summer and winter)
- How could I merge steps 2 and 3 in only one step ?

I can't remember if there was an easy way to do this or not.  I'll have to get back to you if Phil doesn't answer first. edit: searched the forums, tried a bunch of things, couldn't figure out if it's possible yet

Quote- The date of the videos in OneDrive (web) are OK before ExifTool process, but after it's KO... what is happening? I can not find the solution for this...

There is no solution for this.  You have to decide which programs you want to read it correctly.

According to the specs, time stamps in videos are supposed to be set to UTC time and it's up to the software to display the adjusted time according to the time zone of the computer.  The problem lies in the fact that a lot of cameras (not so much with the cameras on phones) don't know what the time zone is and set it to local time.

As you discovered, some software doesn't read the time stamp properly.  Most notably, Adobe software doesn't.  Windows does.  I'm a bit surprised that they didn't do it correctly for OneDrive as well.

So you just have to decide how you want to do it and bite the bullet on the programs that do it the other way.

BTW, thanks for the list of software and how the read the data.
"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

Phil Harvey

#2
Quote from: SamMat on March 16, 2020, 06:02:52 PM
- Is my method OK, or do I miss something? (I'm a new user of ExifTool)

The -quicktimeutc option doesn't have an effect when just shifting date/time values.  Other than that, it looks good.

Quote- In steps, 2a and 2b, how can I avoid to write  "-=0:0:0 2:0:0" (for summer videos) and "-=0:0:0 1:0:0" (for winter videos)? (I would like to have a single command suitable for summer and winter)

You could try this:

exiftool -quicktime:createdate-=2 -if "$quicktime:createdate =~ /-02/" -execute -quicktime:createdate-=1 -if "$quicktime:createdate =~ /-01/" -common_args -api quicktimeutc DIR

Here the -quicktimeutc option is necessary to convert to local time because I am checking the time zone offset in the -if condition and adjusting CreateDate appropriately.  Also note that if only one number is specified when shifting a date/time value, it is assumed to be the hours.

Quote- How could I merge steps 2 and 3 in only one step ?

See above.  This is actually two commands combined into one using the -execute option.

Quote- The date of the videos in OneDrive (web) are OK before ExifTool process, but after it's KO... what is happening? I can not find the solution for this...

As StarGeek says, different software just interprets these date/times differently (this is the whole reason for the ExifTool API QuickTimeUTC option).  So there may not be a solution to this.

- Phil

Edit:  I just noticed your third command.  The AllDates tag covers only CreateDate, ModifyDate and DateTimeOriginal tags, but others exist in the video that you might want to change.  I might suggest something like this:

exiftool -quicktime:createdate-=2 -if "$quicktime:createdate =~ /-02/" -execute -quicktime:createdate-=1 -if "$quicktime:createdate =~ /-01/" -execute "-time:all<quicktime:createdate" -wm w -common_args -api quicktimeutc DIR

Note that this will no longer create the XMP tags that your previous command was creating, which may affect what Adobe Bridge displays for the date/time.
...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 ($).

SamMat

Thanks a lot for your help Phil !

I need some more help about my question:

Quote- In steps, 2a and 2b, how can I avoid to write  "-=0:0:0 2:0:0" (for summer videos) and "-=0:0:0 1:0:0" (for winter videos)? (I would like to have a single command suitable for summer and winter)

As you suggested, I use now this command :
exiftool.exe -quicktime:createdate-=2 -if "$quicktime:createdate =~ /-02/" -execute -quicktime:createdate-=1 -if "$quicktime:createdate =~ /-01/" -common_args -api quicktimeutc -r
But it gives me an error :
3 directories scanned
    3 files failed condition
    0 image files read
    3 directories scanned
    3 files failed condition
    0 image files read


What am I doing wrong ?

Cheers,
Samuel

Phil Harvey

Hi Samuel,

OK.  I was checking for a time zone of "-02" and "-01", but your time zone is positive.  Maybe this has a chance of doing what you want:

exiftool.exe -quicktime:createdate-=2 -if "$quicktime:createdate =~ /\+02/" -execute -quicktime:createdate-=1 -if "$quicktime:createdate =~ /\+01/" -common_args -api quicktimeutc -r

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