Bug 484758 - Displayed dates on Metadata panels come from different dates found in a video file from Ricoh GR II (inconsistency ?)
Summary: Displayed dates on Metadata panels come from different dates found in a video...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 8.4.0
Platform: Manjaro Linux
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-30 14:19 UTC by mahikeulbody
Modified: 2024-04-01 13:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.4.0
Sentry Crash Report:


Attachments
output of exiftool (7.33 KB, text/plain)
2024-03-30 15:10 UTC, mahikeulbody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahikeulbody 2024-03-30 14:19:05 UTC
The video file attached comes from a Ricoh GR II. Dumping the file with exiftool, we can see :
[QuickTime] Create Date : 2024:03:30 14:34:12

But we can see also dates that does not exist in smartphone mp4 videos (at least on videos fromPixel 5 and Moto G6) :
[IFD0] Modify Date : 2024:03:30 14:34:10
[ExifIFD] Date/Time Original : 2024:03:30 14:34:10
[ExifIFD] Create Date : 2024:03:30 14:34:10

As you can check, they are not the same date as QuickTime date (2 sec less). I don't care about the reason of this difference but I was curious how Digikam will handle that. We could assume that it will choose one of the two sources and use it everywhere but it is not the case :
- all dates displayed into Metadata XMP and IPTC panels are 2024:03:30 14:34:12
- all dates displayed into Exif panel are 2024:03:30 14:34:10

NB. Dates into XMP-Exif-specific Properties sub-panel are 2024:03:30 14:34:12, that is consistent with the others XMP dates displayed but not with the ones displayed into the Exif panel.

I have no idea what would the right solution or even if one is needed since I am not sure there are use cases which could be impacted by that.
Comment 1 mahikeulbody 2024-03-30 15:10:44 UTC
Created attachment 167947 [details]
output of exiftool

Since the video is larger than 4000KB, I attached the output of exiftool -a -G1 <video>.
Comment 2 Maik Qualmann 2024-03-30 15:17:25 UTC
Well, we assign the dates to those to whom they are "related". So Exif to Xmp.exif etc. There are always different times in videos, some take the start of the video, others the end. Then there is a video track date etc.

Maik
Comment 3 mahikeulbody 2024-03-30 15:20:44 UTC
> So Exif to Xmp.exif 

No, it is not the case (please read my NB).
Comment 4 mahikeulbody 2024-03-30 15:29:44 UTC
There is another problem may be linked to that : if you adjust time from Exif:Created (here 14:34:10) to all date fields, including Exif:Created, Exif:Original and Exif:Digitized, none Exif metadata are updated into the file (ie they exist in the file but are not updated).
Comment 5 Maik Qualmann 2024-03-30 15:35:24 UTC
I've also seen that Exif isn't updated, but that could be due to ExiffTool. Test whether it works on the command line.

Sorry, I need a sample video, send it by email. For video we use not only ExifTool but also an FFmpeg metadata decoder and mix the results.

Maik
Comment 6 Maik Qualmann 2024-03-30 15:39:13 UTC
You can't equate video with images. There are manufacturers that store the Exif information in the embedded image in the video. So here the image would have to be changed and added back to the video. Read a little about the topic in the ExifTool forum.

Maik
Comment 7 mahikeulbody 2024-03-30 15:47:47 UTC
>  I need a sample video, send it by email.

I just send it by email.
Comment 8 Maik Qualmann 2024-03-30 19:54:48 UTC
I don't see any real problems here, the Exif metadata block with "2024:03:30 14:34:10" comes directly from ExifTool. We get the Xmp metadata from the  "creation_time" from the FFmpeg API, which is probably the QuickTime date.

Maik
Comment 9 mahikeulbody 2024-03-30 20:44:25 UTC
We could reasonably expect the dates into the XMP-Exif-specific Properties sub-panel to be the same as in Exif Panel.

Having said that, I don't think this minor "bug" deserves much more attention. This report was more of a warning in case this behavior would not be what was intended.
Comment 10 Maik Qualmann 2024-04-01 07:55:56 UTC
If the camera firmware results in different times from the start of a video to the time it is saved, we must also reflect them in the metadata. We cannot equate all times information as the ExifTool output also contains different information.

Maik
Comment 11 mahikeulbody 2024-04-01 08:15:42 UTC
There are three different aspects in this report :
1) The one highlighted in the title. As shown by the "?" I was not very sure of me and I wanted above all to draw attention about that. You convinced me that Digikam is doing the right thing.
2) As a normal user, we could expect the dates into the XMP-Exif-specific Properties sub-panel to be the same as shown in Exif Panel (which, as a normal user, we presume to be the ones from Exif metadata in the file). Probably a cosmetic point but it can be disturbing.
3) If you adjust time from Exif:Created (here 14:34:10) to all date fields, including Exif:Created, Exif:Original and Exif:Digitized, none Exif metadata are updated into the file (ie they exist in the file but are not updated).
Comment 12 Maik Qualmann 2024-04-01 12:44:28 UTC
Git commit 22614f113fb61a5e668368bb6312caacba032ccd by Maik Qualmann.
Committed on 01/04/2024 at 12:43.
Pushed by mqualmann into branch 'master'.

add option to change all timestamps nativ with ExifTool
FIXED-IN: 8.4.0

M  +40   -38   core/dplugins/generic/metadata/timeadjust/timeadjustdialog.cpp
M  +5    -0    core/dplugins/generic/metadata/timeadjust/timeadjustlist.cpp
M  +2    -1    core/dplugins/generic/metadata/timeadjust/timeadjustlist.h
M  +29   -2    core/dplugins/generic/metadata/timeadjust/timeadjusttask.cpp
M  +7    -0    core/libs/metadataengine/exiftool/exiftoolparser.h
M  +24   -0    core/libs/metadataengine/exiftool/exiftoolparser_command.cpp
M  +5    -0    core/libs/metadataengine/exiftool/exiftoolparser_p.cpp
M  +1    -0    core/libs/metadataengine/exiftool/exiftoolprocess.h
M  +1    -0    core/libs/timeadjust/timeadjustcontainer.cpp
M  +1    -0    core/libs/timeadjust/timeadjustcontainer.h
M  +36   -9    core/libs/timeadjust/timeadjustsettings.cpp
M  +1    -0    core/libs/timeadjust/timeadjustsettings.h

https://invent.kde.org/graphics/digikam/-/commit/22614f113fb61a5e668368bb6312caacba032ccd
Comment 13 Maik Qualmann 2024-04-01 13:06:10 UTC
Git commit 72590299e811eb9e289e65b6112da1ccf71c4a13 by Maik Qualmann.
Committed on 01/04/2024 at 13:04.
Pushed by mqualmann into branch 'master'.

update timestamps with ExifTool not in BQM

M  +2    -0    core/libs/timeadjust/timeadjustsettings.cpp

https://invent.kde.org/graphics/digikam/-/commit/72590299e811eb9e289e65b6112da1ccf71c4a13