Image Overlays & Performance
#1
Rainbow 
Hi guys,

I'm working on my first addon and trying to do a few neat* things, one of which is image manipulation prior to allowing XBMC to display it as an icon/fanart/other. I have everything working as intended by pulling in multiple images from the web, modifying & merging them using PIL and feeding them to XBMC through a local URL. It looks smashing (if I do say so myself), but the performance impact is fairly severe.

I'd love to perform the manipulation as a background task and feed have XBMC pick up the files as and when they become available. Any thoughts on how it might be possible? Any thoughts on design otherwise which might help alleviate my issues? One thing I'd like to stay away from is an external service of any type - I want this all to remain within the addon where possible.

Despite XBMC's cache this isn't really a one-time cost that I can deal with as by the nature of the app, the "channels" being browsed will differ fairly frequently and thus there's plenty of call for the overlaying.

I entirely understand if the responses are along the lines of "that's stupid - don't do it" or such, but better to ask than never know!

Cheers!

* daft
Reply
#2
It depends a lot on the specifics, but you could include an XBMC service to do your fetching and stitching, and output them to a specified directory, then have the main addon grab them and use them. You can include the service addon with the regular addon so for all intents and purposes it's one addon.

The trick is the main addon has to be structured such that it can be called when a new image is ready, even if it's already running. That may cause you to have to refresh the whole addon when changing to a new image
Reply
#3
Hi Bstrdsmkr, thanks for the advice, I'll look into it. Refreshing the whole addon won't really work for me, but if there's a way I can update an individual list item that would work perfectly.
Reply
#4
This is mostly an FYI but my clean scraping API GSoC will probably allow for this if I understand what you try to achieve?

My project will mostly be in regards to items which to extract information to the library but addons etc could probably use the same engine. Did you intend to alter the fanart for library items or addons?
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#5
(2012-07-26, 14:52)topfs2 Wrote: This is mostly an FYI but my clean scraping API GSoC will probably allow for this if I understand what you try to achieve?

My project will mostly be in regards to items which to extract information to the library but addons etc could probably use the same engine. Did you intend to alter the fanart for library items or addons?

I already have something lined up that will allow you to change fanart through JSON-RPC
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
(2012-07-26, 15:03)Martijn Wrote:
(2012-07-26, 14:52)topfs2 Wrote: This is mostly an FYI but my clean scraping API GSoC will probably allow for this if I understand what you try to achieve?

My project will mostly be in regards to items which to extract information to the library but addons etc could probably use the same engine. Did you intend to alter the fanart for library items or addons?

I already have something lined up that will allow you to change fanart through JSON-RPC

Ah true that could also be used, listen to library additions and alter fanart when PIL part is done
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
My current intentions are entirely addon-based - there are a couple of sites which provide multiple images per stream and you really need to see all of them at-a-glance to make an informed decision on what to watch without getting frustrated with the UI.

It looks like (although I'd be happy to be convinced otherwise Smile) the JSON-RPC approach may the path of least resistance. Will you be publishing your changes in the main JSON-RPC thread or elsewhere, Martijn?

I'll be keeping an keen eye on how you're getting on with your GSoC project too, topfs.

Thanks guys; appreciate the assistance.
Reply
#8
My script will be Frodo only since the changes to JSON-RPC only went in recently
It was meant to update the movie data like votes/ratings and also to fix the broken image urls since the TMDB changed their servers.
You can set the poster/fanart url/location directly into the database. So 3rd party apps can quite easy change them.

So maybe your intention are somewhat different Smile
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#9
I wonder what would happen if listitem.thumb could support 3 images and rotate between them?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
Can't help but think Cragz is working on porn =P

@jmarshall what about .gifs?
Reply
#11
(2012-07-27, 03:55)jmarshall Wrote: I wonder what would happen if listitem.thumb could support 3 images and rotate between them?


Could also use such a thing for extrafanart Wink
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#12
(2012-07-27, 03:55)jmarshall Wrote: I wonder what would happen if listitem.thumb could support 3 images and rotate between them?

I like it!

(2012-07-27, 22:04)Bstrdsmkr Wrote: Can't help but think Cragz is working on porn =P

Haha, nothing quite as exotic (although maybe the thread rating would get better Wink). I'll pull together some screenshots of the current proof of concept over the weekend to see if that helps explain it better.
Reply

Logout Mark Read Team Forum Stats Members Help
Image Overlays & Performance1