extended attributes (feature request)

Started by rosell-dk, August 10, 2021, 10:09:02 AM

Previous topic - Next topic

rosell-dk

Hi,

I'm overall looking for a way to categorize my photos and videos with tags (such as "favourite, birthday, family"), which are stored in the images themselves. Unfortunately however, most organizers stores the tags in sidecar files or in a database. Having lost my tagging efforts several times in my lifetime, I'm now convinced that this metadata needs to be tightly coupled with the photos (here is a brilliant article on that subject: https://www.lesbonscomptes.com/pages/tagfs.html)

In my search, I found Gwenview, which stores the custom tags in an extended attribute named "user.xgd.tags". Gwenview is ok for tagging, but lacks the feature to find images with certain tags. For this I can however use "recoll", which does index tags set in the "user.xgd.tags" extended attribute.

I'm not decided if I want to go with storing my tags in an extended attribute. I would be more comfortable with storing it in an Exif tag, as there is a neat tool for working with these (yours!). I'm thinking "Keywords" would be a good Exif tag for this purpose. However, I don't seem to have this choice, as I haven't found a photo organizer, which stores custom tags in Exif. Another option could be to put the tags directly in the filename: "IMG_2101 [favourity birthday family].JPG". TagSpaces takes this approach: https://docs.tagspaces.org/tagging/. However, TagSpaces is out of my price range, and I don't want to do rename files manually (I want to easily tag several images in bulk).

My main concern with going with Gwenview and extended attributes is that they are somewhat fragile - some software looses them when working on the file (https://www.lesbonscomptes.com/pages/extattrs.html). Before spending time tagging, I need a way to regularily back them up. Preferably into an Exif tag. Also, it would be nice to know that I can convert the tags into an Exif tag, in case I find a better photo organizer, which stores the tags in Exif.

Sorry for the long warm up!

So, here is my feature request:
To be able to copy extended attributes (any, or simply user.xgd.tags) into an exif tag using exiftools and vice verca.

Regards and thank you for your great tool!
Bjørn Rosell



StarGeek

Any reason not to use a Digital Asset Manager (DAM) like DigiKam or DarkTable?  That will allow you to write the keywords directly into the files using the IPTC Photo Metadata Standard and not into what I assume is a OS specific file system property that wouldn't survive moving to a different OS file system.  Even something simple like hvdwolf's jExifToolGUI would allow you to embed keywords.

Quote from: rosell-dk on August 10, 2021, 10:09:02 AMUnfortunately however, most organizers stores the tags in sidecar files or in a database.

Most well made programs will use the IPTC standard for metadata.  In files like jpegs and tiffs, the data will be embedded.  PNG files, overall, have very poor metadata support.  Depending upon the program, XMP sidecars or embedded data might be used.

For RAW filetypes, the data is usually put in an XMP sidecar for safety as one mistake might make the image un-renderable.  Exiftool is one of the few things I would trust to actually embed metadata in a RAW file but I would say the majority of RAW photographers prefer untouched RAW images.  There are pros and cons to sidecar files, but use of them for files that little to no metadata support (BMAP) or are difficult to write (videos, webm/p), they can be the only solution.

QuoteIn my search, I found Gwenview, which stores the custom tags in an extended attribute named "user.xgd.tags". Gwenview is ok for tagging, but lacks the feature to find images with certain tags. For this I can however use "recoll", which does index tags set in the "user.xgd.tags" extended attribute.

I'm assuming this is a linux(?) file system attribute.  It's hard to tell because searching google for "user.xgd.tags" returns "It looks like there aren't many great matches for your search".  If so, then this would be an extremely poor place to save tags as it would not survive transfer to another file system or upload to a website.

QuoteI would be more comfortable with storing it in an Exif tag

Just to clarify, EXIF is only one type of metadata and is mostly concerned with data regarding camera settings and how the picture was taken.  While there is an EXIF tag for keywords (XPKeywords), it is a Microsoft specific tag and has almost no support outside of Windows.

The standard place for putting user created data would be in the XMP tags (specifically XMP:Subject), which includes the IPTC Core/Ext, which is mostly detailed in the IPTC standard link above.  There are also IPTC tags (IPTC:Keywords), which are the much older IPTC IIM/Legacy tags.  Normally you would want to use the XMP tags as that is the modern standard unless there's a program that is part of your workflow that prefers IPTC.

QuoteI'm thinking "Keywords" would be a good Exif tag for this purpose. However, I don't seem to have this choice, as I haven't found a photo organizer, which stores custom tags in Exif.

One good thing about the DAMs, either the free ones I listed above or professional ones like Adobe LightRoom or ACDSee is that they hide the absolute hot mess that is metadata (relevant XKCD) give you a more or less easy to use interface that deals with the mess in the background.

QuoteAnother option could be to put the tags directly in the filename: "IMG_2101 [favourity birthday family].JPG".

I see this a lot and there are vocal proponents of this system (I often see it on reddit), but it does have one very severe limitation, filename length.  While Mac/Linux doesn't have the same filename length limitations that Windows have, you will still end up with an extremely long and unwieldy filename when you have an image like this, where you have about 40 people in it. One big family get together and you end up with terrible filenames.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Hi Bjørn,

It would be useful to know what system you're talking about.  ExifTool has the ability to do what you want on MacOS.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I was assuming Linux, as Gwenview appears to be a KDE app.  The last link seems to indicate that there is a Linux version of the MacOS tags.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

rosell-dk

Thanks for your replies!
It sounds very sensible what you write, StarGeek.

I have tried DigiKam and yes, it can be set up to store tags directly in the files. It stores them in IPTC:Keywords. I will go with that. If I need it to switch to another tag for another application, I can use exiftool to copy/move the tags.

I'm btw on Linux MX

I believe you can dismiss the feature request as it seems few will need such a feature. There is just the Gwenview users who want to change image organizer and preserve their metadata. The natural place for such feature however seems to be in Gwenview.

Thanks again!

jbionic

Quote from: rosell-dk on August 10, 2021, 10:09:02 AMHaving lost my tagging efforts several times in my lifetime, I'm now convinced that this metadata needs to be tightly coupled with the photos (here is a brilliant article on that subject: https://www.lesbonscomptes.com/pages/tagfs.html)

Your article mentions the Tagfs (marook, Markus Pielmeier)
https://github.com/marook/tagfs#readme

- I wonder if the latter has anything to do with the following project that goes by exactly the same name?
https://github.com/harshhemani/tagfs
https://sourceforge.net/projects/tagfs/

It's hard to understand the subtle differences between so many tagging file systems as the article barely sheds any light on that. But from what I could grab from the article, there are more comprehensive ways of using tags far beyond media files to tag also system data and executables. However I am still racking my brain to understand why one would need to tag them. Is there anyone on the forum with that particular experience?


avidseeker

I'm adding a vote for xattr support by Exiftool. One thing about the tool is its universality in dealing with various sorts of metadata, and I would love to see support for this underrated feature.

There are already file utilities like getfattr and setfattr to retrieve and set xattrs but they're very low-level and limited. (See: https://discuss.kde.org/t/4392/2)

Again, I feel the expectation for Exiftool is that it's the go-to tool for exploring EVERYTHING hidden within a file. Skipping xattrs goes against this expectation.

Phil Harvey

ExifTool already has the ability to read xattr information, although the write ability is very restricted.  Read here.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

RokeJulianLockhart

I'm commenting here to subscribe to this thread, but I hate too when others do this. Is there a button to subscribe to a thread? I can't find it. Apologies...!

StarGeek

In the upper and lower right corner of each thread


I believe there is also a setting under Account Settings (click on your name upper left)->Notifications.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).