Kodi Community Forum

Full Version: xbmc minified as a server?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2013-02-06, 05:13)carstenson Wrote: [ -> ]Good stuff. I was able to get xbmc-server compiled just fine after getting the dependencies covered. Howevever, I was suffering from segmentation faults when I tried to use it. I'm sure that I'm not the typical user in this thread.

First the setup:

I was wanting a simple UPnP/DNLA renderer for my Archlinux desktop. I was not needing this to server up a stream to another device, rather to be on the receiving end. I have an Android table running BubbleUPnP (recommended) that can take any server and controlt the output to any receiver (renderer). I have another server that is running minidnla that handles the serving of data. I have a TV, a receiver, the tablet, and (now) a desktop computer that can receive the music/pictures/video from the server.

Now, back to xbmc-server. As I said, it was generating a segfault every time I tried play music to it. The problem was confined to one source file, xbmc/dialogs/GUIDialogCache.cpp b/xbmc/dialogs/GUIDialogCache.cpp. Routines are being called, related to GUI, even though the object was never initialized. I was able to add lines to each subroutine/method to simple exit the routine, if the GUI object was NULL.

Just wanted to help, in case someone else ran into this problem. I have submitted a bug ticket at http://trac.xbmc.org/ticket/14065. It also has the modified source file.

Thanks for everyone's help in this thread. It was very instrumental for me and I just wanted to pay some back.

Bug has been resolved. So 1 step closer to a ultra low resource music receiver. Great work Carstenson!
(2013-02-12, 14:29)Powderking Wrote: [ -> ]Thanks for your explanation!

I have a PXE setup but I'm not happy with XBMC's lack of support for distributed solutions.

So is xbmc server a replacement for mysql database?
Updating the database is also possible via each frontend. That's why I'm a little confised.

I have different users with different databases.
I can't imagine it can sync new content (except the watched flag)?

Your CPU usage seem fine. What processor do you have?
I use an Intel i3 CPU 550.

The point of this is to run on a headless machine so that you don't need to rely on the frontends updating the database. For example, if you wanted to use it with a raspberry pi for your xbmc client, they are very slow when updating the library but work perfectly otherwise. So you connect it to the mysql database running on your NAS that also runs the xmbc server to update the library.
(2013-02-12, 16:18)nickdanger3d Wrote: [ -> ]
(2013-02-12, 14:29)Powderking Wrote: [ -> ]Thanks for your explanation!

I have a PXE setup but I'm not happy with XBMC's lack of support for distributed solutions.

So is xbmc server a replacement for mysql database?
Updating the database is also possible via each frontend. That's why I'm a little confised.

I have different users with different databases.
I can't imagine it can sync new content (except the watched flag)?

Your CPU usage seem fine. What processor do you have?
I use an Intel i3 CPU 550.

The point of this is to run on a headless machine so that you don't need to rely on the frontends updating the database. For example, if you wanted to use it with a raspberry pi for your xbmc client, they are very slow when updating the library but work perfectly otherwise. So you connect it to the mysql database running on your NAS that also runs the xmbc server to update the library.
This.

All my clients are 'passive', in the sense that they do not scrape anything. When something is downloaded, it's added to the database. My clients immediately have access to this data, I don't have to wait for them to do anything.

My CPU is an AMD APU C-60 1.0GHz Dual-Core onboard. I think it's a lot slower than your i3, but is handling everything just fine.
Great! Thanks alot guys!
This sounds absolutely fantastic for me.

I have one HTPC with an SSD and a Shuttle Mini PC also with an SSD. Then I have two diskless PXE booted clients and a RasPi because I was just curious how it's like but I don't use it because of the exact reason nickdanger3d stated.

Apart from that I have a Nexus 7 where XBMC seems to crash during scraping. Maybe this would help too.

Now I also get the point of scraping on the server!


Will your solution also work for more than one user?
Atm I have a separate mysql database per user which is a separate setting in the profiles advancedsettings.xml.
Can I just add all three profiles to the xbmc server and it will update them simultaniously.

Despite this I'd like to keep everything homogenously. So when I add a movie to a collection then I have to remove this entry for each user profile separately.

The reason for the separate databases per user is that I want to have separate watched statuses.
(2013-02-12, 17:59)Powderking Wrote: [ -> ]Despite this I'd like to keep everything homogenously. So when I add a movie to a collection then I have to remove this entry for each user profile separately.

The reason for the separate databases per user is that I want to have separate watched statuses.
You would probably have to run multiple instances, as I think XBMC can only talk to one database at a time. I'm not sure how well multiple instances would work - I guess it's fine as long as you use different ports.
That's a bit sad.

Do you know if the Team has any plans for the (distant) future regarding a centralized solution which supports pxe and multiuser properly?

I already asked here:
http://forum.xbmc.org/showthread.php?tid=155841
But obviously I asked the wrong question...
Centralized database management is hardly implemented (the solution in this thread is not really elegant), and I don't think we'll have to expect much more in the near future. In the distant future, who knows... I for one think that XBMC definitely needs a real server, which I hope to take off this year (after more people start using the lib). When that happens, we'll see how it goes.

