Processing Embedded date to correct EXIF missing data

Started by durianwool, May 31, 2021, 04:14:52 PM

Previous topic - Next topic

durianwool

Hi,

I've got some HEVC (H.265) videos that are contained in .mkv files. The issue is the EXIF metadata's "CreateDate" is 0 or undefined. I found that the info is actually available in the -ExtractEmbedded part. So I'd like to use that to correct the tag in EXIF metadata, but I can't find a way to usefully extract the info and then put into the right tag in EXIFtool. Ie. I can't do something like "-CreateDate<COM.APPLE.QUICKTIME.CREATIONDATE" Currently my only way seems to be to use ffprobe, then do some regex and sed in a bash script that the resulting string is fed into exiftool. Is there a more elegant/simple way in exiftool?

From exiftool:

exiftool  -s -extractembedded IMG_7122.mkv
(snip...)
TagName                         : MAJOR_BRAND
TagString                       : qt
TagName                         : MINOR_VERSION
TagString                       : 0
TagName                         : COMPATIBLE_BRANDS
TagString                       : qt
TagName                         : COM.APPLE.QUICKTIME.CREATIONDATE
TagString                       : 2020-07-29T15:35:23-0600

(...)


should be retagged so that they go into (post ffmpeg conversion from .mkv to .mov container) to define the CreateDate Ie. "2020-07-29T15:35:23-0600" above should be tagged as "CreateDate=2020:07:29 15:35:23-0600":

exiftool  -extractembedded IMG_7122.mov

File Modification Date/Time     : 2021:05:31 11:35:36-05:00
(snip...)

Major Brand                     : Apple QuickTime (.MOV/QT)
Minor Version                   : 0.2.0
Compatible Brands               : qt
Media Data Size                 : 4390916
Media Data Offset               : 36
Movie Header Version            : 0
Create Date                     : 0000:00:00 00:00:00
Modify Date                     : 0000:00:00 00:00:00
(...)


Thanks for any advise!



StarGeek

The MKV Key:Value parings are hard to deal with, as there is no guarantee as to the order they appear in.  Additionally, exiftool cannot edit an MKV file.

There is a config file in this post that you can try.  Copy the text and save it to a file named join_tags.config in the same directory as exiftool. Then run this command on one of the MKV files
exiftool -config join_tags.config -ee -G1 -a -s file.mkv

If the output of that gives you a usable tag name, then you could try this, replacing MKVTAGNAME with the name from the above command
exiftool -config join_tags.config -ee -TagsFromFile file.mkv "-CreateDate<MKVTAGNAME" file.mov


* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

durianwool

Hi StarGeek,

This totally worked! Thanks so much.
I am also glad that exiftool was able to handle the "2020-07-29T15:35:23-0600" datetime format without further massaging to get it into MOV's CreateDate field!

Thanks again!