mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Metadata: Support for darktable's dc:subject #1341
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maxammann on GitHub (Feb 27, 2022).
Is your feature request related to a problem? Please describe.
I just tagged my pictures in darktable and noticed that photoprism is not aware of them. Darktable uses the
dc:subjectfor keywords/tags/labels: https://docs.darktable.org/usermanual/3.8/en/module-reference/utility-modules/shared/tagging/#editrename-tagDescribe the solution you'd like
Entries from the
dc:subjectcould be added to the keywords or labels of photoprism.Describe alternatives you've considered
An alternative would be to write a tool which extracts the darktable tags from the XMP files and converts them to a format photoprism already supports.
Additional context
I attached two xmp files.
XMPs.zip
@maxammann commented on GitHub (Feb 27, 2022):
It seems like exiftool already supports "Subject":
@Faexa commented on GitHub (Mar 11, 2022):
Hello devs,
First of all, thank you very much for your product and your time. I'm in testing and it seems very promising for my use case.
I'm very confused by the differences between keywords (which are translated to labels by photoprism if set one time manualy) and Subject.
Anyway, for the darktable case cited before :
From what I've understood you use exiftool to read EXIF and embedded XMP tags in JPG whereas you parse XML for XMP files ?
(must be that since doing exiftool on an XMP file
exiftool IMG_9775.CR2.xmpgives me a Subject entry whereas photoprism don't get it) EDIT: written in the FAQ...To make it functional for XMP generated by darktable, in fact it's just a little thing to change :
In your FAQ here (https://docs.photoprism.app/user-guide/advanced/metadata/), you tell
In fact, Darktable (and from what I read digikam and maybe Lightroom?) uses
RDF.Description.Subject.Bag.LiSee :
I think populating photoprism keywords should be from both
RDF.Description.Subject.Seq.LiandRDF.Description.Subject.Bag.Li(tried to rename manually my XMP file to dc:subjectrdf:Seq and it's working like a charm in photoprism)
Thank you very much for your very good work !
@Faexa commented on GitHub (Mar 11, 2022):
To extend the discussion :
Why that ? Can't we keep priority to XMP above Exif but anyway let photoprism add automatic keywords ?
As stated before I don't understand the difference bewteen Keyword and Subject, and the mixing done between the both
For example:
I have a RAW file with a XMP file
-> I set Title, Author and tags (TAG1, TAG2) in darktable (-> XMP Subject.Bag)
If I index now, the photoprism keyword would be populated with TAG1, TAG2 and blocking any automatic tag added by photoprism ?
Pros: my tags populates photoprism keywords and can be labels automaticaly
Cons: loose ability to automatic tags / photoprism subject is not populated (since only read from exiftool)
-> On the other hand, let's say I export to JPG and I index only the JPG (without RAW and CR2)
Tags/Subject in XMP file is written in embedded XMP metadata
So as the previous array says: photoprism Subject is populated with Subject
But keyword is not populated so I can't have automatic labeling with my Subject tags
Proposition :
why not never populate the keyword field and keep it dynamic for photoprism operations ?
And populate keywords with the automatics label of photoprism AND Subjects.
This way we keep XMP precedence, if no XMP we get maximum of informations from embedded metadata AND we can add theses tags to the keywords list which is used to create photoprism labels
(However I probably lack the distinction between Keywords and Subjet)
@heitorPB commented on GitHub (Nov 8, 2023):
Could this be solved by extending
Exif()at https://github.com/photoprism/photoprism/blob/preview/internal/meta/exif.go#L47 ?Would something like this solve it?
@lastzero commented on GitHub (Nov 8, 2023):
DC stands for Dublin Core. It's optionally available with XMP, but not Exif.
@heitorPB commented on GitHub (Nov 8, 2023):
Oh, I didn't know the meaning of
dc, thanks for that!This is what I see from a jpg I exported from Darktable:
The
Xmp.dcfields are in the jpg metadata. Here are some of them (I probably didn't fill all options before exporting the photo):Does the
Exif()function I linked above export all metadata that I can query viaexiv2? Do you think this would be a way to get this information into Photoprism?@lastzero commented on GitHub (Nov 9, 2023):
exiv2 / exiftool may both have "Exif" in their name, but this is XMP metadata not Exif. So our
Exif()function won't extract that. For XMP support, see:TLDR: What has kept us from doing more with XMP so far is proper XML support in Go, the programming language we use (besides, XMP is a pretty extensive meta metadata format, so each model requires extra work). Maybe there are better libraries out there now. Contributions welcome!