nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
521 stars 59 forks source link

Show and edit EXIF Tags #226

Open skjnldsv opened 4 years ago

skjnldsv commented 4 years ago

Feature request

User type: Logged-in or public user

User level: Beginners, intermediate or advanced

Description

My photo collection is taken care of with digikam, a really powerful foto managment tool. In digikam you can give stars to images and use tagging to mark subjects, context or people in the images.

nextcloud gallery Features requested:

EXIF is the standard that stores metadata in image files. The actual values are stored in a format defined by IPTC and XMP https://de.wikipedia.org/wiki/IPTC-IIM-Standard https://de.wikipedia.org/wiki/Extensible_Metadata_Platform

Benefit / value

Better usability, Easier to keep in control of the floods of images that are synced.

Before owncloud we had a straight forward Foto Workflow e.g. from digital camera -> import folder, editing -> image library -> sharing with friends. Nowadays Images pour in from different peoples smartphones/cameras/ other synced devices and adding tags only makes sense if this is can be done by anyone who is sharing those images.

Risk / caveats

Displaying images in Tag based albums would require some thought about which folders or subfolders are beeing scanned for images. Some users might have been used gallery 3, phtagr, or other image galleries, which use some kind of database or caching of Image Tag information.

Sponsorship

Are you a developer willing to implement this feature?: no Can you sponsor the development of this feature or do you know someone who can?: yes We could at least to some extent sponsor work on that feature.

Originally posted by @epe in https://github.com/nextcloud/gallery/issues/204

skjnldsv commented 4 years ago

Is your feature request related to a problem? Please describe. I use shotwell to organize and tag my photos. Once uploaded to my nextcloud instance I am unable to see the tags set under 'Tagged photos'

Describe the solution you'd like I would like to be able to browse my photos using the tags set by shotwell (stored in EXIF-data)

Describe alternatives you've considered None, since this feature seems unavailable

Additional context See attachement for an example with (nested) tags

naamloos-7827

rikmeijer Originally posted by @rikmeijer in https://github.com/nextcloud/photos/issues/225

matiasdelellis commented 4 years ago

Hi,

I would like to see this, but IMHO this should be done in another application. I am particularly concerned with tag editing. Change EXIF or just rotate the images, emits a hook saying that the image has changed (actually \OC\Files\postWrite). You don't know what change in the image, so this invalidates any type of information that you have about the image, and you have to analyze the image again.

For example:

A real case: Well, Nextcloud Maps change the geolocation of an image. This emit \OC\Files\postWrite, Our Face Recognition application just know that the image changed, and since don't know what change, should remove the info of this image and must be analyze it again which has a great cost!. :disappointed:

Note that the same would happen if FaceRecogniton change the images adding the regions of the faces into the files. As nobody knows exactly what changed, the preview would be done again, the tags should be loaded again, and the map application would not display this image either. :sweat_smile: This is inefficient, and can be annoying for the user..

Suggestion: Must centralize tag management as a new application, or preferably an ImageManager/ImageService/ImageMetadataService ¡? within the Nextcloud/Server core.

In this way all applications that depend on metadata can interact with greater security.

And as I said I want to see these characteristics, but just try to explain, that a more important background job is needed to do it well. :wink:

Thanks for all, Regards, Matias.

skjnldsv commented 4 years ago

Hey @matiasdelellis ! I'm thinking about the same as you!

Must centralize tag management as a new application, or preferably an ImageManager/ImageService/ImageMetadataService ¡? within the Nextcloud/Server core.

That would help a lot. Especially if we just expose the metadata into a dav property, meaning it doesn't break anything. For example using the taken date for sorting, if the info is here, let's use it, if not, meh.

BUT, it complicate the infrastructure. If a new user have to install 15 apps that are just here as plugins this doesn't help easing the setups.

dermalikmann commented 4 years ago

Just to get this straight in my head: We all want EXIF support. But performance and usability wise it is preferred that all EXIF manipulation is in a central background location. Since you closed nextcloud/server#5106 I assume that you want NC Photos to be that background Manager, am I correct?

skjnldsv commented 4 years ago

Since you closed nextcloud/server#5106 I assume that you want NC Photos to be that background Manager, am I correct?

