MOV/MP4 video date-time handling

Started by mastodon, March 30, 2019, 11:31:42 AM

Previous topic - Next topic

mastodon

The new version of Exiftool has "Enhanced writing capabilities for MOV/MP4 videos". I don't know, what does it mean, but I like to use the most of it.
Would it be possible, to make a workflow in IMatch that
- let see all date/time tags in a video file
- set/clear/write the ones are wrong.

Most of time the time of the video is shifted by 1 or 2 hours (because of daylight savings time or changing timezone), sometimes totally wrong (clock was not set).

Is this possible set this tags with a specific Metadata panel, that has all this tags in it? Could IMatch shows every tag as editable, that are writable?

Mario

#1
You can add any tag you want to a Metadata Panel layout and update it (unless the tag is specified as read-only by ExifTool).

IMatch uses internally the XMP created/date subject created (you can see these in the default layout in the Metadata Panel). These tags are filled from IPTC/EXIF/XMP on import and are also the base for the IMatch timeline and the File.DateTime variable and attribute. Update these timestamps to correctly place your videos in the IMatch timeline a

IMatch synchronizes these tags back into EXIF and legacy IPTC during write back. There is no similar mechanic for video files because of a) lack of any standard and b) lack of write support in ExifTool for video files. I shall investigate what  Phil means with Enhanced writing capabilities for MOV/MP4 videos .

It's good that ExifTool now supports writing to HEC/HEFI files, although this is a disastrous file format in terms of patents and potential royalty payments involved. Not even Windows supports HEIF out-of-the-box. You need to install a free add-on for that from Microsoft. But this saves Microsoft royalty payments for users who don't use HEIF on Windows 10. Apple only uses this format so they can save space in their cloud and use smaller memory components in their phones to cut cost and increase revenue.

There is no standard for how to map between the various metadata that can be found in some shape in some video files. IMatch does its best to determine the most suitable timestamp for videos and then fills the XMP date and time from it. See How IMatch uses Date and Time Information

The metadata mess(TM) in video files is much worse than in image files. Not only is there no standard, but companies like Apple deliberately make it often futile to figure out a timestamp. As we have learned in a recent thread here in the community, it may even depend on which Apple device you use, if you synch to the Apple cloud etc. which timestamps ypu end up with. the QuickTime format has a date create and creation date, and these often differ...! I had to add an extra option for the next to allow a user to tell IMatch which "created" date in his/her files is more right.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Quote from: Mario on March 30, 2019, 01:44:13 PM
I shall investigate what  Phil means with Enhanced writing capabilities for MOV/MP4 videos .

Thank you. A number of us would be quite interested in the outcome. Anything to simplify the video metadata mess would be great.
John

Mario

The source of the mess are the camera vendors.

XMP is now available for almost 20 years. Still, they insist on the old QuickTime format, proprietary extensions, undocumented maker notes, ...
Even the modern, powerful mirrorless cameras still write 30 year old EXIF metadata. And, sometimes, a partial XMP record consisting of "rating=0"...
Users let camera vendors get away with it, and then try to fix the damage at the software end in tools like IMatch...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mastodon

Quote from: jch2103 on March 30, 2019, 07:13:40 PM
Quote from: Mario on March 30, 2019, 01:44:13 PM
I shall investigate what  Phil means with Enhanced writing capabilities for MOV/MP4 videos .
Thank you. A number of us would be quite interested in the outcome. Anything to simplify the video metadata mess would be great.
So am I. Even a paid plugin would be alright. Thank you for your effort.

jch2103

Quote from: Mario on March 30, 2019, 08:11:55 PM
The source of the mess are the camera vendors.

...And it gets worse when you edit a video. My limited experience so far (Shotcut, Davinci Resolve) is that video editors don't save any metadata from the original video(s). And using the IMatch clipboard to copy metadata to the output files doesn't work so well either... Perhaps the enhanced ExifTool capabilities will help...
John

Mario

