Archive > Xine Plugin

How is xine used in Pluto ?

(1/3) > >>

archived:
Hi,

I'm currently looking for solution for my audio home system.

I'd like to have multichannel alsa cards on pluto core, each output is separate stereo channel - used similarly as media player.

I've seen that xine is used for such purposes under Pluto. I have few questions:
- can xine be run in multiple instances each outputting to its own alsa stereo device ?  How hard would it be to do this under Pluto - so each xine instance is separate media player ?

- I've seen that there is slim server plugin for xin in Pluto sources. Can Xine listen to slim stream ? How are audio playing features organized in Pluto ?

- if not with Xine, I'm thinking to implement media player with alsaplayer. Any thoughts how to start properly ? Any other ideas ?

I have small house and much greater number of speakers than media directors, that's why I'm thinking in this way ...

Thanks in advance,

regards,

Rob.

archived:
It's probably possible to do this with Xine.  What could be done is adding a device data (data parm) to the xine player with the audio/video output to use.  You can add as many xine players to a computer as you want, and they will all get spawned.  The only problem is that at the moment they will all try to grab the same audio/video devices and conflict.  But in our Xine_Player.cpp file, which is our wrapper for Xine, something could be added to the constructor that gets the audio/video device from teh data parmaeter, and spawns xine appropriately.

Yes, we are using xine as the player for the Slim Server.  The device "Media Plugin", which is a plug-in for the DCERouter, coordinates all the media--regardless of device.  There are then separate plugins for each type of media player--MythTV Plugin, Xine Plugin, etc., which in turn register with the media plugin.  the media plugin passes off the actual "Start", "Stop", etc., to those plugins.

this part should work.  It works in our test environment.  You only need to setup Pluto, then plug in your squeeze boxes.  Our plug-and-play drivers will detect that it's a squeeze box, configure it, add the slim server back-end and any other packages, and then you can play any media.  We have this working in our office test system.

archived:
Hi,

thanks for answers. My comments below....


--- Quote from: "aaron.b" ---It's probably possible to do this with Xine.  What could be done is adding a device data (data parm) to the xine player with the audio/video output to use.  You can add as many xine players to a computer as you want, and they will all get spawned.  The only problem is that at the moment they will all try to grab the same audio/video devices and conflict.  But in our Xine_Player.cpp file, which is our wrapper for Xine, something could be added to the constructor that gets the audio/video device from teh data parmaeter, and spawns xine appropriately.

--- End quote ---


Ok, I guess this would be easiest solution. I'm just thinking of possible drawbacks of using xine as audio player... I have following in mind:
- how many cpu resources does xine take? For multichanel we would need several xines on single machine.
- could we stripp down xine to not use X any unneeded resources (like X, ...) ?
- how do you estimeate what would happen if we run 5 xine instances on single computer ? I guess we would have to deal also with priorities ?

I guess you have more experience with it, so am looking forward to some discussion. For a start, we could make a test and add xine's output device to parameter. Is there anything else that we should add as parameter for more instances (like tcp ports for remote control...) ?




--- Quote from: "aaron.b" ---
Yes, we are using xine as the player for the Slim Server.  The device "Media Plugin", which is a plug-in for the DCERouter, coordinates all the media--regardless of device.  There are then separate plugins for each type of media player--MythTV Plugin, Xine Plugin, etc., which in turn register with the media plugin.  the media plugin passes off the actual "Start", "Stop", etc., to those plugins.

--- End quote ---

Why is xine Slim Server player? Does this mean that you always go to xine via slimserver or is there any other purpose of slim plugin for xine ?


--- Quote from: "aaron.b" ---this part should work.  It works in our test environment.  You only need to setup Pluto, then plug in your squeeze boxes.  Our plug-and-play drivers will detect that it's a squeeze box, configure it, add the slim server back-end and any other packages, and then you can play any media.  We have this working in our office test system.

--- End quote ---

Is slim server used only for squeeze boxes or for xine in media directors too ?

I'm also considering for this task libalsaplayer library ( newbielink:http://www.alsaplayer.org [nonactive]) that would be really thin implementation without any bells and whistles. We use it for Misterhouse whole house audio/speech system and it works quite good...

I'm willing to contribute if we decide to try both variants and decide for the best. Anyway would need some help as pluto newbie to carry this out...


Thanks in advance,

regards,

Rob.

archived:
the /home directory, where all the media is stored, is mounted on all the media directors.  Normally, when you go to play music on a media director, slim server isn't used.  Xine just gets a 'play' command, and plays the file off the local mount.

However, if the destination is multiple xine's, then it's not advisable to have both of them play the files individually -- they will be out of sync.  So, media plugin has the logic that says: if the destination is a single xine, send that xine a play.  if the destination is a single network audio player (like the squeeze box which can't 'play' media that's not streamed), or if the destination is multiple xines, or a combination of a xine and a squeeze box, then rather than xine the play, it starts the slim server streaming the audio.

Then it sends all the target devices (xine, and squeezebox) a command to play what is being broadcast over a given port.

What I'm not totally understanding is the desire to run multiple xine's.  We never tried running more than 1.  If you want 10 zones of audio in your house, and have 2 media directors, than those 2 m/d's can be 2 of your zones, and you can add 8 network audio players, like the squeeze boxes, which cost around $150 for the other zones.

You mention running 5 xine instances on a single computer.  Is the intention that you will put 5 sound cards in the computer, and have each xine running to a sound card, and the goal is to have 5 'zones' of audio?