Not specifically, but this issue gained lot of attraction lately while the one in server is kinda lost in the thousands of others. So let's focus on dicsussing this here :)

There is already a metadata app. https://github.com/gino0631/nextcloud-metadata Currently it adds just a tab in the sidebar, which is not really what we want to aim for at Nextcloud. We would like to have this receive a proper api implementation in dav so other apps can use those additional informations. But The sidebar already have lots of tabs and too much can get confusing.

Anyway, there's lots of ideas and desire in this area, we just have to find the sweet spot ;)

Spartachetto commented 4 years ago

I hope that a proper api implementation in dav could allow to tackle also issues like this: https://github.com/nextcloud/server/issues/19114

In several cases bibliographic data is just a peculiar type of file metadata...

jokerigno commented 4 years ago

I think that tag support would be a killing feature. Right now other sw have support for photo metadata but no one can read photo tag made by digikam or lightroom.

skjnldsv commented 4 years ago

I think that tag support would be a killing feature. Right now other sw have support for photo metadata but no one can read photo tag made by digikam or lightroom.

Please use the github reactions to add your support to a feature :)

milianw commented 4 years ago

I would also love to see this feature becoming available. If possible, please keep compatibility with other external applications in mind. It would be great e.g. if one could easily run e.g. a specialized face recognition application on some machine and then sync back the tags somehow (ideally through EXIF or potentially even some scriptable REST API or the like). Generally, it would be ideal if an application like digikam would become better integrated with nextcloud somehow...

jokerigno commented 4 years ago

It would be great e.g. if one could easily run e.g. a specialized face recognition application on some machine and then sync back the tags somehow (ideally through EXIF or potentially even some scriptable REST API or the like).

I use this way. I started tagging faces on lightroom, then moved to digikam and noticed that if tags are saved in exif information I can see them in digikam too. The only missing part is on nextcloud.

mayonezo commented 4 years ago

What I want is to be able to look at my exif sorted photos remotely. Editing them is more of a "nice to have", since I would prefer to do this with dedicated software anyway. Also I think that editing is much harder to implement than simply showing available exif tags. Maybe we could split this issue into two parts, one for showing exif tags and one for editing them?

yekibud commented 4 years ago

I agree with @mayonezo and would like to work on a PR for the simpler feature of simply creating NC tags from IPTC keywords on image file import/update. I haven't hacked on NC yet but I assume that's a small amount of code, just not sure whether it's preferred those changes are applied to photos or the nextcloud-metadata app, where there is also a discussion https://github.com/gino0631/nextcloud-metadata/issues/20

One possible UI/UX issue I can think of for the readonly aspect of the file-meta tags would be users thinking they can apply tags to their photos in the NC UI and these would be written back to the image files and show up in their desktop photo manager - but maybe that use-case can just be a README or tooltip note, since I'm pretty sure everyone using those photo managers aren't planning to also use the NC UI for editing.

skjnldsv commented 4 years ago

haven't hacked on NC yet but I assume that's a small amount of code, just not sure whether it's preferred those changes are applied to photos or the nextcloud-metadata app, where there is also a discussion gino0631/nextcloud-metadata#20

Eheh, in my dreams yes ;) Unfortunately this is not as easy, otherwise, someone would have done it already :see_no_evil:

The issue is that we want metadata integrated within nextcloud, not with an external app. But how the current metadata app is not quite what we want as UI/UX. See https://github.com/nextcloud/photos/issues/226#issuecomment-595748443

yekibud commented 4 years ago

Yeah, I get it that the "bigger picture" including editing is probably not so straight-forward @skjnldsv, but I'm only talking about addressing the use case you referenced in https://github.com/nextcloud/photos/issues/226#issuecomment-595683574, which I think could add a lot of value right now and satisfy a lot of users needs (like mine and the other folks that upvoted https://github.com/nextcloud/photos/issues/226#issuecomment-624609017). Like @jokerigno said, I can't find any other FOSS software that does this right now and it is a key feature for users who use IPTC keywords written by desktop apps to files for organizing and sharing photos.

