Bug 459928 - Tags/keywords are not written back to MP4 video files, even with exiftool being configured
Summary: Tags/keywords are not written back to MP4 video files, even with exiftool bei...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Video (show other bugs)
Version: 7.9.0
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-02 20:38 UTC by Alex Kh
Modified: 2022-10-03 06:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kh 2022-10-02 20:38:48 UTC
SUMMARY

I'm trying to  make Digikam to read/write  tags to/from my *.mp4 video files: 
- I do have a latest version of Digikam built from git (7.9.0), also tested the same with prev version (7.8.0)
- I have configured it with the latest exiftool 12.16
- I do see, this pairing works and tags information is being picked up from my *.mp4 files. If I use "Metadata" pane on the right hand side and "Exiftool" tab in there, I do see my tags, which I set manually with exiftool.
- I also configured Digikam to write tags back to files ("Settings" -> "Configure DigiKam" -> "Metadata" -> "Behavior" -> "Write this information to the Metadata" -> all boxes checked)

Tagging works perfectly for all my photo files. Whenever I assign some tag for one or bunch of photos, I can see Digikam immediately processes those files. And if I crosscheck them later with exiftool I can see my freshly set tags in there.

But this doesn't work for video files. Like if I assign tag on some of my mp4 files, nothing is get written back to file. Digikam shows all these updates to tags being made, below video thumbnails, but my guess it just writes them to its own sqlite database and gets them from it.
And from the way how UI behaves when I set tags on videos, I don't see Digikam triggers the same batch queue processess to update files, as it does when I assign tags for bunch of photos.

I even tried to run "Album" -> "Write metadata to files", but my *.mp4 files didn't get any tags as well.

STEPS TO REPRODUCE
1. Get Digikam v7.9.0 or v7.8.0 configured with exiftool 
2. Configure Digikam to write metadata back to files
3. Assign a tag to one of your mp4 files
4. Use exiftool <filename.mp4> to see what tags the file got

OBSERVED RESULT
No tags being written to actual file

EXPECTED RESULT
Tags should have been written to mp4 file
Comment 1 Maik Qualmann 2022-10-02 21:03:37 UTC
Exiv2 cannot write to video files, or only unsafely. Write support with ExifTool is only available in digiKam-8.0.0.

Maik
Comment 2 Alex Kh 2022-10-02 21:07:46 UTC
I see. Thanks a lot. Can't wait to see it, then :)
Tried to build it (from master I believe) today, but failed miserably. Will be happy to participate in alpha/beta testing once I manage to get it built
Comment 3 Maik Qualmann 2022-10-02 21:10:32 UTC
Git commit 59d2a60ad6496e21e395cfa106d714636c35630a by Maik Qualmann.
Committed on 02/10/2022 at 21:09.
Pushed by mqualmann into branch 'master'.

make ExifTool the primary reader for video files
This means that written tag metadata is also displayed correctly.

M  +4    -4    core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp

https://invent.kde.org/graphics/digikam/commit/59d2a60ad6496e21e395cfa106d714636c35630a
Comment 4 Maik Qualmann 2022-10-02 21:13:17 UTC
If you can build digiKam-7.9.0, digiKam-8.0.0 shouldn't be a problem. However, a more recent Qt version is required.

Maik
Comment 5 Maik Qualmann 2022-10-03 06:15:14 UTC
Git commit fea2a72f7f1bb6957638b741489b226537e50e92 by Maik Qualmann.
Committed on 03/10/2022 at 06:12.
Pushed by mqualmann into branch 'master'.

merge metadata from FFMpeg and ExifTool for video
Related: bug 432369, bug 459898

M  +1    -1    core/libs/metadataengine/dmetadata/dmetadata.h
M  +9    -2    core/libs/metadataengine/dmetadata/dmetadata_exiftool.cpp
M  +11   -4    core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp
M  +59   -0    core/libs/metadataengine/engine/metaengine.cpp
M  +7    -0    core/libs/metadataengine/engine/metaengine.h

https://invent.kde.org/graphics/digikam/commit/fea2a72f7f1bb6957638b741489b226537e50e92