XMP data works well with video files. What do you mean with "not so well" exactly?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on March 30, 2019, 08:11:55 PM
The source of the mess are the camera vendors.

Users let camera vendors get away with it, and then try to fix the damage at the software end in tools like IMatch...

I think part of the reason for this is the relatively small/tiny number of users that actually look at or use this data in the first place.  If you look at the total number of photos taking images with cameras/phones and then look at the number of folks that actually do anything with the metadata... it is not worth a major update for vendors to change things.  Case in point: I had to help a client organize decades of images in their Photos Database.  She was amazed that I could create "smart folders" for her by Date, Camera Model and Location.... to her, this was "Magic"... she had no clue about EXIF data let along XMP, etc.  I imagine 95% of users are in the same boat... or know about it - but don't really care.

Mario

Always looking for ways to make IMatch easier to use for casual users.

Apple does a great job by reducing the feature set all the time until it's so minimal that everybody can handle it. And most people never learn what they are missing, so...
When I first used Lightroom CC (not Classic) I had the same impression. I searched for ways to see more metadata or editing it - there are none.
Lr Classic offers way more, as does Photoshop.
Adobe is designing the new products for the mass market and not for ambitioned users or professionals. Only in these markets they can strive and compete against Google , Instagram and Snapchat.

Since IMatch is a DAM and made for a niche market, metadata handling is one of the key features. And hence it is way more affected by the even messier metadata mess in video files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

#9
Quote from: Mario on March 31, 2019, 08:28:52 AM
XMP data works well with video files. What do you mean with "not so well" exactly?

It's a workflow issue. My intention is to copy metadata I've added in IM to edited videos. This is mostly for my own purposes (especiallyt to keep videos together on the Timeline) because other programs/websites/etc. aren't sufficiently aware of metadata to recognize what metadata I've added.

It appears that using the IM clipboard to copy XMP data from a .mov file (copied from the camera, but with metadata added in IM) to a new (derived via Shotcut) .mp4 file doesn't create a corresponding XMP file. That may be by design, but it means I have to add some metadata in an IM metadata template to create an XMP sidecar file before I can use IM to copy XMP metadata to the target file. Worse, the IM clipboard 'Paste Attributes and Data' doesn't seem to paste all of the XMP data such as Location, GPS, keywords and dates into that new XMP sidecar file.

This could be an oversimplification, as I've just started working with video files from this camera. I'll do some more testing to try to find out what's happening and will likely post results in the Bug Reports section.
John

Mario

#10
The XMP is created on the first write-back.
How do you copy metadata? Using the clipboard likely means "in-database" so there must be a write-back following that to produce the XMP file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Quote from: Mario on March 31, 2019, 08:46:31 PM
The XMP is created on the first write-back.
How do you copy metadata? Using the clipboard likely means "in-database" so there must be a write-back following that to produce the XMP file.

Correct. When I use the clipboard, I do indeed need to make sure there's a write-back.

I'm finding there are differences in how metadata tags are used between .mov and .mp4 files, at least for those .mp4 files created by Shotcut (in particular, absence of QuickTime date/time tags in the .mp4 files). I don't know if this is specific to the applications I'm using or just part of the general video metadata mess.

See related issue re copying tags with a metadata template vs using clipboard copy via a metadata panel: https://www.photools.com/community/index.php?topic=8929.0
John

mastodon

New Exitool version got even better for creating new QuickTime tags in MOV/MP4 videos! But which tags, that is not in the history.

Mario

There are related threads in the ExifTool forum.

I suggest to, very carefully, read Phil's comments on this here:

http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,10091.msg52530.html#msg52530

before you attempt to actually modify metadata in video files. It all depends on your workflow and the software you use and there may be nasty surprises or even something going nuclear...

Video metadata is a much bigger mess than image metadata (which is already bad).
Using a fresh, clean XMP sidecar file for videos not only works for all formats, but also avoids many of the pitfalls. IMatch does this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Just a reflection on video metadata: What should be recorded? If a user takes a video (with a smartphone) and then trims it
what creation time should be recorded? And once you edit videos seriously, combining cuts etc. what metadata should be recorded then?
What data would you retain from the original? (In the case of combined videos - what would be the original?)

It is no wonder there is no standard! (no wonder one could not agree to one)

Mario

All that is mostly technical data and not that useful.

But a user-defined creation date of the material, maybe a last edited date and common things like keywords, title, description, maybe GPS coordinates and all that...
XMP would be the ideal choice for that. Not the patchily supported Apple QuickTime metadata (20 years old, many incompatible revisions) or some proprietary vendor-specific stack of tags here and there.

Unfortunately, there are may different video formats, and many different container formats which mix video streams with audio streams, captions and whatnot. Really hard to handle. A container can contain different videos taken at different times, in different formats and processed with different software.

The cleanest solution is one XMP sidecar file for each video with the data you, as the user, would like to associate with the video. That's what IMatch is currently doing and it works very well. Not much in the way of copying metadata from the video file into the XMP as a seed, though. No standard for that of course. But I think most people are happy to use the XMP date and time to pin a video onto the timeline, apply some keywords, a headline and description. That's usually more than sufficient to find  a video, to categorize it and use it inside the DAM.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mastodon

I know it is an old topic, but the subjest is the same.
What experinces do you have with mp4 metadat editors? I like to use it for adding metadat to personal videos: modify date and time, add GPD data, location infos, headline/title/descripition, persons. We all know, it is a mess, but maybe some progs can handle some of the metadata in a way, that is apporiate, so one can use it in IMatch.
There are some examples:
MP4 Video & Audio Tag Editor
MyMeta
MetaX

Not for mp4, but video:
abcAVI Tag Editor - I am using it, can write info in avi file, that windows can show in Properties tab. In IMatch I did not managed to show this infos, but that is my fault, I am too lasy to search for them in the tags.

Mario

Check your videos in the ExifTool Command Processor.
This shows you all the data ExifTool can extract from your particular video file.

ExifTool can extract a lot of data from a lot of video files. IMatch does not show proprietary QuickTime tags or AVI tags or MKV tags in the standard Metadata Panel layout.
Common video data is shown in layout "8 Video".

The "Browser" layout shows all data IMatch has imported from your file.
This must not be necessarily all the data in the file, because IMatch by default does not import tag groups which contain mostly binary data or maker notes.
If something is missing, you can enable entire groups or individual tags it via the Tag Manager.

Once the data is in the database, you can include it in a Metadata Panel layout, use it via variables in File Windows, sort by the data, search the data etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mastodon

Thanks, I did not tried the Browser layout yet, that shows the RIFF info. ("8 Video" tags are empty) RIFF has been added by abcAVI Tag Editor.
I have just found an interesting project handling video metadata.

Mario

RIFF is a pretty old container format, dating back to 1991! It was at the time created by IBM and Microsoft. I think it was only ever used in AVI files? Its quite old...

If all the metadata that ExifTool can extract has been imported by IMatch, this is the best you can get.
Specialized software like FFMpeg or whatever links you posted may be able to extract more info about the containers and streams. But there is not really much useful metadata ExifTool cannot extract and IMatch cannot import and use.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mastodon

Yes, RIFF is for AVI videos (and some other picture) formats.
Actually, IMatch handles video files perfect, using XML sidecar files. I can serach, filter... anything.
BUT I like to save so much metadata IN the video file as possible.

Mario

QuoteBUT I like to save so much metadata IN the video file as possible.

Then wrap your AVI video in a more modern container like Matroshhka or MP4.
Some applications (to my knowledge) even support embedding of XMP data in MP4 containers. ExifTool can do it to, recently.
Since this is not standardized and, if really required, "injecting" an XMP record into a MP4 container with ExifTool is doable, IMatch sticks to the safer and much faster XMP sidecar files for MP4 files. At least until some sort of (industry) standard emerges.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook