Kodi Community Forum

Full Version: Squeezebox Player Music Source
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi all

I'd like to create a new Music source that acts as a Squeezebox (SB) player. So it would be possible to add a SB source to XBMC that it can be controlled via SB Server, it could be synchronized with other SBs and it would have access to the complete SB database with all the coverart, etc. I know that most of this is already implemented in XBMC but not the synchronisation with SB.
So my goal is to make something like the MythTV source but for music and SB. Unfortunately I have not a very clear idea of how to do that.

I've already started a thread in the "XBMC Feature Suggestions" forum [1]. sdsnyr94 wrote that the new Squeezebox Server (LMS 7.7) has build in UPnP/DLNA support. So I installed it, added an UPnP source and XBMC found it. I was able to browse the library but when I wanted to play a song there were codec problems. (The same happens when I add MythMusic UPnP source.)
sdsnyr94 recommended contacting the dev of Whitebear. He told me that XBMC isn't able to play L16 PCM and that he has written a plugin for XBMC. So I hope to solve the playback problem with his code.

The second task would be the implementation of the Squeezebox Protocol (SlimProto [2]).

I'd absolutely appreciate any tips about how I should start. I've already found the "Development Notes" and "Developing XBMC for Linux" in the wiki with it's help I hopefully can get an overwiev of the existing code.
Any further help and hints would be great!


Thanks in advance Smile


[1] http://forum.xbmc.org/showthread.php?p=931786
[2] http://wiki.slimdevices.com/index.php/Sl...CPProtocol
Hey Powderking,

I've been wanting to integrate squeezebox and XBMC as well, though I was thinking of taking a slightly different tack as I wanted XBMC to show up a player; this is so i can use something like iPeng to drive all my SBRs and sync playback rather than just being able to connect to the squeeze server library which is all I think that PnP would give you.

My plan had been to create two plug-ins. One to provide squeeze server like remote capabilities and the other to act as the player. The player plug-in would either integrates with the c++ Squeezeslave project or replicates much what it does in integrating with squeeze server but using XBMC's integrated player (my preferred option but potentially harder).

As always though RL has intruded and I've just not had the time spare, so this one is on the back burner. The plug-in option might be something you want to look at though as I suspect there might not be a huge deal of interest into bringing the SlimProto into Core.

I'd be interested in this though and whilst I can't offer coding support right now (at least until I clear the back log of jobs the wife has for me) I can offer testing support.

Regards,
~Dan
Hi Dan

Thanks for your suggestions and sorry that it took me so long to reply!

daniel.pool Wrote:I've been wanting to integrate squeezebox and XBMC as well, though I was thinking of taking a slightly different tack as I wanted XBMC to show up a player; this is so i can use something like iPeng to drive all my SBRs and sync playback rather than just being able to connect to the squeeze server library which is all I think that PnP would give you.

Unfortunately I don't know iPeng and don't even have an iPhone. So I try to find a solution where none of that is needed (but still can be used if wanted).
I can connect to the LMS by UPnP/DLNA. But syncing doesn't work as you wrote.


daniel.pool Wrote:My plan had been to create two plug-ins. One to provide squeeze server like remote capabilities and the other to act as the player. The player plug-in would either integrates with the c++ Squeezeslave project or replicates much what it does in integrating with squeeze server but using XBMC's integrated player (my preferred option but potentially harder).

Why do you want to create an addon that acts as another LMS? I see XBMC as a media frontend.
The server tasks should be centralised and XBMC may run on several slim clients.


daniel.pool Wrote:As always though RL has intruded and I've just not had the time spare, so this one is on the back burner. The plug-in option might be something you want to look at though as I suspect there might not be a huge deal of interest into bringing the SlimProto into Core.

Why not?
The MythTV Protocol is in the core too, isn't it?
I think it would just be a great thing for people who already Squeezeboxes when all the Music Players in the house can be controlled the same way (either directly, by the LMS page or somerthing like iPeng). And as well for those who want to synchronise XBMC music.

There's another thread in the feature request section where Robotica wrote that it should be in the core.
http://forum.xbmc.org/showthread.php?tid=113999 (Post #9)
Robotica Wrote:This should be in the core. This way you can select that slim protocol to add as source. An addon isn't a good solution.

So when you choose the SlimProto source you get the same looks as the normal XBMC music player and at the same time XBMC is just another Squeezebox that can be synchronised by LMS or being controlled by any app.


daniel.pool Wrote:I'd be interested in this though and whilst I can't offer coding support right now (at least until I clear the back log of jobs the wife has for me) I can offer testing support.