This is a current itch I have to scratch and I would like to contribute. I'm worried the other larger scope metadata solution being talked about here may take quite a bit of time. So do you think this high-value/lower effort iterative approach makes sense? And if so, should it be a PR to photos, or should it be its own app? If it were a PR to photos then maybe it could be a configurable personal setting (default to off).

Thoughts?

skjnldsv commented 4 years ago

It should be integrated into server in my opinion. As a shipped app. :)

The first step to just read the tags could be a nice one, definitely. And then improve towards an editable API :thinking:

Once the tags are available via DAV as properties (as well as via the php Files api of course), it will be easy to forward them in lots of places (photos)

svenb1234 commented 4 years ago

I also tend to see this as a general functionality/tool to import information from files - starting with IPTC from within photos and videos, but not limited to those in the long term.

yekibud commented 4 years ago

@skjnldsv I'm starting to look into this (might take me a bit since I've never hacked on NC and haven't written any PHP for 15 years).

It should be integrated into server in my opinion. As a shipped app. :)

Okay, so should I open a separate issue in server, such as "Create and update DAV properties and Nextcloud tags from file metadata" and reference this issue, then? Are there any important differences between a regular app and a "shipped app" that I should take into account?

Once the tags are available via DAV as properties (as well as via the php Files api of course), it will be easy to forward them in lots of places (photos)

So the DAV properties would be the authoritative list of metadata options that could be configured (via user settings UI) to be converted into tags (systemtag) on file create/update event hooks?

I'm having a bit of trouble finding out how the DAV properties described in the docs are persisted and can be modified. The filecache table seems to reflect some properties, but not everything that's listed as "supported", and the properties table is empty on my instance.

Sorry if this isn't the right place for this clarification, but I didn't have any luck on IRC or the forums yet. Looks like basic/default properties like contenttype are mapped to the filecache table somewhere and the properties table is used to persist custom properties via PROPPATCH.

yekibud commented 4 years ago

In lieu of feedback I've gone ahead and started a branch on the related nextcloud-metadata issue to support the user configurable creation of NC tags from file metadata. I don't see the point of DAV properties right now and there is already repurposable code in the nextcloud-metadata project - which a fair number of folks seem to already be using.

nextcloud-metadata will have to be updated once the file side-tabs view goes away in NC20, but I just don't feel like there is enough guidance to propose this smaller metadata-tags feature as a near-term enhancement to nextcloud/server right now, and it would probably get bogged down in architectural discussions before a PR was merged in, anyway.

Also, it seems to me that iterating on features like this in third-party apps and then working with those apps to bring them into the upstream fold would be a desirable workflow.

Spartachetto commented 3 years ago

@skjnldsv whichever solution you'll pick, I imagine that it should allow to select which metadata I want to read. Maybe something like the app "Social sharing" which has Social sharing via Diaspora, Social sharing via email, ....

I imagine that it should be possible to choose if the Nextcloud instance could read the metadata for

and / or the more specialized:

TurkeyMan commented 3 years ago

This appears to have been stagnant for a while. I really want to at least be able to view EXIF data in Photos. Is there progress? Is Photos the place where this support should be introduced?

skjnldsv commented 3 years ago