You mention 'multichannel', and I'm not sure if we're talking the same thing or not...  When I think of multi-channel, I think of multiple audio channels within a given stream.  Like dolby digital 5.1.  That doesn't require multiple xines, or multiple sound cards.  The single xine player gets the single audio/video stream which contains 5+1 channels of audio and plays it.

When I think of multiple xine's, I'm assuming you're referring to, what we call multi-zone, rather than multi-channel.  Multii-zone meaning I want to be playing Metallica in Zone 1, Mozart in Zone 2, and iRobot in Zone 3.  The channels are not important--Zone 1 may be stereo, Zone 2 may be 4 channel audio from an SACD, and Zone 3 may be 6+1 channel.

But when you talk about running 5 xine's, which I assume means 5 different zones, the only way that would make sense to me is if you have 5 separate sound cards.  If there's only 1 sound card, what would the 5 different xine's render their audio to?

So, assuming you mean 5 xine's and 5 sound card's, so that you can 5 zones of music with 1 pc, it should be possible, theoretically, although we haven't tried it.  Since the squeeze boxes are fairly cheap, we figured that rather than buying 5 sound cards, it would be easier to buy 5 squeeze boxes.

Let me know the intended purpose, so I can be sure we're talking the same thing.  :)

Thanks.

archived:

--- Quote from: "aaron.b" ---
the /home directory, where all the media is stored, is mounted on all the media directors.  Normally, when you go to play music on a media director, slim server isn't used.  Xine just gets a 'play' command, and plays the file off the local mount.

However, if the destination is multiple xine's, then it's not advisable to have both of them play the files individually -- they will be out of sync.  So, media plugin has the logic that says: if the destination is a single xine, send that xine a play.  if the destination is a single network audio player (like the squeeze box which can't 'play' media that's not streamed), or if the destination is multiple xines, or a combination of a xine and a squeeze box, then rather than xine the play, it starts the slim server streaming the audio.

Then it sends all the target devices (xine, and squeezebox) a command to play what is being broadcast over a given port.

--- End quote ---


Thanks for info - now I have much better picture. It's sync feature that demands slim plugin for xine.


--- Quote from: "aaron.b" ---
What I'm not totally understanding is the desire to run multiple xine's.  We never tried running more than 1.  If you want 10 zones of audio in your house, and have 2 media directors, than those 2 m/d's can be 2 of your zones, and you can add 8 network audio players, like the squeeze boxes, which cost around $150 for the other zones.

You mention running 5 xine instances on a single computer.  Is the intention that you will put 5 sound cards in the computer, and have each xine running to a sound card, and the goal is to have 5 'zones' of audio?

You mention 'multichannel', and I'm not sure if we're talking the same thing or not...  When I think of multi-channel, I think of multiple audio channels within a given stream.  Like dolby digital 5.1.  That doesn't require multiple xines, or multiple sound cards.  The single xine player gets the single audio/video stream which contains 5+1 channels of audio and plays it.

When I think of multiple xine's, I'm assuming you're referring to, what we call multi-zone, rather than multi-channel.  Multii-zone meaning I want to be playing Metallica in Zone 1, Mozart in Zone 2, and iRobot in Zone 3.  The channels are not important--Zone 1 may be stereo, Zone 2 may be 4 channel audio from an SACD, and Zone 3 may be 6+1 channel.

But when you talk about running 5 xine's, which I assume means 5 different zones, the only way that would make sense to me is if you have 5 separate sound cards.  If there's only 1 sound card, what would the 5 different xine's render their audio to?

So, assuming you mean 5 xine's and 5 sound card's, so that you can 5 zones of music with 1 pc, it should be possible, theoretically, although we haven't tried it.  Since the squeeze boxes are fairly cheap, we figured that rather than buying 5 sound cards, it would be easier to buy 5 squeeze boxes.

Let me know the intended purpose, so I can be sure we're talking the same thing.  :)

Thanks.

--- End quote ---


sorry for being unclear. Yer you're right I'm talking about multiple zones. There exists middle solution to this one. If I take cs46xx based card (like Hercules Difigire 7+1) I get 4 independent devices under alsa (it looks like 4 cards - 3 stereo devices and one SPDIF out device) - they are numbered like hw:1,1 hw:1,2 hw:1,3 hw:1,4 if card number is 1. And if you play to alsa device hw:1,3 you get output on subdevice 3.

cs46xx based cards and few others have HW based mixer, so you can send more streams to same device. But in majority of cases on other sound cards (mostly i810) you don't have HW mixers, but can configure them for SW mixing in alsa configuration file. So for instance you can configure cards as 1x6 channels, or for instance 3x2 channel and use each of them independently. But there is major drawback - you can't control HW volume on each of them, cause there is only one volume device. But if you have software volume on media player (alsaplayer has it, don't know about xine), then you can control volume of each channel separately.

So I've bought digifire and I'm using it for 3 stereo outputs and that's much cheaper than having 3 squezeboxes !? . I also have relaxation feature that spawns two players for each channel - one plays relaxation music, on the other one I play short wave files with speech announcements or any other prerecorded positive thoughts. During announcement, volume of other channel goes lower and higher after that....

My kids won't go to bed anymore without "relaxation programme".

I'm finishing construction of new house right now, and I have small distances to speakers - with everything wired invisibly, so will have players located on core. If you think of new house, that's for my taste slightly better solution.

If we do this, then each media director could feed out more stereo channels instead of one (maybe outside speakers, hall speakers, etc...). We just have to pick right card and you can get 2-4 decent stereo channels out of 1 cheaper sound card ....

What are your opinions ?

Regards,

Rob.

Navigation

[0] Message Index

[#] Next page

Sitemap 
Go to full version