That would be great! I'll write you a PN if I get so far Wink


Regards
Powderking
Based on the issues that the Dev's had because of the weather API, I think the chances of you getting anything with the SlimProto into the core would be pretty slim. I think that a plugin that would use the XBMC media player would be your best option.

Quote:Why not?
The MythTV Protocol is in the core too, isn't it?

Since XBMC now has the add-on system, I believe the goal is to kick as much as they can out of the "core", and into add-ons.

Here is the reason I like an add-on over core integration:

SlimProto is now owned by Logitech. At any given time, they can "improve" their code, requiring all their players to update their firmware to communicate to LMS correctly and breaking connectivity from XBMC. If SlimProto is in the core, the code would need to be updated and then users would need to either:
A > Switch to a nightly build, which would contain bleeding edge code and could lead to breakage of other features, or
B > Wait weeks/months/a year until the next stable release.

If this is done in an add-on, you just update the code in the add-on. XBMC should prompt the user that there is an update available, or autoupdate, and your done.

This is just my 2 cents... this is/will be your project, so you do it however you see fit. Since I don't know anything as far as coding, the only support I can give you is in testing.

Hopefully, a dev will chime in on this, and let you know the direction they would prefer this to go.
I noticed the problems the wheather API caused. And I absolutely agree about the changes of the protocol and the XBMC updates and that it would be great if just the addon could be updated.
Somehow it should be possible to choose a slimproto music source that accesses the addon?

Anyway it seems that the MythTV / PVR source is an addon too. Maybe I'll find some infos there...

And yes it would be great to hear from a dev that could point me to the desired direction as I don't want to do this for myself only but hopefully for all Squeezebox owners Smile
Quote:Somehow it should be possible to choose a slimproto music source that accesses the addon?

Wouldn't the add-on itself be the music source?
sdsnyr94 Wrote:Wouldn't the add-on itself be the music source?

Hmm, maybe?
I don't know if it's possible to choose an addon as music source.
I just think it's nicer to enter the music section and directly be connected to the LMS (just as if I'd chosen a UPnP source) instead of choosing music > addons > LMS.
Wow, I'd thought that I'd subscribed to this thread, I blink and suddenly there are half a dozen replies.

Anyway ...

Powderking Wrote:Unfortunately I don't know iPeng and don't even have an iPhone. So I try to find a solution where none of that is needed (but still can be used if wanted).

iPeng connects to the LMS as a controller, I'd wanted XBMC to show up as a legitimate player and be able to use iPeng to control it remotely and sync with all my other players. So I think that we are pretty much talking about the same goal here.

Powderking Wrote:Why do you want to create an addon that acts as another LMS? I see XBMC as a media frontend.
The server tasks should be centralised and XBMC may run on several slim clients.

Oops, think we had a bit of a dissconnect; I wasn't looking to replace squeezeserver with XBMC. Squeezeslave is a headless player that connects to the LMS over the SlimProto. I'd wanted to create a plug-in that allows XBMC to use SqueezeSlave (or use the code within SqueezeSlave to bring the same functionality into the plug-in) so that my HTPC/XBMC would be seen as a player by the squeezeserver. If I were using squeezeslave as an external player I'd then be able to pass up things like now playing to XBMC. Or alternatively, I'd just be using the internal XBMC player and exploiting the code of others (with suitable credits due ... I've not taken a proper look at squeezeslave so I don't know if I'd be able to take librarys and then contribute back as of yet).

As I mentioned I'd also been thinking about a second plug-in (or possibly an extension to the first) that then allowed XBMC to act as a controller. This would allow browsing the music sources and invoking the streaming of music to other players (including the SqueezeSlave/XBMC player). Hmm, actually I didn't mention that. I'd started to write it, but not finished ... that's what happens when you write posts on the hoof.


Powderking Wrote:Why not?
The MythTV Protocol is in the core too, isn't it?
As a few others have said, I think the general direction of XBMC is to move this sort of thing out of XBMC and into plug-ins. I can't say that I've fully understood the post but I wonder that looking at the binary add-ons functionality might give you the integration (i.e. as a music source) that you are after. Like I say, haven't done my research, so speculating wildly here.

Powderking Wrote:Hmm, maybe?
I don't know if it's possible to choose an addon as music source.
I just think it's nicer to enter the music section and directly be connected to the LMS (just as if I'd chosen a UPnP source) instead of choosing music > addons > LMS.

