Comments (10)
I'd like to work on this in the next couple weeks. Do you have any design preferences/input @gino0631 ? I'd want it to be a user configurable option to do this automatically on image file import so that users wouldn't have to set up cron jobs for generating the tags. Or maybe this should be done outside of the metadata app (in "photos")? nextcloud/photos#226
I'm just starting to get familiar with the NC code-base so pardon my ignorance.
from nextcloud-metadata.
@yekibud generating Nextcloud tags on import does not solve the problem for image files that are already imported, and as Nextcloud does have background jobs, that should not require to set up cron jobs to scan through the files.
Nevertheless, I would start from analyzing the API for tag creation, and implement the feature as a command, as initially suggested. That would be enough as a PoC, and for advanced users, and could be extended to a feature of a broader use.
After we implement an integration with search, which is another welcome feature, it would probably be more clear what should go into this app and what should not.
from nextcloud-metadata.
Thanks for your reply, @gino0631 .
Per nextcloud/photos#226, there seems to be an interest in building metadata as a general feature into nextcloud/server
as a "shipped app". However, I'm a little hesitant to start there, as I have a much more specific itch to scratch. Also, it seems like you've got some good repurposeable code here which could be moved into server
- even if they don't want the file details view. I would think a typical "app promotion" workflow for a NC sort of thing would be to start as a separate app with fewer features and then get migrated into core.
One suggestion was that metadata should be persisted as DAV properties - which it doesn't look like you're doing. Do you have any thoughts on doing that and getting metadata into the NC properties
table vs just reading them on the fly? And what do you think about the suitability of moving your app into core? Worth migrating, or better to do a full re-write?
from nextcloud-metadata.
@yekibud no, currently I'm not employing DAV properties, though I guess it would be possible to do so. It all depends on what we are trying to achieve. If there is an interest to integrate via DAV properties, i.e. another app would be reading them, I'm ready to cooperate, otherwise what's the point?
As for the core features, it's a long story :) Several years ago I was looking for a solution to store my files in a convenient way, accessible from anywhere, but staying on my premises. This way I discovered NC, which looked a very promising solution, but I was amazed it wasn't possible to see even the basic attributes of the files I upload - that looked as a complete show-stopper for me. I did some research, and it took 2-3 hours for me to find a way to implement the functionality I needed. Then I was confident I finally had what I wanted :) Be it all in the core from the very beginning, there would be no need for this app.
Now, of course, the app has grown. There are features I'm proud of, and there are much more to implement. Still, as usual, not enough time, as I can't spend much time for such projects.
In any case, as I'm personally using the app, I will continue it as long as it is meaningful to do so. If there are enough resources (and that should be the biggest problem) to migrate the relevant functionality into the core, and the code seems to be reusable (it should be, but that also depends on what you need), I'm OK with that.
from nextcloud-metadata.
Thanks for the reply, @gino0631 . I've forked your project and created a branch for NC tag integration. Sounds like NC20 is going to do away with the file side-panel tabs view, so this project will need to be updated (or integrated) in order to work after that.
Basically what I'm proposing is a simple personal settings menu where users can select metadata they want converted into NC tags on file upload/update, as well as a setting to run a background task for converting existing file metadata to tags.
I'd like to have an authoritative data structure for the supported metadata to display in the UI, so I was thinking of creating a Metadata
table migration (populated with what you've currently got in EXIF-XMP-IPTS.md
) for display in the settings UI and to support a UserMetadataTags
table to persist user selections.
Thoughts?
from nextcloud-metadata.
@yekibud do you have any pointers regarding these changes in NC20?
As for the tags, yes, we need to define what would be meaningful to offer to covert to tags. I would start from a small set though - this can be easily extended once you have a code that integrates with NC.
from nextcloud-metadata.
Sorry, can't find it ATM, I think it may have been in one of the many NC issues I've been reading lately. Also, the related issue in nextcloud/photos
talks about getting rid of metadata from tabs.
In any case, my current issue is event handling in NC. What a mess! NC 18 examples are currently a mix of 4 different patterns. File events seem to use hooks - but can't seem to get the event decoupled from preview image file generation which happens at the same time. So right now my solution is a hack that gets the real file ID from the uploaded file path in the postCreate
event (which references a preview thumbnail), and looks up the real file path in order to extract metadata on an event-driven basis.
Alternatively I guess I could set up a background task or file monitor. Might be cleaner. Suggestions welcome.
from nextcloud-metadata.
Alternatively I guess I could set up a background task or file monitor. Might be cleaner. Suggestions welcome.
That would be akin to the preview-generator app which probably is a good idea. It might perhaps also be possible to use the native background jobs functions in NC to scan files?
I like the UI example from your previous post. May I suggest to allow a user to choose to convert any custom EXIF tag, as well as support nested tags - tree structure like. However, I think the tags actually are XMP metadata, not sure how that works?
Example JPEG that I have added two tags Animals
and Moose
using the DigiKam photo app. The Moose
tag is hierarchically below the Animals
tag.:
# exiftool 20200503_134210.jpg
ExifTool Version Number : 11.99
File Name : 20200503_134210.jpg
Directory : .
File Size : 6.9 MB
File Modification Date/Time : 2020:05:29 08:43:05+02:00
File Access Date/Time : 2020:05:14 05:02:53+02:00
File Inode Change Date/Time : 2020:05:29 08:43:05+02:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Make : samsung
Camera Model Name : SM-G970F
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : G970FXXU4CTC9
Modify Date : 2020:05:03 13:42:10
Y Cb Cr Positioning : Centered
Exposure Time : 1/237
F Number : 2.4
Exposure Program : Program AE
ISO : 50
Exif Version : 0220
Date/Time Original : 2020:05:03 13:42:10
Create Date : 2020:05:03 13:42:10
Components Configuration : Y, Cb, Cr, -
Shutter Speed Value : 1/237
Aperture Value : 2.4
Brightness Value : 6.02
Exposure Compensation : 0
Max Aperture Value : 1.5
Metering Mode : Average
Flash : No Flash
Focal Length : 4.3 mm
Sub Sec Time : 0576
Sub Sec Time Original : 0576
Sub Sec Time Digitized : 0576
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 4032
Exif Image Height : 2268
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
Scene Type : Unknown (.)
Custom Rendered : Normal
Exposure Mode : Auto
White Balance : Auto
Digital Zoom Ratio : undef
Focal Length In 35mm Format : 26 mm
Scene Capture Type : Standard
Contrast : Normal
Saturation : Normal
Sharpness : Normal
Image Unique ID : L12XLLD00SM
GPS Version ID : 2.2.0.0
GPS Latitude Ref : North
GPS Longitude Ref : East
GPS Altitude Ref : Above Sea Level
GPS Time Stamp : 11:42:04
GPS Processing Method : GPS
GPS Date Stamp : 2020:05:03
Compression : JPEG (old-style)
Thumbnail Offset : 1156
Thumbnail Length : 37203
XMP Toolkit : XMP Core 4.4.0-Exiv2
Warning : [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto
Pick Label : 0
Color Label : 0
Urgency : 0 (reserved)
Categories : <Categories><Category Assigned="1">Animals<Category Assigned="1">Moose</Category></Category></Categories>
Tags List : Animals, Animals/Moose
Region List :
Region Info Regions :
Last Keyword XMP : Animals, Animals/Moose
Hierarchical Subject : Animals, Animals|Moose
Catalog Sets : Animals, Animals|Moose
Subject : Animals, Moose
Current IPTC Digest : 0dd9bcc0a28376eec172755898ad7b1c
Coded Character Set : UTF8
Keywords : Animals, Moose
Image Width : 4032
Image Height : 2268
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
Time Stamp : 2020:05:03 13:42:10+02:00
Aperture : 2.4
Image Size : 4032x2268
Megapixels : 9.1
Scale Factor To 35 mm Equivalent: 6.0
Shutter Speed : 1/237
Create Date : 2020:05:03 13:42:10.0576
Date/Time Original : 2020:05:03 13:42:10.0576
Modify Date : 2020:05:03 13:42:10.0576
Thumbnail Image : (Binary data 37203 bytes, use -b option to extract)
GPS Altitude : 76 m Above Sea Level
GPS Date/Time : 2020:05:03 11:42:04Z
GPS Latitude : 59 deg 1' 47.05" N
GPS Longitude : 17 deg 17' 4.72" E
Circle Of Confusion : 0.005 mm
Field Of View : 69.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 26.0 mm)
GPS Position : 59 deg 1' 47.05" N, 17 deg 17' 4.72" E
Hyperfocal Distance : 1.56 m
Light Value : 11.4
Another JPEG without added tags, just as it is imported from the camera:
# exiftool 20200503_134213.jpg
ExifTool Version Number : 11.99
File Name : 20200503_134213.jpg
Directory : .
File Size : 7.0 MB
File Modification Date/Time : 2020:05:14 05:06:07+02:00
File Access Date/Time : 2020:05:14 05:06:06+02:00
File Inode Change Date/Time : 2020:05:16 22:16:07+02:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Orientation : Horizontal (normal)
Y Cb Cr Positioning : Centered
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Make : samsung
Camera Model Name : SM-G970F
Software : G970FXXU4CTC9
Modify Date : 2020:05:03 13:42:13
Exposure Time : 1/199
F Number : 2.4
Exposure Program : Program AE
ISO : 50
Exif Version : 0220
Date/Time Original : 2020:05:03 13:42:13
Create Date : 2020:05:03 13:42:13
Shutter Speed Value : 1/199
Aperture Value : 2.4
Brightness Value : 5.94
Exposure Compensation : 0
Max Aperture Value : 1.5
Metering Mode : Average
Flash : No Flash
Flashpix Version : 0100
Components Configuration : Y, Cb, Cr, -
Focal Length : 4.3 mm
Sub Sec Time : 0923
Sub Sec Time Original : 0923
Sub Sec Time Digitized : 0923
User Comment :
Color Space : sRGB
Exif Image Width : 4032
Exif Image Height : 2268
Scene Type : Unknown (.)
Custom Rendered : Normal
Exposure Mode : Auto
White Balance : Auto
Digital Zoom Ratio : undef
Focal Length In 35mm Format : 26 mm
Scene Capture Type : Standard
Contrast : Normal
Saturation : Normal
Sharpness : Normal
Image Unique ID : L12XLLD00SM
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
GPS Version ID : 2.2.0.0
GPS Latitude Ref : North
GPS Longitude Ref : East
GPS Altitude Ref : Above Sea Level
GPS Date Stamp : 2020:05:03
GPS Time Stamp : 11:42:09
GPS Processing Method : GPS
Compression : JPEG (old-style)
Thumbnail Offset : 1176
Thumbnail Length : 36554
Image Width : 4032
Image Height : 2268
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
Time Stamp : 2020:05:03 13:42:13+02:00
Aperture : 2.4
Image Size : 4032x2268
Megapixels : 9.1
Scale Factor To 35 mm Equivalent: 6.0
Shutter Speed : 1/199
Create Date : 2020:05:03 13:42:13.0923
Date/Time Original : 2020:05:03 13:42:13.0923
Modify Date : 2020:05:03 13:42:13.0923
Thumbnail Image : (Binary data 36554 bytes, use -b option to extract)
GPS Altitude : 74 m Above Sea Level
GPS Date/Time : 2020:05:03 11:42:09Z
GPS Latitude : 59 deg 1' 47.06" N
GPS Longitude : 17 deg 17' 4.76" E
Circle Of Confusion : 0.005 mm
Field Of View : 69.4 deg
Focal Length : 4.3 mm (35 mm equivalent: 26.0 mm)
GPS Position : 59 deg 1' 47.06" N, 17 deg 17' 4.76" E
Hyperfocal Distance : 1.56 m
Light Value : 11.2
from nextcloud-metadata.
Heh, heh. Nice moose. :-)
Good point about the hierarchical tags - I don't think Shotwell does that, they're all just a comma delimited list of IPTC "keywords", IIUC. I think for a first iteration it really depends on what nextcloud-metadata
supports "out-of-the-box", and per the EXIF-XMP-IPTC.md README, it's not everything, apparently - so probably wouldn't be able to let the user specify arbitrary metadata. I'll know more once I dig into this a little deeper next week.
from nextcloud-metadata.
She is our friendly neighbourhood moose. Not worried about people at all :)
A separated list of tags works of course. The other bits is more of how tags are presented in the UI.
For me, I'd like to have several parts. At least the common attributes like camera model, iso, date, width, hight and of course tags like Animal, Moose
from nextcloud-metadata.
Related Issues (20)
- Make app compatible with NC26 HOT 1
- Metadata for MTS / M2TS files HOT 4
- Release Nextcloud 27 compatible version HOT 4
- Allow extensions from mimetypemapping.dist.json
- Add Nextcloud 28.x Compatibility. HOT 24
- Could not boot metadata: Call to undefined method HOT 3
- Error Call to undefined method OC\Server::getEventDispatcher() Could not boot metadata: Call to undefined method OC\Server::getEventDispatcher() HOT 2
- cannot work for current nextcloud v28 HOT 2
- Suggesting reading metadata from json file HOT 8
- Click on last files in the list removes DOM files-list__row items from the list HOT 5
- Small Bug app.php deprecated error message HOT 12
- Format MXF HOT 3
- Compatibility with Photo 2.0 from Nextcloud 25.x HOT 3
- Metadata tab on photo sidebar HOT 1
- Fails to read Jamendo-encoded MP3 files HOT 6
- every time i try to upload large files i get this error? HOT 1
- audio sampe rate and size not correct HOT 5
- Division by zero for some pictures when reading metadata HOT 4
- Enable PHP8.2
- Protokoll Log Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextcloud-metadata.