Wrong Exif time in AVI movie files

Started by hluxem, August 27, 2017, 04:20:44 PM

Previous topic - Next topic

hluxem

Hello,

I have several avi movie files from an older FUJIFILM Finepix E550 camera with the wrong exif time as the camera time was not set correctly. It's my understanding that Exif Tool does not support movie files and I have not been able to change the date as I can do with other movie files. I can change the tag {File.MD.XMP::photoshop\DateCreated\DateCreated\0}, but it will not affect the {File.MD.Exif::Main\36867\DateTimeOriginal\0} value as the field is locked and normally mapped to the XMP field. The xmp file only contains the corrected xmp tags. So I went back to Imatch 5 and used John's Meta data dump script to see all meta data in the file and there are the 2 Exif tags for original date and created date listed, see attached. The tag must reside in the avi file, but I can't find a way to change or delete it. The wrong tag would not bother me much, but as that value is used for the date time value of the timeline, the files are in the wrong spot in the time line view. Does anybody know if there is a workaround for this?

Thanks,

Heiner

Mario

I didn't even know that some camera vendors try to store EXIF data in their video files. I'm not sure that there is any standard for this.
Metadata support for videos is far, far, far, faaaaar worse than for images.
ExifTool does not update video files, for very good reasons.

IMatch prefers the XMP data for features like the timeline and file dates and times used in file windows and variables. Unless you reload the metadata, replacing the proper XMP data again with the wrong EXIF timestamps (since ExifTool cannot update the bogus EXIF data in your video files), you should be fine.

Please contact FUJIFILM and ask them to provide you with a tool that allows you to change the proprietary EXIF data they store in your files. Or to remove it.
Should be no problem, you have paid for the camera.
Or, re-encode the file. Or put it in a container file.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Thanks Mario,

just thought I missed something.

IMatch prefers the XMP data for features like the timeline and file dates and times used in file windows and variables.

Works different on my machine with  AVI files. The reason that the tag is a problem for me is because it is used for the timeline and can't be modified. The xmp fields are correct, but the wrong date time variable for the time line is based on the exif field.

I did some more research on the exif tool forum and it seems like other people have the same problem with other cameras. Some discussion seemed to say that Adobe LR could change the tag, but it's not changing it either. One guy even stated that he used a hex editor to modify the value in the avi files.

Would help if the other writeable tags are preferred for any non image files for the date time value as stated above.

Heiner 

Mario

IMatch produces the XMP timestamp on import from EXIF (if ExifTool delivers EXIF data).
The timeline prefers the XMP data so you usually can just change the XMP data to reposition the file. If this does not work, provide the steps you took and a sample file. I just tried it and it works perfectly.

The problem is that as soon as you write back, your in trouble. Since ExifTool cannot update the bogus EXIF data in your video files, the XMP timestamps will reset back to EXIF on re-import. This is why I asked you to contact Fuji for a software to fix the EXIF data in your video file. to correct it. Or you just wrap your video into a container so the EXIF data is no longer reachable for ExifTool.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Mario,

Could it be that there is a difference between internal xmp and external xmp tags?

QuoteIf this does not work, provide the steps you took and a sample file.


  • Created new database just with one avi file with standard preferences
  • On Import, file date time is set to exif tag, no xmp tags in file or produced from Imatch
  • Added current date & time to below empty XMP tags and wrote back
  • {File.MD.XMP::photoshop\DateCreated\DateCreated\0},{File.MD.XMP::xmp\CreateDate\CreateDate\0}
  • xmp side car file with xmp tags created, file date time does not change to the value of the xmp tags
  • Attached is screenshot with file date time value displayed in thumbnail and meta data panel with exif and xmp tags
  • Link to folder with avi file, xmp file and database:
https://www.dropbox.com/sh/r054irvcscq1z70/AACb3VQsjXEGKU7t7M8XUQL5a?dl=0

QuoteThe problem is that as soon as you write back, your in trouble.........the XMP timestamps will reset back to EXIF on re-import.
This does not happen, the xmp timestamps stays after write back or after a forced reload or update. This is  not the problem.

QuoteOr you just wrap your video into a container so the EXIF data is no longer reachable for ExifTool
I googled that and the only tool I found is ffmpeg. It does work, but I may have to do that for each single file. Do you know any other tool?

Thanks,

Heiner

Mario

I have download the files, thanks.

I extracted only the AVI into a fresh folder. IMatch imported the file and the XMP date and time is set as follows during the import:

Created Date   2005:05:21 05:17:34
Date Subject Created   2005:05:21 05:17:34


This is exactly the EXIF date and time recorded in the file. This is the dump from IMatch's ExifTool Command Processor:

