Batch copy .mov video create/modify date to reencoded .mkv videos

Started by Andur1l, November 14, 2022, 02:46:28 PM

Previous topic - Next topic

Andur1l

Hiya guys,

a total exiftools newb here, just had some experience with exiftoolgui and that ain't working for me no more.

My camera records videos in .mov, which I reencode with Handbrake into smaller .mkvs - but that of course messes up the system and exif date values, which I need for Google Photos.

I used this topic as my starting point, my dir structure is:

d:\Temp\mov\ - location of my original .MOV files
d:\Temp\mkv\ - location of my reencoded .mkv files
exiftool.exe is in d:\Temp\

"exiftool -g1 -a -s -time:all" on my .MOV files gives me:

PS D:\Temp> exiftool -g1 -a -s -time:all MVI_0100.MOV
---- System ----
FileModifyDate                  : 2022:08:05 23:46:30+02:00
FileAccessDate                  : 2022:11:14 12:29:26+01:00
FileCreateDate                  : 2022:11:14 11:53:39+01:00
---- IFD0 ----
ModifyDate                      : 2022:08:04 11:39:51
---- ExifIFD ----
DateTimeOriginal                : 2022:08:04 11:39:51
CreateDate                      : 2022:08:04 11:39:51
SubSecTime                      : 40
SubSecTimeOriginal              : 40
SubSecTimeDigitized             : 40
---- QuickTime ----
CreateDate                      : 2022:08:04 11:39:51
ModifyDate                      : 2022:08:04 11:39:51
---- Track1 ----
TrackCreateDate                 : 2022:08:04 11:39:51
TrackModifyDate                 : 2022:08:04 11:39:51
MediaCreateDate                 : 2022:08:04 11:39:51
MediaModifyDate                 : 2022:08:04 11:39:51
---- Track2 ----
TrackCreateDate                 : 2022:08:04 11:39:51
TrackModifyDate                 : 2022:08:04 11:39:51
MediaCreateDate                 : 2022:08:04 11:39:51
MediaModifyDate                 : 2022:08:04 11:39:51
---- Composite ----
SubSecCreateDate                : 2022:08:04 11:39:51.40
SubSecDateTimeOriginal          : 2022:08:04 11:39:51.40
SubSecModifyDate                : 2022:08:04 11:39:51.40

And from this I came to:

exiftool -TagsFromFile d:\Temp\mov\%f.MOV "-alldates<ExifIFD:DateTimeOriginal" d:\Temp\mkv\
... wanting to copy the exif date from .MOV to system dates in the .mkv, but all I get is:

PS D:\Temp> exiftool -TagsFromFile d:\Temp\mov\%f.MOV "-alldates<ExifIFD:DateTimeOriginal" d:\Temp\mkv\
    1 directories scanned
    0 image files read

I also tried it with "-FileCreateDate -FileModifyDate" from the other topic but with the same result.

I can't figure out what I'm doing wrong. Help, please?  :-*


StarGeek

I only skimmed over your post but these problems jumped out at me.

See Supported File Types table.  MKV files are not writable by exiftool.

Another problem is that EXIF data in a video file is non-standard and every camera company forcefully embeds such data in different ways.  Because of this, EXIF data can't be copied into video files.  The closest workaround would be to copy the EXIF tags into the corresponding XMP tags.  The exif2xmp.args file can be used for this (see the -@ (Argfile) option).  For an MKV file this would have to be a sidecar file using exiftool.

Actually, thinking about it, I'm not sure MKV files can hold embedded XMP.
"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

Andur1l

Thanks for taking the time and answering!

But shouldn't exiftool work at least with writing the system dates like "-FileCreateDate -FileModifyDate", so copying only system dates from .mov to .mkv?

Phil Harvey

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

Andur1l

PS D:\Temp> exiftool -TagsFromFile d:\Temp\mov\%f.MOV -ext MOV -ext MKV "-FileCreateDate<ExifIFD:DateTimeOriginal" "-FileModifyDate<ExifIFD:DateTimeOriginal" d:\Temp\mkv\
    1 directories scanned
    8 image files updated

YES! Thanks so much to both of you, this is gonna save me so much time and work in the future, yaaay!