A way to batch process metadata fields using Metadata Mechanic or other?

Started by jma, February 05, 2019, 06:47:22 PM

Previous topic - Next topic

jma

Hello.

I am trying to develop a workaround for what I am learning (after reading many of the postings in the metadata discussion forum) is a common problem---my video files get some metadata overwritten.  I organize them by date using the somewhat common date/time file naming schema:   yyyymmddhhhhmmss

When adding keywords or reverse geodcoding in IMatch, I have noticed that the XMP "Created Date" and "Date Subject Created" fields are updated to refelect the time the most recent changes were made.  This has the efffect of changing the Timeline view of files.

In using the IMatch App, Metadata Mechanic (thanks Mario!), I have found a way to rewrite the  XMP "Created Date" and "Date Subject Created" fields using the following preset (image attached):

                 XMP::xmp\CreateDate\CreateDate\0

                Set to

                {File.MD.H264::MDPM\24\DateTimeOriginal\0}



This works for converting one file at a time.  However, since I have many thousands of video files to fix, it is a somewhat tedious process. 

My question to you is this:  Is there a way for me to "automate" (or batch) this process a bit by adding some variable---or expression---which would point this preset to a series of files and apply it one at a time, writing back each file's  "DateTimeOriginal" tag to only that specific file?

Thanks for your help and ideas.
-John

Mario

QuoteI have noticed that the XMP "Created Date" and "Date Subject Created" fields are updated

I think the problem is here that IMatch cannot produce these dates from any metadata contained in your files. Video files are a even greater metadata mess than images, and there is only partial support for date and time field in some video file format variants.

See How IMatch uses Date and Time Information to learn about how IMatch tries to deduce date and time from various formats.

If IMatch has to fall back to using he "last modified" file system date and time, the tags will change whenever you update the file (or metadata).
I recommend to set the two dates for your video files in the Metadata Panel once (or copy the data from some other tag you find valid in your videos) using a Metadata template. Once the tags contain data, IMatch will write them back, use them for the timeline and keep them.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

This has been discussed recently. See the thread https://www.photools.com/community/index.php?topic=7249.msg50291#msg50291

If the file name contains date and time then the app discussed will help you set the correct date/time. I use this just for this purpose.

sinus

Quote from: jma on February 05, 2019, 06:47:22 PM
Hello.

I am trying to develop a workaround for what I am learning (after reading many of the postings in the metadata discussion forum) is a common problem---my video files get some metadata overwritten.  I organize them by date using the somewhat common date/time file naming schema:   yyyymmddhhhhmmss

If your filename is correct, then you could "update" some other fields with a Metadata-Template.
I do so.
We have seen, that some metadata-fields are a mess, some programs update them (wrong), some not.
And sometimes you do not even notice it for a long time.

Hence for me the best is using the filename with the date. The filename will not be altered usually by a program.  8)

You could create a metadata-Template with one or several fields, what you like to change.
As the correct date, you would enter a variable, something like (depending on your filename).
{File.Name|substr:0,4}:{File.Name|substr:4,2}:{File.Name|substr:6,2} {File.Name|substr:9,2}:{File.Name|substr:11,2}:00+00:00

On this way you can change hundrets of files at once.
Specially with old files (scans and so on) you want

Especially with older files (like scans) you might want to change the date because you found an exact date.
That's easy: change the filename accordingly, run the template again, done.

Best wishes from Switzerland! :-)
Markus

jma