Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Create an app to manage the meta data stored in media files #120

Open
oparoz opened this issue Sep 4, 2016 · 12 comments
Open

Create an app to manage the meta data stored in media files #120

oparoz opened this issue Sep 4, 2016 · 12 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request

Comments

@oparoz
Copy link
Member

oparoz commented Sep 4, 2016

From @oparoz on March 2, 2016 2:29

GSoC 2016

ETA: August 2016
Student: Jalpreet Singh Nanda (@imjalpreet)
Project: https://github.com/interfasys/mediametadata

Description

Media files can contain extra information embedded in the header. The goal is to extract that information at upload time and to store it in the database so that it can be used later for sorting or to give users more information about their files.

It will also be possible to manipulate the information so that users can change the image's rotation, description, etc.

Collecting information

  1. Any file operation generates events, propagated via the Hooks system. Our app needs to register as a listener of a selection of events
  2. When receiving an event, the app will need to parse the information and store it

Retrieving the information

Any app can test for the presence of this new app and then retrieve the information straight from the database.

The alternative is to use a REST API, but this might slow down operations as it requires making an additional HTTP request every time the consumer needs to get information about media files

A 3rd option is to create services which can be re-used by other apps, but app-interdependency is frowned upon. If it is determined that for performance reason this is the best option. A solution will be found. At the last resort, we could integrate the services inside Gallery, making them exclusively available to this app.

Writing information to an image

This is quite similar to retrieving information, but will generally be done one image at a time, so using a REST API sound like a good solution

Benefit / value

This can then be used for:

  • sorting by date taken as opposed to date uploaded
  • sorting by colour (Exif data)
  • sorting by size
  • sorting by person (Exif data)
  • virtual views. Date based albums, tags based albums, location based albums, etc REST API fixes and extensions #95
  • modifying the metadata linked to an image

Risk / caveats

It creates a dependency between Gallery and the metadata app, because if the metadata app's API changes, features will stop working in Gallery.

Specifications

Requirements

  • Parsers/writers for XMP, IPTC, EXIF
  • Stores the information in both its own and existing ownCloud (tags) table(s)
  • Collects the information at upload time (GUI, WebDAV)
  • CRUD operations
  • (Optional) Video files parser to detect HTML5 compatibility

Implementation

  • MetaDataService
  • Parsers/writers in folder "metadata"
  • Use Hooks to keep the information up to date

Documentation

Sponsorship

GSOC 2016

Copied from original issue: owncloud/gallery#550

@oparoz oparoz added coder wanted enhancement New feature or request labels Sep 4, 2016
@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @harshjv on March 21, 2016 3:19

Hello, I would like to work on this issue for GSoC.

PHP already have support for IPTC and EXIF data through iptcparse and exif_read_data respectively. But has no built-in support for XMP data.

But as XMP data is present in XML format, basic parsing can be done by looking for <x:xmpmeta and </x:xmpmeta> in the image.

I also have an idea to handle the rest of the issue. I'll be submitting a proposal for the project soon.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

But as XMP data is present in XML format, basic parsing can be done by looking for <x:xmpmeta and </x:xmpmeta> in the image.

Indeed and if that doesn't exist as a composer library yet, it could be written by the student.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @harshjv on March 21, 2016 9:15

@oparoz sure! I found this https://github.com/mermshaus/kaloa-xmp. It reads XMP metadata from the image.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

@harshjv - Cool :)

@imjalpreet @harshjv - I've updated the OP to try and give more information on how this could work.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @harshjv on March 21, 2016 19:3

@oparoz Thanks 😄

I have created a sample app to store image's width and height when it is uploaded using Hooks and Node API. Source code: https://github.com/harshjv/owncloud-imagesize-app

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

Thanks! I'm going to report back in your app's repo directly

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @harshjv on March 23, 2016 16:39

It seems that if metadata service is added to Gallery then due to the part of Gallery app, the service will be limited to the media provided by the Gallery app.

Instead, what about a separate application just for handling metadata and storing it to database and make the data available to other apps as a service? If this solution is considered then the app can be extended to collect metadata of media other than images, such as audio and video.

What do you think? @oparoz

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

The 1st thing to resolve when working on this project will indeed be the location of the services. Apps should not depend on other apps, but by making the dependency optional and having a stable API, we could make it work by creating a metadata app which offers its services to any app needing to extract and/or write meta data to media files.
This will have to be discussed with the core team. I'm trying to avoid to bloat Gallery with services which not everybody will use, but this is pretty central to the way a multimedia app works, so not a big problem to include, just a shame for other apps.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @harshjv on March 24, 2016 8:37

Yes, first the location of the service should be decided. If a separate app is developed, It will keep Gallery app away from being bloated. This way, an independent app can be made available for metadata as a service.

@oparoz
Copy link
Member Author

oparoz commented Sep 4, 2016

From @hna61 on August 12, 2016 11:51

Would it be possible to manage the meta data in a separate .xmp file?
That would be of great benefit (at least for me): keep the valuable media file untouched but change meta data by changing the contents of the accompanied xmp-file.

@Mannshoch
Copy link

I would prefer creating an extra xmp file only if you activate this.
How is this feature Request going?

@oparoz
Copy link
Member Author

oparoz commented Apr 24, 2017

I need to sync with last year's student to see what we can do next.

@skjnldsv skjnldsv added 0. Needs triage Pending approval or rejection. This issue is pending approval. and removed gsoc labels Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants