Picture Library
#1
Image

I'm working on getting a picture library in XBMC. ATM the database backend is complete, but it could use a little GUI love (mostly for tagging support). Now I'm looking to break it Smile I could use some help writing test cases in XBMC's testing framework, and I'm also open to ideas for improving the library's layout.

Scanning pictures into the library uses EXIF and IPTC tags, but once the pictures are in there's no way to modify the data (this would have to be implemented via in the GUI). Also, saving the modified metadata would have to be done via external .nfo files, or XBMC would need a way to write to picture tags.

But overall, it's a good start Smile

The code is https://github.com/garbear/xbmc/commits/photolibrary . For those interested, the database backend is a new abstraction I wrote (I call it a denormalized database with dynamic normalization). Once I put it in place, I decided to upgrade the layout by adding tags, keywords and categories; the code to add the many-to-many tables and link tables, upgrade old schema to the new version, and while upgrading pre-populate the six new tables with data that was already in the database, and then modify the GUI to be able to browse by these new fields, was just over 20 lines of code. IOW, adapting to other libraries (looking at you, games!) should be a relatively painless task.

Cheers,
Garrett
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#2
AWESOME!

One suggestion: if you / someone decides one day to add writing tags back to file, please do everyone a favor and use the best toolset out there: exiftools by Phil Harvey ( http://owl.phy.queensu.ca/~phil/exiftool/ ).

This is an area not for the faint of heart, and this tool does it perfectly, and is used by most tagging software...
Reply
#3
Yeah - nice, a picture library would be very cool.

I wouldn't worry too much about metadata editing within XBMC - there are loads of better tools for that, XBMC is not a great editing environment. Indeed, apart from refreshing movies etc, there's not that much editing to be done in XBMC anywhere else is there?

But nifty ways of finding and displaying stuff is it's core work, and this would be a huge leap forward. Will keep my eye on this!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
keep plugins in mind. they are the tool to integrate stuff like databases from other picture software, or online galleries..
Reply
#5
Great to see this!


(2012-09-24, 01:27)garbear Wrote: ...

Scanning pictures into the library uses EXIF and IPTC tags, but once the pictures are in there's no way to modify the data (this would have to be implemented via in the GUI). Also, saving the modified metadata would have to be done via external .nfo files, or XBMC would need a way to write to picture tags.

.....
and
(2012-09-24, 09:22)bossanova808 Wrote: Yeah - nice, a picture library would be very cool.

I wouldn't worry too much about metadata editing within XBMC - there are loads of better tools for that, XBMC is not a great editing environment. Indeed, apart from refreshing movies etc, there's not that much editing to be done in XBMC anywhere else is there?


Saving orientation (is also an EXIF field) could be an automatic function (started after rotate/next picture) in XBMC but yeah, it's to bad XBMC uses a parser which can only read. This means all addon authors should use their own parser for writing to the database, which means a lot of redundant work. Besides, picture rating isn't an option without writing to the database and this is a much wanted feature i think.
Reply
#6
(2012-09-24, 01:27)garbear Wrote: I'm also open to ideas for improving the library's layout.
Have you already tried out MyPicsDB and looking at it for inspiration? MyPicsDB is an existing Python Script Addons for XBMC.

http://forum.xbmc.org/showthread.php?tid=133905

The library GUI layout of MyPicsDB is quite nice and probably have most features the majority of us want.

(2012-09-24, 01:27)garbear Wrote: IOW, adapting to other libraries (looking at you, games!) should be a relatively painless task.
WOW! Just imagining a RetroArch games library in XBMC as a frontend for libretro just made me pee my pants a little bit.

http://www.xbmc4xbox.org.uk/2012/08/retr...the-xbox1/
Reply
#7
Yesterday, I had a look to the picture section and this is what I noticed, just some thoughts:

It would make sense to make the picture viewing experience similiar to videos and audio sections, for a better and more consistent user experience. This continues with improving the GUI, i.e. provide the user with settings for picture viewing (like this), some photo specific views, smarter/better context menus and a new OSD for pictures.

General settings
When entering your picture setting you can basiclly do the same stuff as in the music and video sections.

Code:
System settings > Pictures

General settings
Tab Library:
- Enable metadata scanning (ITC, XMP, EXIF)
(- Hide progress on library update)
- Cache sources on startup/idle
- Clean cache
(- Export library)
(- Import library)

Tab Slideshow:
- Amount of time to display each image
- Use pan & zoom effects (maybe split those up in seperate settings?)
- Default transition effect: Picture scroll, Carroussel, Floating pics (see: http://www.picturetrail.com/sfx/flicks/sample)
- Auto fill to match to display resolution
- Play video's in slideshow ;
- Disable RAW
- Show now playing (music): not, popup when song changes,
- Music OSD integration (to control music during slideshow, also with remote)

But those slideshow settings can be overwritten from the GUI (the OSD for the slideshow feature). Each source should have it's own settings (more or less the same settings as tab slideshow).  

Tab File views:
- Show video files in listing
- Rotate and save picture using EXIF info
- auto generate thumbnails
- number of precached pictures

Tab Photo submission
This is like last.fm & integration in music. Those integrating options are essential for a modern HTPC-software. Plugins like facebook, flickr, tjjkt should easily be integrated by addon devs and setup from the XBMC Framework itself for the user. Once a addon is registered (and login authenticated) it should be available in the send to function (available in the context menu in file views in pic, video and music mode !I think this would be great for all section so addon devs can register their Addon to the send to feature)

this tab (music, song submission) will probable removed and taken care off by an Addon. But the whole problem is that some functionalities (esspecially integrating with online sources) are not as integrated in the GUI. i.e setting up scrapers or last.fm integration.

So you have to start with adding your (picture) sources. Just should use the same procedure as normal. So first use the context menu to fill your library.

Settings in the context menu for sources:
- scan in library
-

Once scanned your source there are some views and option.

Available views:
- Folder view
- showcase (/grid) view
- full screen

Available context menu within slideshow:
- Show user comment
- Show Date & Time
- View original picture
- Delete picture
- Change transition-effect
- Start / Stop music
- Amount of time for each picture

The OSD needs some functions to overwrite some settings and music osd and controls should accessible from within picture slideshow.

There are some good tickets, describing some problems related to the GUI. I try to post them soon in this topic.

Other sources to scrape could be an rss feed. Many photo apps (also on NAS) offer picture solution with an RSS feed when photo are published.

Also, (recursive) slideshows always loops. Should this be an option if someone want it to stop after going through all photos once.
Reply
#8
(2012-09-24, 18:31)Jako Wrote: MyPicsDB

Jako I feel kind of bad barging in on their turf, but a picture library is far overdue and c++ can finally get us full integration Smile. I just loaded up MyPicsDB and I'll check it out. What specific features do you like the best?

I knew you'd be on board, Robotica!

I'm putting the slideshows and GUI overhauls in separate PRs, as more incremental steps will speed development and merging with mainline. Views are decoupled from content, so additional views would have to be added on a per/skin basis. And if you've seen my skinning attempts, it's probably best if I let the skinners do their thing Wink

Scanning is already in Files' context menu, and scraping RSS feeds is a good idea. Plugins can already do this, and I think it'd be really cool to allow scanning their content into the library (not currently possible with music or videos). Post any Trac ticket you find and i'll see if they're something I can tackle.

Cheers,
Garrett
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#9
(2012-09-25, 22:55)garbear Wrote:
(2012-09-24, 18:31)Jako Wrote: MyPicsDB
Jako I feel kind of bad barging in on their turf, but a picture library is far overdue and c++ can finally get us full integration Smile
Yes I definitely agree that a native picture library with a standardized database in XBMC is overdue, and it means that all skins will support it by default.

(2012-09-25, 22:55)garbear Wrote: I just loaded up MyPicsDB and I'll check it out. What specific features do you like the best?
Other than the standard features such all the filtering options, the MyPicsDB addon has a very nice filter wizard that works kind of like XBMC's SmartPlaylists.

I also really like the idea of GeoTagging features with Google Maps connection to show the location, as the new camera I just ordered got GPS tagging so that should give photo viewing an additional dimension!

Note that MyPicsDB not only supports EXIF and IPTC tags but also Adobe XMP metadata tags for pictures.

(2012-06-13, 09:41)Xycl Wrote: [RELEASE] MyPicsDB: Pictures DB with EXIF, IPTC & XMP tags

This add-on allows you to scan picture tags and to store them into a database.
It's an add-on developed by solexalex for Dharma and now migrated to Eden.

Features
- Recursive JPG picture scanning
- EXIF, IPTC & XMP pictures metadata scanning
- By date filtering
- By folders filtering
- By keywords filtering
- By categories filtering
- By persons filtering
- Uses Google Maps to show location of GPS tagged pictures.
- Advanced filter wizard that lets you select several tags at once.
- local or remote scanning (need to mount folders in Linux or OSX. In Window you can access net shares if they are accessible without user/password.)
- Sets home window properties for last added or shooted pictures and random pictures. Skinners look at thread WIP Glass

Installation: (edit)
1) It's now part of the official XBMC repository.

Main menu
Image

Filter wizard:
Image

Browse by tags:
Image
Reply
#10
I'm the current maintainer of MyPicsDB and I would really appreciate an XBMC picture database, too.
There are a lot of guys, including me, needing a database to select the pictures they want to see.
Therefore some ideas for the new feature.

I think the user expactation for a picture library is different from music/video library.
Video: I choose the movie I want to see. Library only needed for additional information.
Music: Use of a smart playlists to select (e.g.) 80th rock music, a 'normal' playlist or direct select of an album. Library is needed for fast access.
Pictures: I would like to see pictures from me, my wife & child from last holiday or pictures from father's 70th birthday without his dog.
This is a mix of several different EXIF, IPTC and XMP tag types including a NOT condition. Therefore I introduced the filter wizard in MyPicsDB.

Database:
The old approach of MyPicsDB was to store each tag type in it's own table like 'Keywords' with an relation to table 'Files' called 'KeywordsInFiles'. This is obviously bad, but still in use for already existing parts of MyPicsDB. Additionally the tags are stored in table files.
The new parts of MyPicsDB only use tables TagTypes, TagContents and TagsInFiles which makes it very easy for the tag parser to add new (unkown) tag types to the database and to show them in the filter wizard or sub menu 'Browse by tags' without modifying anything except the parser. This also allows to map different tags like 'EXIF DateTimeDigitized', 'EXIF DateTimeOriginal', 'Image DateTime' (IPTC tag) etc. to one tag with an user definable name. MyPicsDB also allows you to delete the tag translation which removes these tags from GUI. E.g. I don't need and therefore don't want to see a camera tag.

List views:
They can be sorted by date but not by date/time! Please change this, too. Some users complain about wrong sort order of their pictures.

Picture orientation:
Robotica already told that saving picture orientation would be nice.

People/person tagging:
There is no standard. But Microsoft introduced the XMP tag MPRegTongueersonDisplayName in Picture Gallery. MyPicsDB supports this tag.
No log no help.
Main page: https://github.com/Xycl
Repository: Xycl Repository Leia
Repository: Xycl Repository Matrix
Reply
#11
(2012-09-26, 17:27)Xycl Wrote: Other than the standard features such all the filtering options, the MyPicsDB addon has a very nice filter wizard that works kind of like XBMC's SmartPlaylists.

I also really like the idea of GeoTagging features with Google Maps connection to show the location, as the new camera I just ordered got GPS tagging so that should give photo viewing an additional dimension!

Note that MyPicsDB not only supports EXIF and IPTC tags but also Adobe XMP metadata tags for pictures.

(2012-09-26, 17:27)Xycl Wrote: Picture orientation: Robotica already told that saving picture orientation would be nice.

Montellese has done a great job with advanced library filtering, I'll see how much of his work I can integrate. Upgrading libexif to the latest version would bring XMP support and tag writing. As for GPS, I need a program that can write tags, preferably lightweight. Any suggestions?

Basically, MyPicsDB is laying the groundwork for this library and the source code is a really great resource. I plan to blatantly rip off as many features as I can Wink
(2012-09-26, 17:27)Xycl Wrote: Database (i summarize)
Don't worry. I think my database abstraction can handle this and more ;-)

(2012-09-26, 17:27)Xycl Wrote: List views
Yes.

(2012-09-26, 17:27)Xycl Wrote: People/person tagging
I've written a pretty big Facebook app. We'll see where this takes us Wink



Cheers,
Garrett

More ideas welcome!
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#12
My 2 cents.

Not really related to library, but I'd like to see some faster options for Slideshow interval. http://forum.xbmc.org/showthread.php?tid...=slideshow

Also, some old closed tickets:
http://trac.xbmc.org/ticket/5875
http://trac.xbmc.org/ticket/8979
Reply
#13
(2012-09-26, 19:56)garbear Wrote: As for GPS, I need a program that can write tags, preferably lightweight. Any suggestions?
For Windows: GeoSetter which uses ExifTool to store the tags.

(2012-09-26, 19:56)garbear Wrote:
(2012-09-26, 17:27)Xycl Wrote: People/person tagging
I've written a pretty big Facebook app. We'll see where this takes us Wink
Okay, but I don't think that Facebook stores the tags in the pictures.
It's like Google Picasa which stores people tags in it's database which makes it unusable as a tagging tool.
No log no help.
Main page: https://github.com/Xycl
Repository: Xycl Repository Leia
Repository: Xycl Repository Matrix
Reply
#14
- GUI problems and inconsistency. Context menu needs some cleanup: This ticket andthis one. Also sorting on date doesn't work. A simple GUI option (besides a general setting on tab"slideshow" also in the context of the slideshow) to control the amount of time each picture shows in a slideshow would be much appreciated. See: http://forum.xbmc.org/showthread.php?tid...pid1138418)

Another one: if scrolling through your photo collection, you cannot see the path, like with video's.
Reply
#15
Well done garbear Smile

regarding the cleanup of context menu entries, I already opened a PR for that. I guess Picture Library won't get into Frodo but maybe my PR Wink

It would also be nice to have (visible) infolabels like title and some kind of plot on photos - this way I finally could transform my BigPictures script to a plugin (Take a look if you don't know what I talk about).

regards,
sphere
My GitHub. My Add-ons:
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Picture Library2
This forum uses Lukasz Tkacz MyBB addons.