@TurkeyMan please read the entire thread. We all want that, no one seems to have the time for it. :(

Requirements are as follow:

  1. should be an app
  2. should index metadatas
  3. should make them available through dav (might require server patch)
  4. should be shipped by default

Editable and searchable metadata are not part of the initial specs, might come later. There is a 290$ bounty to it for sorting by exif (which should be easy once such criterias are fulfilled)

Cheers! :v: :relaxed:

averdecia commented 3 years ago

Hi @skjnldsv please talk with @oparoz and @MorrisJobke We have a solution working for this item. It's a big solution, but you can base the work on our idea. It fit all the needs, but of course, it can be improved.

skjnldsv commented 3 years ago

@averdecia Feel free to open PRs :rocket:

kccorl1993 commented 2 years ago

Hi @skjnldsv please talk with @oparoz and @MorrisJobke We have a solution working for this item. It's a big solution, but you can base the work on our idea. It fit all the needs, but of course, it can be improved.

So @averdecia does this mean there is something still in the works? I'm trying to bring some other users into the fold with backing up their photos on my server and this is a key missing feature. If they are ever going to move away from Google Photos (I understand this is a large undertaking in general), then viewing photos in the gallery sorted correctly is a huge addition...

averdecia commented 2 years ago

Hi @skjnldsv, @kccorl1993, I can't open a PR, because we are using a microservice for extracting the meta tags. The solution is sending a request to a microservice each time a new file is uploaded, using a message broker we process each file in an async way. Once the file is processed the metadata is saved in the microservice database, and the date from the photo is sent back to NC core database to allow sorting. On the other hand, the mobiles devices sent the creation date since the put request using a header, that way the elements will be sorted the right way since the beginning. From the high level, that's what we have, but as I said before it is a big solution, it also helps with some other features like geolocation, and be able to ask for any metadata from the webdav interface.

bonswouar commented 2 years ago

@averdecia

Hi @skjnldsv, @kccorl1993, I can't open a PR, because we are using a microservice for extracting the meta tags. The solution is sending a request to a microservice each time a new file is uploaded, using a message broker we process each file in an async way. Once the file is processed the metadata is saved in the microservice database, and the date from the photo is sent back to NC core database to allow sorting. On the other hand, the mobiles devices sent the creation date since the put request using a header, that way the elements will be sorted the right way since the beginning. From the high level, that's what we have, but as I said before it is a big solution, it also helps with some other features like geolocation, and be able to ask for any metadata from the webdav interface.

I feel like this is basically what we'd need, would you share the code to see how we can adapt it? I'm also really waiting for this feature (and I could help), it's a big bummer from a typical user point of view..

nigelsim commented 2 years ago

Is there work underway on this, and has it been resolved how to reconcile this with #466 ? I would like to contribute if I can over the next couple of months, but it is currently unclear how.

PeggyFree commented 2 years ago

May I ask an exif tab in the photo app? At least please integrate the metadata plugin tab currently displayed in the file explorer, it would be so useful.

raphaelchinchilla commented 2 years ago

@skjnldsv

There is a 290$ bounty to it for sorting by exif (which should be easy once such criterias are fulfilled)

I am not sure how bounties work, but assuming that several people can chip in, could you share the link to the bounty? I want to contribute to it.

Also, I think most of us that has been watching this thread for a while (for me almost two years for instance) and those that come looking for it in the future could (should?) make contributions until we reach some critical mass that makes a developer want to dedicate enough time for it.

quovadit commented 2 years ago

https://app.bountysource.com/issues/37560259-use-exif-taken-date-as-sorting-date-for-photos

eldelacajita commented 2 years ago

Shouldn't we create a bounty specific to this issue?

Edit: I went to Bountysource to see how to create one... and I just created it almost by accident (come on, Bountysource, a confirmatio button wouldn't hurt). Not sure if it's the right move, but I can't seem to be able to delete it now, so here it is: Show and edit EXIF Tags

If it's fine, I'll contribute to this new one. If not, to the old one.

hansimausisteffiwurstbrot commented 1 year ago

I think it's a very useful feature that should be implemented.

Bountysource is kind of burned, though: https://help.nextcloud.com/t/dont-use-bountysource-anymore/84943

fultonm commented 1 year ago

Happy to contribute to a bounty on this, although I don't know why Nextcloud gallery can't use EXIF data for this feature, and also to sort the gallery/ show most recent photos first... this has been a highly requested feature for so long for almost 10 years. What's the blocker?

meichthys commented 1 year ago

@fultonm if you need exif support you can use Nextcloud Memories

wonx commented 1 year ago

@fultonm if you need exif support you can use Nextcloud Memories

Memories does not support exif tags yet, just dates.

meichthys commented 1 year ago

Memories does not support exif tags yet, just dates.

I think some other fields are supported, but not all: Screenshot_20230507-180917.png

PhilippSchlesinger commented 7 months ago

The recently closed issue https://github.com/nextcloud/server/issues/40676 is a meta issue tracking "Making the Metadata API public" that also includes "EXIF data display" https://github.com/nextcloud/server/issues/39714. (not sure if EXIF tags are also dealt with already)

sadorowo commented 1 month ago

this is a very high requested feature. photos should be based by EXIF creation date, not system modify date. any progress on this?