Would another option be a favourite or adjusting the skin to present the controller as a direct link from the home page. After all, I imagine if anyone used SqueezeServer for managing their music they would be looking at a complete music library replacement rather than having the two co-exist. Not really sure though, but I don't see much of a use case for having library A from the squeezeserver and library B from the secret music source that only XBMC sees? Or even XBMC scraping your squeezeserver library and copying it into it's own music library.

Thinking about some of the existing plug-ins, didn't the old shoutcast plug-in show up as a music source? I can't quite remember though as it's been a while.

Anyway, a few random thoughts at this point. I'd considered looking at the source for some of the ice (??) plug-ins as I'm guessing that they would have the code available to invoke XBMCs internal player. Dunno, a starter for ten maybe?

~Dan
daniel.pool Wrote:iPeng connects to the LMS as a controller, I'd wanted XBMC to show up as a legitimate player and be able to use iPeng to control it remotely and sync with all my other players. So I think that we are pretty much talking about the same goal here.

totally second you on that , I already run a squeezeslave on my xbmc live machine but it would be so great to have it integrated into xbmc.
coercity Wrote:totally second you on that , I already run a squeezeslave on my xbmc live machine but it would be so great to have it integrated into xbmc.

Slightly off topic : Do you have squeezeslave running all the time? I could not do that without XBMC saying the soundcard was in use. Just curious how you are running it.
sdsnyr94 Wrote:Slightly off topic : Do you have squeezeslave running all the time? I could not do that without XBMC saying the soundcard was in use. Just curious how you are running it.

IIRC you need to configure both XBMC and SqueezeSlave to use a mixer in alsa. XBMC live seems to grab the device exclusively and not install a mixer config. I can't check right now as I'm in the middle of rebuilding my HTPC, but I had to do something like that; which is also one of the reasons I'd want to look at using the SqueezeSlave source as the foundation for a libSlimProto and use the binary addons to bring it into XBMC to use the internal player.

Of course, that depends on being able to easily seperate the SqueezeSlave code and also my understanding of binary plugins.

Dan
daniel.pool Wrote:Oops, think we had a bit of a dissconnect; I wasn't looking to replace squeezeserver with XBMC. Squeezeslave is a headless player that connects to the LMS over the SlimProto. I'd wanted to create a plug-in that allows XBMC to use SqueezeSlave (or use the code within SqueezeSlave to bring the same functionality into the plug-in) so that my HTPC/XBMC would be seen as a player by the squeezeserver. If I were using squeezeslave as an external player I'd then be able to pass up things like now playing to XBMC. Or alternatively, I'd just be using the internal XBMC player and exploiting the code of others (with suitable credits due ... I've not taken a proper look at squeezeslave so I don't know if I'd be able to take librarys and then contribute back as of yet).

As I mentioned I'd also been thinking about a second plug-in (or possibly an extension to the first) that then allowed XBMC to act as a controller. This would allow browsing the music sources and invoking the streaming of music to other players (including the SqueezeSlave/XBMC player). Hmm, actually I didn't mention that. I'd started to write it, but not finished ... that's what happens when you write posts on the hoof.

Oh, it really seems we talk about the same thing. Sorry for the misunderstanding.

For me it's important to use as much from XBMC as possible to get a good integration of the squeezebox player:
There already is an amazing music UI so it would be a shame to not use that Wink


daniel.pool Wrote:After all, I imagine if anyone used SqueezeServer for managing their music they would be looking at a complete music library replacement rather than having the two co-exist. Not really sure though, but I don't see much of a use case for having library A from the squeezeserver and library B from the secret music source that only XBMC sees? Or even XBMC scraping your squeezeserver library and copying it into it's own music library.

I totally agree with you!

You should be able to select only the slimproto music source (no local, samba or whatever).

Probably XBMC wont have it's own database in this case anymore but is able to fully use the LMS database and all the functions a hardware SqueezeBox or the SqueezeSlave player is capable of.
sdsnyr94 Wrote:Slightly off topic : Do you have squeezeslave running all the time? I could not do that without XBMC saying the soundcard was in use. Just curious how you are running it.
here is the solution : http://forum.xbmc.org/showpost.php?p=825708&postcount=7
Powderking - are you still planning to go ahead with your plans? I saw that you had some posts on the squeezebox support forum, but there has been no activity there in a while either, so I am hoping you still have plans on this project.
Yes, I still have plans.
At the moment I'm preparing for exams and in February I'd like to start.
Unfortunately I haven't heard of my Prof so I don't know if the project is accepted.
But I'd like to start in February...
Pages: 1 2 3