Created attachment 168079 [details] bug report See attached file since my report is blocked as spam (???).
We've already talked about the video metadata being "virtual" that we display in Exif, Iptc and Xmp. If you now add captions, these "virtual" ones will also be written back as real ones. I see that we must fundamentally change this behavior. @Gilles, we are also no longer allowed to use Xmp.audio* and Xmp.video*, these private Exiv2 metadata were added in GSoC-2012. There is a thread about this in the ExifTool forum and they are not supported by ExifTool either. Furthermore, the FFMpeg parser must send the metadata of the database entries relevant to the video directly to the database. The Exif, (Iptc) and Xmp metadata views must represent the real video metadata. Maik
(In reply to Maik Qualmann from comment #1) > We've already talked about the video metadata being "virtual" that we > display in Exif, Iptc and Xmp. If you now add captions, these "virtual" ones > will also be written back as real ones. There are not only virtual video metadata written back in video and not in photo : [XMP-photoshop] Date Created, for exemple, is not a specific video metadata.
[XMP-photoshop] Date Created is also virtual and created by us. Maik
@Gilles, we are also no longer allowed to use Xmp.audio* and Xmp.video*, these private Exiv2 metadata were added in GSoC-2012. There is a thread about this in the ExifTool forum and they are not supported by ExifTool either. Not allowed why ? We can technical create the namespace that we want... I all cases, if audo and video are missing in another namespace, we can just create tags in digiKam namespace, at least to be sure to register information in files. Gilles
You are right. But what I am trying to say is that [XMP-photoshop] Date Created is not specific to videos, it appears also for photos but it is not written back to file for photos. So it is not just "about the VIDEO metadata being "virtual" as you said in your first comment, it is also for some/all virtual virtual metadata, whatever they come from video or photo.
The metadata entry [XMP-photoshop] is also written for video files by ExifTool. However, this is not displayed with the "-G1" option, it also requires the "-a" option. Maik
I think my poor english does not help... Please see again the attached file (both made with -a option). My concern is not what is written back when a caption is added. My concern is why it is not the same set of metadatas for photos and videos at least for those common to photos and videos, such as XMP-photoshop:Date Created and many others, which are written back to file for videos ans NOT for photos.
Well, just by the way, you disabled writing some captions metadata, Exif user comment, XPComment, ACDSee... But it doesn't matter. Videos generally do not have Exif, Iptc or Xmp metadata. They often have a QuickTime container or manufacturer-specific Makernotes. Our metadata display would probably be completely empty for most video files. That's why we interpret the metadata found as Exif or Iptc and Xmp. This happens partly through our FFmpeg parser and through ExifTool itself. So we then have a filled metadata container that is written back when there is a change (captions added). Hence the large number of changes. My idea now is that before we write video metadata we read the metadata again, but only the Exif, Iptc or Xmp metadata that is actually present. Maik
Ok. It was not the initial topic of this report but since we're talking about that, I have to say I am in favor to write back to the file ONLY the metadata(s) modified. If an user modifies 'Caption", why on earth Digikam would modify also another metadata(s) not linked to 'Caption' by the metadata advanced configuration settings ? I understand (or at least, I think so ;-) the technical problem with quicktime but you seems to have find a way, don't you ?
(In reply to Maik Qualmann from comment #8) > Well, just by the way, you disabled writing some captions metadata, Exif user comment, XPComment, ACDSee... > But it doesn't matter. Videos generally do not have Exif, Iptc or Xmp metadata. I set Caption --> Xmp.dc.description, which is a metadata digikam is able to write back to the video file. Why do you say it doesn't matter disabling writing Exif user comment, XPComment, ACDSee... for Caption ??? I'm lost here.
Ignore it ((:-)) I was referring to your bug report attachment, where only 3 metadata entries were changed when writing a caption for an image. In the basic settings, many more metadata entries would actually be written. Maik
Git commit 717c0d5272e92ec28e304c6d35ec2cbbacdeb4a0 by Maik Qualmann. Committed on 03/04/2024 at 19:35. Pushed by mqualmann into branch 'master'. write only real (xmp) metadata to video files FIXED-IN: 8.4.0 M +1 -1 NEWS M +1 -1 core/libs/database/item/scanner/itemscanner.cpp M +2 -2 core/libs/metadataengine/dmetadata/dmetadata.h M +4 -5 core/libs/metadataengine/dmetadata/dmetadata_exiftool.cpp M +22 -8 core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp M +1 -1 core/libs/properties/itempropertiesmetadatatab.cpp https://invent.kde.org/graphics/digikam/-/commit/717c0d5272e92ec28e304c6d35ec2cbbacdeb4a0
@Gilles, we should update ExifTool in the bundles. Maik
Right, i do it tomorrow morning. Gilles
Git commit b140a91867e66371794c345aeafa20082e10169b by Gilles Caulier. Committed on 04/04/2024 at 07:21. Pushed by cgilles into branch 'master'. Add script to update ExifTool in files.kde.org/digikam/exiftool/ download area Official Exiftool version must be passed as argument in command line. A valid account withh ssh key to access in R/W to files.kde.org must be available before to use this script. A +52 -0 project/scripts/update_exiftool.sh [INFRASTRUCTURE] https://invent.kde.org/graphics/digikam/-/commit/b140a91867e66371794c345aeafa20082e10169b
Maik, ExifTool is now updated in download area with the 12.87 release. I add a script to automatize this job. This cache version online, with archive files renamed is used by bundle build scripts, as the official Exiftool site do not provide a list of all previous releases, which can break the build script when a new version is push online. Gilles
Since your commit was previous to the date of the last appimage bundle, I suppose the fix is present into the last bundle. Forget this comment if the fix is not yet in the build. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- It is not fixed in the digiKam-8.4.0-20240404T094657-x86-64.appimage bundle (the one from this morning). Digikam adds ever a lot of xmp metadata non related to the modified field (Caption in this case) for a video. On the other hand, exiftool -caption='test caption' video.mp4 add only the expected lines [XMP-x] XMP Toolkit : Image::ExifTool 12.76 [XMP-dc] Description : caption test So that should be possible for Digikam since it uses exiftool (when set in the configuration).
Forget my comment, I was using a wrong bundle...
It is fixed, sorry again (and thanks).