Btw, I haven't done a multi-user setup, but I suspect it might be possible by adding the same folder as several sources and then somehow ignore some of the sources on each client. It's not really how it's intended, but it might be workable. You might have to fiddle with playlists.
I'm only a user but I come from MythFrontend. So in my opinion there's not much space for improvements on the GUI side but more under the hood to allow elegant server/client interface and thus multiuser systems.

Sorry I don't get it excatly what you did.
You mean I should e.g. add my movies folder for each user. Like MoviesAlice, MoviesBob, etc. But the database for these sources won't contain the same content like movie collection affiliation? At least not if I change it after initially adding the movie to the database. Usually couchpotato adds them to the folder and xbmc scratches the info before I add them manually to a collection.
The main XBMC database does not handle multiple users elegantly. There's basically 3 choices you have with XBMC (and thus libXBMC)

1. Single user, single database.
2. Multiple profiles, each with their own database.
3. Multiple profiles sharing the same database. The only filtering allowed is from master user to other users by locking a share (which is a hack, as the database doesn't know about it).

For things to work nicely, the server (i.e. libXBMC) would need to support multiple users sharing the same database but with content assigned to the user (along with ratings, playcounts etc.)
Da-anda replied in my other thread that he has plans for server/client architecture.


(2013-02-13, 02:59)jmarshall Wrote: [ -> ]For things to work nicely, the server (i.e. libXBMC) would need to support multiple users sharing the same database but with content assigned to the user (along with ratings, playcounts etc.)

Is it already possible in xbmc to set the rating for a movie? Sorry for the maybe stupid question but I've never heard about that but wished to have this feature for a long time.

When content is assigned to users won't it be necessary to have that content entry duplicated per user? I only some attributes of the content entries will have to be assigned to users?
I am having trouble on keeping xbmc-server up and running.

I want to use this as a centralized library but i also want to browse through the library using the JSON API. The thing is every time i load album images it crashes. This only happens when the album arts are embedded on an mp3 file. If they are direct to a jpg no problem. This does not happen with a normal xbmc installation. With the headless version no matter from the master or the Frodo branch this happens. Can someone help me with this? The backtrace of the segfault is here http://pastebin.com/ShzJqhjP
(2013-02-14, 17:01)reapz Wrote: [ -> ]I am having trouble on keeping xbmc-server up and running.

I want to use this as a centralized library but i also want to browse through the library using the JSON API. The thing is every time i load album images it crashes. This only happens when the album arts are embedded on an mp3 file. If they are direct to a jpg no problem. This does not happen with a normal xbmc installation. With the headless version no matter from the master or the Frodo branch this happens. Can someone help me with this? The backtrace of the segfault is here http://pastebin.com/ShzJqhjP
I'm not really good at analyzing traces, so I can't pinpoint the exact problem for you. However, most problems with crashing probably come from calling some unavailable GUI things. I have the exact same 'problem' (however, I'm not that interested in the webinterface, so I don't care for those crashes). xbmc-server also crashes when you try to play a file from the webinterface (which shouldn't work, of course), I suspect that it needs to 'play' the music file in order to get the artwork from it.
(2013-02-15, 01:35)XBL. Wrote: [ -> ]
(2013-02-14, 17:01)reapz Wrote: [ -> ]I am having trouble on keeping xbmc-server up and running.

I want to use this as a centralized library but i also want to browse through the library using the JSON API. The thing is every time i load album images it crashes. This only happens when the album arts are embedded on an mp3 file. If they are direct to a jpg no problem. This does not happen with a normal xbmc installation. With the headless version no matter from the master or the Frodo branch this happens. Can someone help me with this? The backtrace of the segfault is here http://pastebin.com/ShzJqhjP
I'm not really good at analyzing traces, so I can't pinpoint the exact problem for you. However, most problems with crashing probably come from calling some unavailable GUI things. I have the exact same 'problem' (however, I'm not that interested in the webinterface, so I don't care for those crashes). xbmc-server also crashes when you try to play a file from the webinterface (which shouldn't work, of course), I suspect that it needs to 'play' the music file in order to get the artwork from it.

That is most likely correct. You will want to load gdm, if you don't want to simply report it as a bug. It is really pretty easy to use. When it crashes, gdm will tell you the source file name and line number.
@reapz: Did you try to setup (the settings and stuff) your XBMC headless install via JSON?
@XBL: Maybe you can reconsider posting those bugs.

I think one of both features can be very usefull for this headless setup, to configure the installation. This can bring in a lot of testers and more headless variants, most importantly UPNP.

@Powderking: Nice topic! Now after Frodo release, it looks like things are getting full speed ahead again.
@Robotica: What do you mean by setup via JSON? I don't see any relevant options for configuration through JSON. I am using the mysql library just as Kraven described.