Squeezebox Player Music Source
#16
Cool! It would be great!
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#17
Lightbulb 
This is one thing ive really been wanting and really suprised nothing has been done before!

So I thought if I could come up with a easy way to do this I could just hire a programmer, I havn't hired anyone but ive come up with a way it could be easily done... (seems "easy" to me)

1)

Lets say we have our music stored on machine A, this can be the htpc itself, a NAS, another pc, it doesn't matter.

Squeezeserver connects to A for its library. Also XBMC also has access to A, and most people probably have A added into XMBCs music library.

So XBMC and Squeezeserver both use the same source for its library. So same file names, same file directory address etc.

So why not just implement a plugin that makes XBMC look like a fake player (but doesn't actually need to play), this is so we can control XBMC independently.

Lets say squeezeserver sends a song B to the "fake player". All XBMC needs to do is grab the file name / file storage location from the information sent from squeezeserver and then XBMC itself takes over and just get the file from its library and plays the song.

Everything is using standard XBMC features, the music is playing as if you have manually selected it from the libary. All thats happening is your using squeezeserver as an advanced remote almost.

You can send normal commands such as play and pause etc and XBMC receives this command and just executes it.

This seamlessly integrates everything. Without having to activate a squeezebox plugin or having music playing though the background of XBMC etc.


...So the reason I say its "easy" to do is because no steaming protocols and things need to be dealt with, no codecs or anything like that.
Reply
#18
Thanks for your reply!
And sorry that I don't have much time to write a proper answer.

The main drawback of your approach is the lack of integration in the squeezebox environment, e.g. there's no synchronisation with other squeezeboxes possible.
Or did I miss something?
Reply
#19
Hey IssacBinary,

Thanks for the suggestion, but I'm not sure that it would work, basically because of the way squeezecentre or the controllers instruct players to work.

The player has no idea of where the file is; instead it is just handed a stream by squeezecentre saying, here play this. In order to get things working a you suggest I think that we'd need to change the way squeezecentre serves up its music, or at least bypass it so that XBMC is fetching the music.

You'd also loose out on things like sync'd playback as Powderking says (though the software player tend to be a bit dicey with synch'ing anyway).

Personally, I think implementing a libProto would be faster as it is more in tune with what squeezecentre is expecting.

But that's my two cents,
Just wish I could put all my other projects to bed so that I had some time to look at this, have SB's in the playroom and kitchen but still a fiddle to link up my XBMC box in the living room :-) Hopefully tail end of March. Powderking, you seem closer to starting than me, you doing this for a Uni dissertation?

~Dan
Please ignore the specs in my sig, just noticed how out of date they are :oo:

XBMC 10.5 r31718 (Compiled) + Transparency! 3.06, Ubuntu Minimal Server 9.11 Karmic (2.6.31-22-generic)

Asus AT3N7A-I ION Motherboard, Intel Atom 330, 4GB (2x2GB) Corsair TwinX XMS2 DDR2 PC2-6400 (800), GeForce 8300 mGPU (Built-in), 320 GB Fujitsu MHZ2320BH Notebook 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Reply
#20
The other thing you miss out on using this approach would be the streaming content that LMS (aka SqueezeCenter) offers (radio stations, pandora, etc..)
Reply
#21
Ah yes the playback of other things such as pandora etc I did not think about. But really the main thing is playing the music (to me anyway)

As far as the synced playback goes. Im not sure exactly how the whole system technically works but I was thinking along the lines of....

It plays a file so it sends the request and XBMC plays it, squeeze pauses, XBMC sees the request and pauses. It might not be synced to the second but it will be doing what the other players do?

Well I know the players have the Artists info, Track info etc, (could that be enough) but I dont know if they can see the location of the file as well. Maybe its just a simple plugin for the squeezebox server, to send out file location as well Wink

Im just trying to think out the box to help simplify this whole squeezebox enigma and do it using native XBMC functions (like without having to load a special plugin each time etc)
Reply
#22
Keeping players synced is a really nice feature I think.
But the main point of Squeezeboxes are to have your music centralized at one point from where it's server to everywhere you want to listen. The music in XBMC can be accessed via LAN. So the question is only which protocol you use.
My intention is to exchange the way how XBMC reads the flac, ogg, mp3 or whatever file with the squeezebox protocol.

This means XBMC gets e.g. the list of artists in the music collection, genres, songs and the streamed audio from logitech media server. Playlists can be created from XBMC and are stored on the server where lms is installed. Now all squeezboxes can access the same playlists.

This makes the setup of XBMC very easy: Install the squeezebox addon and magically XBMC's music database is already populated. You don't have to mount any samba, nfs or whatever shares. Smile


MrBasset Wrote:...
Powderking, you seem closer to starting than me, you doing this for a Uni dissertation

Quite. I'm planning on starting this as a semester project hopefully this month.
I have a bit of an idea but the huge XBMC code still scares me...
Reply
#23
Powderking Wrote:Quite. I'm planning on starting this as a semester project hopefully this month.
I have a bit of an idea but the huge XBMC code still scares me...

Quote:This makes the setup of XBMC very easy: Install the squeezebox addon and magically XBMC's music database is already populated. You don't have to mount any samba, nfs or whatever shares.

Why couldn't you just make it where:
- You open the add-on, the screen changes to a custom layout of your creation.
- The addon registers itself to LMS as being a squeezebox device that is now online.
- You select your music to be played.
- The plugin passes the audio to XBMC's audio player to be output to speakers.

Most XBMC skins now allow you to add favorites to your home menu.... so you could just hide the 'Music' menu and add 'Squeezebox'. This would be very similar to how the 'MythBox' plugin functions. If you did not want to do the first option (create a layout), you could just use XBMC's... the same way some of the other add-on's such as freecable and mlbmc do.

This should prevent you from needing to really get deep into the code of XBMC.

Maybe I am misunderstanding you, but your quote " Install the squeezebox addon and magically XBMC's music database is already populated" confuses/scares me a touch. If you are looking to go the route of:
- Install add-on
- Enter existing menu option
- look at all your squeezebox files, as now it is communicating using squeezebox's protocol

I think the devs would have an issue with the way that add-on would work, as it sounds as if you are changing a core functionality once the add-on is installed. This could lead to unexpected results, especially with other add-ons.
Reply
#24
sdsnyr94 Wrote:Why couldn't you just make it where:
- You open the add-on, the screen changes to a custom layout of your creation.
- The addon registers itself to LMS as being a squeezebox device that is now online.
- You select your music to be played.
- The plugin passes the audio to XBMC's audio player to be output to speakers.

Most XBMC skins now allow you to add favorites to your home menu.... so you could just hide the 'Music' menu and add 'Squeezebox'. This would be very similar to how the 'MythBox' plugin functions. If you did not want to do the first option (create a layout), you could just use XBMC's... the same way some of the other add-on's such as freecable and mlbmc do.

This should prevent you from needing to really get deep into the code of XBMC.

That sounds great! I'd be happy if I can realise this solution.
Thanks alot for the suggestion Smile



sdsnyr94 Wrote:Maybe I am misunderstanding you, but your quote " Install the squeezebox addon and magically XBMC's music database is already populated" confuses/scares me a touch. If you are looking to go the route of:
- Install add-on
- Enter existing menu option
- look at all your squeezebox files, as now it is communicating using squeezebox's protocol

I think the devs would have an issue with the way that add-on would work, as it sounds as if you are changing a core functionality once the add-on is installed. This could lead to unexpected results, especially with other add-ons.

This was exactly my intention. :o

Maybe in the distant future xbmc will have a very small core and even the music capability is an addon like in mythfrontend which should give some more possibilities...
The xbmc pvr version work a bit like this don't they?

But I see that it won't be easy to do that now Smile
Reply
#25
Powderking Wrote:That sounds great! I'd be happy if I can realise this solution.
Thanks alot for the suggestion Smile
Happy to help anywhere I can.


Quote:This was exactly my intention. :o

Maybe in the distant future xbmc will have a very small core and even the music capability is an addon like in mythfrontend which should give some more possibilities...
The xbmc pvr version work a bit like this don't they?

But I see that it won't be easy to do that now Smile

Do you have a Mythtv setup? If so, have you tried the mythbox add-on? It may give you an idea for a possible layout, if you want to go that route.
Reply
#26
Powderking Wrote:Maybe in the distant future xbmc will have a very small core and even the music capability is an addon like in mythfrontend which should give some more possibilities...
The xbmc pvr version work a bit like this don't they?

But I see that it won't be easy to do that now Smile

I think you'll find that that distant future is nearer than you think. The DEVs are in the process of moving functionality out of the core, for example the PVR add-on for Myth is looking to remove the LibMyth (or what ever the library is called, the name escapes me right now), and replace it with an add-on which uses myth's XML api.

Also the Binary Add-on functionality that is used for the CEC integration gives XBMC the ability to deliver this functionality outside of the core. I suspect that you'd get a lot more support from the DEVs if you look to deliver something like this. You would still get the seamless integration you are looking for, but a key advantage is that you wouldn't be tied into a release of XBMC to do it, not would you need the blessing and approval of the XBMC DEVs to include your code. Additionally you also wouldn't need to familiarise yourself with the guys of XBMC in quite the same way, but instead you'd need to code to the music player APIs much like the ICE streaming plug-ins do.

Still though just me two cents, but I do think that you are heading in the wrong direction if you want to try and add compatibility to the core code.

~Dan
Please ignore the specs in my sig, just noticed how out of date they are :oo:

XBMC 10.5 r31718 (Compiled) + Transparency! 3.06, Ubuntu Minimal Server 9.11 Karmic (2.6.31-22-generic)

Asus AT3N7A-I ION Motherboard, Intel Atom 330, 4GB (2x2GB) Corsair TwinX XMS2 DDR2 PC2-6400 (800), GeForce 8300 mGPU (Built-in), 320 GB Fujitsu MHZ2320BH Notebook 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Reply
#27
Powderking Wrote:Quite. I'm planning on starting this as a semester project hopefully this month.

Oh, reason I asked this is for you to check out the IP policy for your Uni to make sure it is compatible with XBMC's GPL license. Reason I say is that my final project at Uni was for a company that sponsored my last year. They had to pay my university for the IP rights as the standard policy was that the university owns IP rights on anything the students produce. If your Uni does something similar they might get a little upset with you if you open source code that they think they own. It might be nothing, back when I went to Uni open source didn't exist so they never had to accommodate that kind of thing, but it's not worth loosing your degree over if they choose to punish you that way.

~Dan
Please ignore the specs in my sig, just noticed how out of date they are :oo:

XBMC 10.5 r31718 (Compiled) + Transparency! 3.06, Ubuntu Minimal Server 9.11 Karmic (2.6.31-22-generic)

Asus AT3N7A-I ION Motherboard, Intel Atom 330, 4GB (2x2GB) Corsair TwinX XMS2 DDR2 PC2-6400 (800), GeForce 8300 mGPU (Built-in), 320 GB Fujitsu MHZ2320BH Notebook 2.5" SATA, LG GGC-H20L Blu-Ray & HD-ROM, PicoPSU 120W Red
Reply
#28
So, to summarise, the basic idea would be:

- Squeezeslave runs on the XBMC machine and is the actual player of the music - it registers with the server etc.
- An XBMC addon use a python to Squeeze CLI (which is a basic telent type thing) to bridge & talk to the server and by extension browse library etc, and indeed control the player.

This means:

Squeezeslave (runs on a large number) of systems handles all the complex stuff like playback and sync with other players etc. This is a large and well supported project, seemingly, and quite established at this point.

XBMC is largely acting as a library browser, controller and visualiser (like iPeng but without the direct playback bit)

...and the XBMC bit becomes a general process of using python to write the command bridge and the XBMC stuff to provide a nice GUI. Once could even start with a very simply text based / folder + thumbnail type thing like a typical plugin (given the basic old style squeezebox navigation is very similar really), before moving to some xbmcgui.fun stuff to make it really pretty..

That sounds do-able and sensible to me - rather than trying to really integrate the XBMC music library or xbmc playback, just leverage the already very nice squeezeslave. etc. - and yeah, a simply skin hack to swap this addon in instead of inbuilt xbmc music...



I think I have enough Python skills to get this going on now...
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
#29
And here's a python library for CLI control...
http://code.google.com/p/pysqueezecenter/
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
#30
sdsnyr94 Wrote:Do you have a Mythtv setup? If so, have you tried the mythbox add-on? It may give you an idea for a possible layout, if you want to go that route.

I switched about half a year ago from mythfrontend to xbmc just because it looks amazing.
I know Mythbox, it's a great addon.
But still I prefer the PVR libcmyth version from tsp42 because it's better integrated into the gui of xbmc.

My point is that I don't want to implement something (like the music ui) which already works great.


MrBasset Wrote:I think you'll find that that distant future is nearer than you think. The DEVs are in the process of moving functionality out of the core, for example the PVR add-on for Myth is looking to remove the LibMyth (or what ever the library is called, the name escapes me right now), and replace it with an add-on which uses myth's XML api.

Do you mean this one?
http://forum.xbmc.org/showthread.php?tid=110694

As I now it's the only addon for the pvr version?



MrBasset Wrote:Also the Binary Add-on functionality that is used for the CEC integration gives XBMC the ability to deliver this functionality outside of the core. I suspect that you'd get a lot more support from the DEVs if you look to deliver something like this. You would still get the seamless integration you are looking for, but a key advantage is that you wouldn't be tied into a release of XBMC to do it, not would you need the blessing and approval of the XBMC DEVs to include your code. Additionally you also wouldn't need to familiarise yourself with the guys of XBMC in quite the same way, but instead you'd need to code to the music player APIs much like the ICE streaming plug-ins do.

Still though just me two cents, but I do think that you are heading in the wrong direction if you want to try and add compatibility to the core code.

Thanks this sounds great!
The seamless integration is a thing that I'd really like to have. Maybe I have missed a point with the favorites but I'd prefer to have the main screen to be easier customisable...

In the beginning I thought it's not possible to have the seamless integration without changing something in the core. But it's absolutely great if I can do the same with an addon Smile

What ICE streaming plug-ins do you mean?
I couldn't find it.
But it sounds as a good starting point.


MrBasset Wrote:Oh, reason I asked this is for you to check out the IP policy for your Uni to make sure it is compatible with XBMC's GPL license. Reason I say is that my final project at Uni was for a company that sponsored my last year. They had to pay my university for the IP rights as the standard policy was that the university owns IP rights on anything the students produce. If your Uni does something similar they might get a little upset with you if you open source code that they think they own. It might be nothing, back when I went to Uni open source didn't exist so they never had to accommodate that kind of thing, but it's not worth loosing your degree over if they choose to punish you that way.

Thank you for the info!
There are semester projects for android so this shouldn't be a problem.
But I will ask about that to be sure.



bossanova808:
Isn't xbmc able to play the stream directly from lms?
I wanted to give xbmc the ability to talk directly to lms. Do you think this would be too hard to do?
Maybe I can use some parts of squeezeslave to do the plugin for xbmc.
Reply

Logout Mark Read Team Forum Stats Members Help
Squeezebox Player Music Source0