[IFD0]          Camera Model Name               : FinePix E550
[IFD0]          Modify Date                     : 2005:05:21 05:17:34
[ExifIFD]       Date/Time Original              : 2005:05:21 05:17:34
[ExifIFD]       Create Date                     : 2005:05:21 05:17:34


So this is correct. Now we have a video file with EXIF, but the EXIF data cannot be updated. Every change done to XMP will be undone by the re-mapping of EXIF to XMP after the (impossible) write-back. Also, internally, when deciding which timestamp to use for a file, IMatch prefers EXIF over any other source. Since your AVI file has EXIF data, this data is used.

The only way around this would be to update the wrong EXIF information in your video with some tool or  a hex editor. Or to remove the EXIF data. Or to wrap your AVI files in a video container to hide the EXIF data from ExifTool.

ffmpeg can do this, on a per file basis. This is an easy example I've found:

ffmpeg -i "input.avi" -metadata "ICRD=1980:01:01 00:00:00" -codec copy "output.avi"
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Hello Mario,

Thanks for looking into this.
The timeline prefers the XMP data so you usually can just change the XMP data to reposition the file

IMatch prefers EXIF over any other source

I would like Imatch to work like in the first quote, but as the testing shows the Exif data wins.

I'm going to use ffmpeg to modify my avi files. If other users have the same issue, I just found a website explaining how to create a small batch file to process a whole directory containing AVI files with ffmpeg.

Thanks again,

Heiner 

Mario

#7
In case of your video files, the internal logic prefers the EXIF data.
The XMP timeline quote is not valid if EXIF data exists. If no EXIF exists, IMatch first looks for XMP (or one of the other date and time sources, e.g. for video files, PDF and office documents). Only if nothing else exists, the last modified timestamp is used. This is meant by "prefer".

But since the metadata for your files has EXIF data, it is preferred during import to set the "File DateTime" attribute used by IMatch for variables, the file window and the timeline. Usually this is in-sync with XMP, at least for all known image file formats. For video with files with embedded EXIF, bets are off. Apparently this only works with AVI, was only used by some camera vendors. And AVI files are not often used these days anyway, if I'm not mistaken.

Did you get answer from Fuji yet? After all they produce the files with EXIF data and they should provide you with a tool to fix/update it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteDid you get answer from Fuji yet?

:>)

According to what I read at the exif tool forum our friends from Nikon and many others did the same thing.
If they would have a Mario working for them  I certainly would have had the answer. I don't even know if they still make any cameras. As said before in this forum, most people only use their smartphone for pictures and movies and the market for any camera must be shrinking fast.
I certainly understand your frustration with all the metadata mess Imatch has to deal with. Finding some images in the wrong spot in the time line I thought it maybe a nice learning experience to just write myself a script checking the different timestamps. I compared the created and original tags with the date and time used for the time line and the date and time encoded in the file name. Even that I thought I had a pretty consistent process I found quite some files I needed to correct.
Thanks to Imatch and metadata templates that was really easy.

Just couldn't figure out the AVI files, interesting enough is that Downloader Pro got the filename correct when I downloaded the files from the camera. I will get the avi files fixed using ffmpeg.

Heiner




Mario

QuoteDownloader Pro got the filename correct when I downloaded the files from the camera
Meaning? DLP can only access the data that's in the file, and IMatch can that to. The problem is that you want to change the EXIF data in the video file, which IMatch cannot because ExifTool cannot.

As I said, you can do it with specialized software like ffmpeg...but I would rather find a way to remove the EXIF from the video file and then use only XMP in the future. Everything will work nicely, in IMatch and other software from then on.

Camera vendors did a lot of useless or just dumb stuff over the years. They don't care enough to get things right, and the product cycles are so short that when you buy your new camera/smart phone/computer/TV they are already outdated. Spending money on developers to produce proper firmware with proper metadata is surely not on their priority list. Users let them get away with that crap so why bother.

Nikon is a particular bad example. Don't get me started about crappy EXIF data, their stubborn embedding of XMP in RAW files in their Capture product and how that put their users into troubles with all other software. Or how much time I had to spend to add special treatment, code branches, options and documentation to make the embedded XMP data in NEF files accessible and usable for IMatch users...

XMP is now around for more than 10 years. It beats EXIF and IPTC by far when it comes to easy of use, portability, extensibility and flexibility. Why camera vendors still insist on embedding EXIF data in images and videos escapes me. EXIF was designed 30 years ago, when the first pro-grade scanners and digital cameras came out. And we still have to deal with it today, in smart phones and cameras created in 2017...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook