LinuxMCE Forums

General => Developers => Topic started by: Purplexus on April 22, 2009, 05:59:08 am

Title: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 22, 2009, 05:59:08 am
Initially this topic was posted on the users forum pages and I am making the move to move it to here.

First off the question was asked if we could use 8 media directors to play just audio and output the audio line out into 8 high output 2 channel amplifiers.

The way this would work in detail :

- All audio stored on the core as normal:
- Use barebones cheap CPU's because you only need audio playback.
- Use good -> great quality speakers 2 from each amplifier
- use the line out on the cpu and Y split from a 3/8 mini stereo (2 black lines on the connector) headphone jack to a left/right stereo RCA plug
- Use an orbiter, a MD with a gui interface on the TV etc. to control the AUDIO MD's

Should work right?

YES and it does.

BIG HICCUP....
 in that the system does not sync audio playback when using more then one MD to play the same song.
the only time this actually becomes an issue is when you are able to hear more then 1 zone of audio at a time.

I work for a high end home automation where our clients are not going to put up with this at all.

We very often install 12 or more zones of audio in a home in order to create sound ambience.  Very often these zones are capable of being heard in transition zones.  (The hallway between Zone 1, Zone 2, Zone 3 and Zone 4)

Some ideas I have thought of that might be possibilities.  Please give me your ideas on wether or not these might be possible.
Please keep in mind I have been researching this as best as I could in order to figure this out and that I am not normally a linux programmer.

first Thought....  If I incorporate a flash memory cards into my Media director can we buffer the audio file on each media director and then give them a simultaneous play command when selecting them all to play a particular playlist?   This should ensure synced playback if this is at all possible.

Second possible solution....  If I hook up 4 computers into a 4 source in and 4 source out Multi-room amp could I write a script that would check to see if more than one zone is playing the same file.  Then if there is could I then send a RS-232 command for both of those particular zones to play the selected file from only one MD.  (pretty sure this could be done and fairly easily but this is a more expensive solution)

I don't understand linux MCE code at all as I have never even seen it.  But in order to give back I could do the leg work on this project if someone is interested in taking this on and give me direction.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: colinjones on April 22, 2009, 07:47:14 am
Several points....

First and most importantly... you mention that your "clients" won't put up with the sync issues. This seems to imply that you want to use LMCE as a commercial offering. You need to be aware that you cannot do that without a licence for each device from Pluto. The majority of the code is released by Pluto under a GPL/LGPL however some of the critical core components are released under PPL (Pluto Public License), which for all intents and purposes is the same as GPL for amateur users, but definitely not for professional providers.... then you need a licence, otherwise you could be competing directly with Pluto with their own product!

Currently, the simplest solution to sync audio is that detailed by Andrew, using matrix switches, etc, and controlling these from LMCE. That way you are guaranteed.

You will also notice (by doing some searching here) that this has been discussed several times, including recently by me. It is not an easy nut to crack, particularly with variable rate digital media. There are possibilities that we could use some existing options within Xine, or even codec'ing the digital stream back to fixed bit rate, raw (uncompressed) format at the source, and using realtime streaming over the network to the destinations (given the client/server architecture changes I have discussed elsewhere), or even using SqueezeBoxes, as apparently they sync very well from their central server software module which can plug directly into a LMCE core.

Finally, I suggest that unless you are ready to talk specific technicalities of LMCE development that this thread may need to move back to Users. This board is reserved specifically for talking about actual development. You need to get a handle on what you are actually dealing with in LMCE both in terms of the codebase, but even more so in terms of its basic DCE device/router messaging architecture. This will shape fundamentally how you may or may not be able to approach contributing. Warning, under the hood this is a massive system, and highly complex, it bears no resemblance whatsoever to media centres like Windows, which just runs separate executables on top of the kernel/OS. LMCE is abstracted above the kernel entirely with these "virtual" devices called DCE devices each of which is responsible for controlling media playback, HA, telephony, various core services, and all communicate through a messaging bus using a specific protocol... its very distributed.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 22, 2009, 07:56:19 am
Just forget it. As I mentioned in a different thread: We talked on LinuxTag 2008 with a project that tried to accomplish synchronized playback of audio using multiple computers. They did not succeed.

The *only* option at the moment is they it had always been done, long wires, and a single source.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on April 22, 2009, 03:07:26 pm
and squeezeboxes.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 22, 2009, 06:09:53 pm
squeezeboxes.

Did you ever try to use multiple Squeezeboxes?
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on April 22, 2009, 06:56:27 pm
yes. My two boxes run _in perfect sync_ (yes, i have an "overlapping" area). If you look at their bugfixes, there were quite some improvements in latest firmwares (a few months ago). I've not tested it for days, but i had it running for some hours without getting out of sync.

br, Hari
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 22, 2009, 07:07:49 pm
My two boxes run _in perfect sync_

good to know. Thanks.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on April 22, 2009, 07:31:50 pm
yes. My two boxes run _in perfect sync_ (yes, i have an "overlapping" area). If you look at their bugfixes, there were quite some improvements in latest firmwares (a few months ago). I've not tested it for days, but i had it running for some hours without getting out of sync.

br, Hari


Hmmm...are you sure about that? I was chatting just a few weeks ago with some Logitech support guys and they said that even with their 'heart beat' feature perfect sync was still not possible. I'd love you to be right about that though :-)

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on April 22, 2009, 10:27:06 pm
define perfect sync. It may not be _perfect_ but if the delay is not noticeable.. and trust me, i went back and forth between the rooms many times over some hours. I'll verify my experience this weekend.

br, hari
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 22, 2009, 10:31:22 pm
I will admit right away this is way over my head as for coding and I did do countless nights of research on this but never did find anything on multi-room within these forums or in the wiki.

But I still am able to create ideas and hopefully help get this on track.

Does anyone think the flash memory cards idea will work?
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 22, 2009, 10:55:39 pm
Several points....

First and most importantly... you mention that your "clients" won't put up with the sync issues. This seems to imply that you want to use LinuxMCE as a commercial offering. You need to be aware that you cannot do that without a licence for each device from Pluto. The majority of the code is released by Pluto under a GPL/LGPL however some of the critical core components are released under PPL (Pluto Public License), which for all intents and purposes is the same as GPL for amateur users, but definitely not for professional providers.... then you need a licence, otherwise you could be competing directly with Pluto with their own product!

I do know of the licensing and will definately support the product if it is able to do what we need it to do.  I think that this is one of the coolest systems I have seen to date.  Although I am able to replicate all of the functions within this system it costs much less then say a Kaleidoscape/ Crestron / IP PBX / Control 4 / ETC. would cost in order to replicate all of LinuxMCE's Functions.

I would place an order of 100 lincenses immediately if it is bug free.  (we have 6 houses about to go into design phase in the next 2 months and I am sure more to go soon after that)  All of these homes are large homes looking for Complete automation.  Which I think LinuxMCE is capable of doing almost completely on it's own.

So for now allow me to lend any hands I can in order to get this system up and going along with you and the community.  (do you guys need RS-232 hexstring info for any of the following devices?)

Russound
Lutron Radio RA

Hope I can help
Trevor
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 22, 2009, 11:27:14 pm
I will admit right away this is way over my head as for coding and I did do countless nights of research on this but never did find anything on multi-room within these forums or in the wiki.

But I still am able to create ideas and hopefully help get this on track.

Does anyone think the flash memory cards idea will work?

no
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on April 22, 2009, 11:37:27 pm
define perfect sync. It may not be _perfect_ but if the delay is not noticeable.. and trust me, i went back and forth between the rooms many times over some hours. I'll verify my experience this weekend.

br, hari

As good as a single digital source switched/routed through a multi-zone amplifier like the Denon POA-3012CI. That's the measure of acceptability...if we can match that with Squeezebox's then we have a great, and equal, solution.

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: colinjones on April 22, 2009, 11:49:22 pm
I will admit right away this is way over my head as for coding and I did do countless nights of research on this but never did find anything on multi-room within these forums or in the wiki.

But I still am able to create ideas and hopefully help get this on track.

Does anyone think the flash memory cards idea will work?

No, definitely not, that would make it more difficult, not less. Buffers are part of what introduces the problem in the first place .. please read my other thread on this subject. You would have to introduce some kind of distributed millisecond level sync system... simply not practical. The only way syncd play is ever going to work is by using a genuine realtime stream (ie analoguous to fixed wires/single source) to all locations simultaneously, preferably using multicase, but broadcast would work just as well. And no buffers at all. Even then, the variable bit rate nature of most compressed audio streams is likely to cause problems. After reviewing the "broadcast" option of Xine, it seems that it isn't a genuine broadcast at all, it is just multiple unicasts which won't work.

I know possy doesn't like this idea, but.... fundamentally, and I'm talking about technical hypotheticals, it is perfectly possible to get a sub-millisecond sync IF, the broadcasting element uses a single broadcast or multicast UDP stream over only the Internal network, AND that stream is transmitted raw, constant-bit-rate, uncompressed, AND the playback element uses realtime/just-in-time, unbuffered playback. I just don't know of any tool/library that allows that and all the other stuff we need (and already get using xinelib). This would work for video as well, but transmitting video uncompressed is rapidly going to present bandwidth issues... if done compressed (and thus variable bit rate) then it would still work, but the sync is likely to be less good ... but still dramatically better than we have already.

If anybody knows anyone in the Xine project and can twist arms.... :)
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on April 22, 2009, 11:50:33 pm
Several points....

First and most importantly... you mention that your "clients" won't put up with the sync issues. This seems to imply that you want to use LinuxMCE as a commercial offering. You need to be aware that you cannot do that without a licence for each device from Pluto. The majority of the code is released by Pluto under a GPL/LGPL however some of the critical core components are released under PPL (Pluto Public License), which for all intents and purposes is the same as GPL for amateur users, but definitely not for professional providers.... then you need a licence, otherwise you could be competing directly with Pluto with their own product!

I do know of the licensing and will definately support the product if it is able to do what we need it to do.  I think that this is one of the coolest systems I have seen to date.  Although I am able to replicate all of the functions within this system it costs much less then say a Kaleidoscape/ Crestron / IP PBX / Control 4 / ETC. would cost in order to replicate all of LinuxMCE's Functions.

I would place an order of 100 lincenses immediately if it is bug free.  (we have 6 houses about to go into design phase in the next 2 months and I am sure more to go soon after that)  All of these homes are large homes looking for Complete automation.  Which I think LinuxMCE is capable of doing almost completely on it's own.

So for now allow me to lend any hands I can in order to get this system up and going along with you and the community.  (do you guys need RS-232 hexstring info for any of the following devices?)

Russound
Lutron Radio RA

Hope I can help
Trevor

First off dont take my next statement as me attempting to dissuade you from building a business around, or extending your existing business to encompass, LinuxMCE. I have said many times here that we need more commercial and more non commercial participation here in this Forum and we need to grow this community as broadly and quickly as we can... but having said that you should heed Colin's comments earlier in this thread, and read the numerous other threads here on becoming proficient at understanding LinuxMCE.

Installing LinuxMCE on a commercial basis with just a few months exposure to it is a recipe for disaster to be frank and I would strongly suggest that you take the time to learn about this system before you approach any kind of commercial installations.

All the best

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on April 23, 2009, 12:51:20 am
Buffers are part of what introduces the problem in the first place .. please read my other thread on this subject. You would have to introduce some kind of distributed millisecond level sync system... simply not practical. The only way syncd play is ever going to work is by using a genuine realtime stream (ie analoguous to fixed wires/single source) to all locations simultaneously, preferably using multicase, but broadcast would work just as well. And no buffers at all. Even then, the variable bit rate nature of most compressed audio streams is likely to cause problems. After reviewing the "broadcast" option of Xine, it seems that it isn't a genuine broadcast at all, it is just multiple unicasts which won't work.
No, buffers fix the original problem. You don't have constant latencies/bandwidth on a packet based network. IP/Ethernet is not ATM/. I don't see how this should ever work without using buffers. So you have to sync them with timecodes. And thats exactly what the slimdevices guys are doing.

br, Hari
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: colinjones on April 23, 2009, 01:09:46 am
Hari,

The original problem? If you mean break up in playback because of variable latency/bandwidth then I would agree with you. But I believe we are talking about the sync issue... if so, then no, buffers are the main cause of this issue on a local segment! The fact that you are using a buffer, that fills and empties on demand as bandwidth/latency varies means that you can never get an exact sync because there is no correlation between when the packet data arrives and when it actually gets played - it depends as much on the size of the buffer, how long the playback mechanism waits before playing back, etc. That can easily all vary between playback devices causing a loss of sync....

I agree that IP is not ideal nor guaranteed over routed subnets (particularly the Internet), but on a local switched segment, a buffer is not needed to deal with variable latency (by which I mean a large buffer, the playback device will always have like a tx-ring type, tiny fifo to queue) as the latency on a local switched segment is tiny and hardly varies at all until the interface is already congested - at which point playback would fail for any technology.

What I'm trying to say is, I agree a buffer is absolutely required on routed streams over distance, without which the stream will stutter, fart, crap out, etc. But on a local segment, the steam can be made to work reliably without a buffer, and the buffer is the main thing that will screw up sync.....

That being said, even with a buffer (assuming all the MDs use the same size buffer!) as long as LMCE used a UDP broadcast or multicast stream, this would significantly reduce the sync issue, as it is perfectly clear that in LMCE's case, the most significant issue for sync is the xine devices starting playback based on the last timestamp that media plugin received, which even if xine started playing back the stream instantly, could still be out by as much as 1 second!!!
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on April 23, 2009, 01:27:52 am
Hari,

The original problem? If you mean break up in playback because of variable latency/bandwidth then I would agree with you. But I believe we are talking about the sync issue... if so, then no, buffers are the main cause of this issue on a local segment! The fact that you are using a buffer, that fills and empties on demand as bandwidth/latency varies means that you can never get an exact sync because there is no correlation between when the packet data arrives and when it actually gets played - it depends as much on the size of the buffer, how long the playback mechanism waits before playing back, etc. That can easily all vary between playback devices causing a loss of sync....

I agree that IP is not ideal nor guaranteed over routed subnets (particularly the Internet), but on a local switched segment, a buffer is not needed to deal with variable latency (by which I mean a large buffer, the playback device will always have like a tx-ring type, tiny fifo to queue) as the latency on a local switched segment is tiny and hardly varies at all until the interface is already congested - at which point playback would fail for any technology.

What I'm trying to say is, I agree a buffer is absolutely required on routed streams over distance, without which the stream will stutter, fart, crap out, etc. But on a local segment, the steam can be made to work reliably without a buffer, and the buffer is the main thing that will screw up sync.....

That being said, even with a buffer (assuming all the MDs use the same size buffer!) as long as LinuxMCE used a UDP broadcast or multicast stream, this would significantly reduce the sync issue, as it is perfectly clear that in LinuxMCE's case, the most significant issue for sync is the xine devices starting playback based on the last timestamp that media plugin received, which even if xine started playing back the stream instantly, could still be out by as much as 1 second!!!

Look at the Logitech and the Squeezebox... the devs there have been trying to get sync'd audio working since before the first Squeezebox's his the market. Now to all intents and purposes they have exactly the same hardware playing their stream in each zone... and they are now using a 'heart beat' and they still cannot get sync'd playback to work at a level that compares with a source routed through a multi-zone amplifier - that is the benchmark pure and simple i'm afraid.

Its very frustrating as we'd all like a pure digital solution to this - I certainly would as it would make my life so much easier!

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 23, 2009, 04:13:43 pm
Does it make a difference if you use flash memory on each machine let it buffer for 5 second before you initialize a simultaneous playback?
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on April 23, 2009, 05:14:51 pm
Does it make a difference if you use flash memory on each machine let it buffer for 5 second before you initialize a simultaneous playback?

No...a buffer...is a buffer...is a buffer. The solution is not that simple...wish it was. But it isn't...otherwise we'd all be using properly sync'd media already.

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: krys on April 23, 2009, 05:42:57 pm
This might sound totally off the wall, but I have used the technology before (obviously a different application) and it worked well.

What about using a FM modulator on the core (or whichever pc you use for playing home audio) and broadcasting your audio to the rest of the tuners in your house over FM waves. You could easily set up a scenario that would flip your AV reciever into tuner mode and have the station preset to whatever your modulator is on. This of course would require each audio station to have a FM reciever, but I know in my situation that is the case.

I have used these devices before with success, although both times my reciever was only about 10ft from the transmitter so I am not sure what kind of range they have. But both times the audio was crystal clear and if you use this method I would bet you there would be no detectable sync issues.
-Krys
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: krys on April 23, 2009, 05:46:42 pm
http://www.crutchfield.com/p_142FMMOD02/Scosche-FM-MOD02.html?tp=1701

Link for what I am talking about... obviously this is made for a car so range could be an issue. I will try to find some specs.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 12:26:12 am
I have not yet had time to investigate this further, for synchronization accuracy, but the claim is that it is perfect.  I really think PulseAudio (http://pulseaudio.org/) is a viable option for multi-room audio playback.  There are many features which could be desirable to LinuxMCE users:

- It will output synchronous audio to multiple networked computers
- It will output synchronous audio to multiple sound card outputs in a single computer
- It will output individual sound sources to different sound card outputs in a single or multiple computers (this allows it to operate like a matrix switch without latency issues with multiple sound card outputs from a single pc)
- It allows you to use remote inputs (microphones) as local devices (baby monitor?)
- It uses a timer based method of synchronizing audio across networked pcs
- It is already incorporated as the default sound system in (k)Ubuntu 8.04 and up
- It uses zeroconf (avahi) for auto-discovery of networked pulseaudio systems (easily discoverable like remote shares...)
- It has a command line interface for all functionality (looks fairly easy to interface with...)

Why re-invent the wheel?  It is already the default sound system in Ubuntu...

Example: From the PulseAudio FAQ (http://pulseaudio.org/wiki/FAQ):
Quote
Is PulseAudio capable of providing synchronized audio playback over the network for movie players like MPlayer?

Yes! Unless your network is congested in some way (i.e. transfer latencies vary strongly ('jitter')) it works perfectly. ...

I'm still working my way through understanding the entire system but my understanding is that a device template could be written to use PulseAudio sinks (outputs) similar to how squeezeboxes are implemented.  I don't know how this would be done.

Many linux distros use PulseAudio (windows support as well)  XBMC also uses PulseAudio now.  Many options for network capable audio players open up by incorporating PulseAudio support.

My 2 cents.  :)

J.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 24, 2009, 01:02:19 am
Fantastic! and excellent work on locating pulseaudio.

Would everyone agree that this may be the answer we are looking for?

If so.... lets include on next distro.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 01:25:03 am
http://www.crutchfield.com/p_142FMMOD02/Scosche-FM-MOD02.html?tp=1701

Link for what I am talking about... obviously this is made for a car so range could be an issue. I will try to find some specs.

These are great devices, I have one of these in my car.  I does not broadcast an FM signal though, it is simply a modulator, not a transmitter.  It would allow you to modulate an audio signal onto an FM carrier frequency which you could then connect to the FM Antenna input on a receiver, this could probably be distributed through coax cable and a couple of splitters.  As a minimum it would allow a single FM radio device with an external antenna input to receive an audio signal from a single device with RCA style outputs.  These devices are not regulated because they do not 'broadcast' their signal through the air, only within a wire.

FM transmitters are limited in power (and therefor range) by broadcast regulators (CRTC here, FCC in the US, etc..).  Without a licence from a regulatory body FM transmitters are limited to the approx. 10' you've mentioned.  I've used some that will do 20' on fresh batteries.  These devices can sometimes be modified for higher broadcast power but you are then in violation of FCC/CRTC regulations.  I've not seen an FM transmitter that does not run on batteries (I assume for transmit power purposes) because they are usually intended to be portable, like for your car.

J
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 24, 2009, 03:32:49 am
http://www.crutchfield.com/p_142FMMOD02/Scosche-FM-MOD02.html?tp=1701

Link for what I am talking about... obviously this is made for a car so range could be an issue. I will try to find some specs.

These are great devices, I have one of these in my car.  I does not broadcast an FM signal though, it is simply a modulator, not a transmitter.  It would allow you to modulate an audio signal onto an FM carrier frequency which you could then connect to the FM Antenna input on a receiver, this could probably be distributed through coax cable and a couple of splitters.  As a minimum it would allow a single FM radio device with an external antenna input to receive an audio signal from a single device with RCA style outputs.  These devices are not regulated because they do not 'broadcast' their signal through the air, only within a wire.

FM transmitters are limited in power (and therefor range) by broadcast regulators (CRTC here, FCC in the US, etc..).  Without a licence from a regulatory body FM transmitters are limited to the approx. 10' you've mentioned.  I've used some that will do 20' on fresh batteries.  These devices can sometimes be modified for higher broadcast power but you are then in violation of FCC/CRTC regulations.  I've not seen an FM transmitter that does not run on batteries (I assume for transmit power purposes) because they are usually intended to be portable, like for your car.

J

Something within my expertise

Is it possible to do this within a core or a media director?

The way it works on a hotel system is thus:

You take any channel from a satellite/Cable receiver and you input it into a modulator(composite) and assign that modulator a channel number.  You can do this with multiple Modulators and combiners (looks like a backwards splitter) in order to assign many receivers to create a full out channel lineup.  The modulators transmit an RF signal through coax to your TV.  You would now tune into that particular channel to receive what ever channel the receiver is set on.   This type of system is very commonly found when modulating cameras into the cable signal that the cable TV companies provide.

BECAUSE it is a Closed caption signal, the strength of the signal running through coax doesn't need to be that strong so there wouldn't have to be that much worry about range.  If there were a low quality signal the signal could be amplified at source to produce a better quality signal.   Optimal signal to any device is 0db/mv  (decibels/ milivolt).  This signal strength can be measured using a RF signal strength meter.

Receiving channels on a TV tuner card would ensure a synced analog signal provided by the core.

Just a follow up on a solid Idea.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 24, 2009, 03:53:43 am
Possible Idea:

Now forgive me I am so used to winblows I do not know this answer at all.

If a core computer had multiple Audio cards within it... could it do audio switching.  Does Linux allow for multiple audio cards at once to within one computer?  Would they be at almost perfect sync?

If this is possible I could assign an audio card to a particular room and viola I could have a multi-room controller built within the Core.
I wouldn't need to have a bunch of cheap media directors to play audio only within them.

Forgive me if this seems dumb again very much used to winblows.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 04:06:59 am
Quote
Is it possible to do this within a core or a media director?

No.  It takes an RCA style input, not implementedable within LinuxMCE.

These devices are intended to be plugged directly into a car stereo and would require modification to use otherwise.  It's not meant meant for home system use, there are devices for that purpose, such as amplified matrix distribution systems.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 04:47:12 am
Possible Idea:

If a core computer had multiple Audio cards within it... could it do audio switching.  Does Linux allow for multiple audio cards at once to within one computer?  Would they be at almost perfect sync?

If this is possible I could assign an audio card to a particular room and viola I could have a multi-room controller built within the Core.
I wouldn't need to have a bunch of cheap media directors to play audio only within them.

PulseAudio can do this.  The functionality is available in Ubuntu.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: cirion on April 24, 2009, 07:16:15 am
http://en.wikipedia.org/wiki/PulseAudio
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: darrenmason on April 24, 2009, 08:28:23 am
Certainly some potential in the PulseAudio stuff - particularly as it plugs in at the ALSA level and should be low impact to get the XinePlayer using it.
Wondering how it would work with Squeezeboxs etc.  Perhaps with a combination of PulseAudio through JACK to slimserver there is potential for getting MD's to synchronise with Squeezeboxs - at least good enough to solve the room transitioning problem.
Time to do some more reading...
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: colinjones on April 24, 2009, 09:42:50 am
Darren

Not so sure that xine is going to be the issue, that seems to be transparent. The device template could certainly easily setup the basic parameters needed for PulseAudio to initialise in a basic sense..... however, I think that the PulseAudio device will likely need to be a DCE device so that it can respond to commands coming from the media plugin telling it to bifurcate and sync a stream... media plugin is the source for that coordination, not xine... it will effectively take the problem out of the hands of xine, and handle the audio at the virtual "hardware" layer, and so need to respond to some kind of DCE commands from media plugin... which in turn will need to be mod'd to know to actually send those commands to the PulseAudio device in the first place... that being said, all seems very possible and very interesting..... :)
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 24, 2009, 10:24:06 am
Quote
Is it possible to do this within a core or a media director?

No.  It takes an RCA style input, not implementedable within LinuxMCE.

These devices are intended to be plugged directly into a car stereo and would require modification to use otherwise.  It's not meant meant for home system use, there are devices for that purpose, such as amplified matrix distribution systems.

Sorry I was assuming you knew what I was saying when I was refering to Modulators

In the cable industry a modulator usually takes in Composite Video and Left/Right Audio in order to pump its signal to a specific channel frequency.  It the case of a computer a 1/8 stereo mini headphone plug which is Y split out to RCA style plugs.

So yes the same although this time I am trying to make myself more clear.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 04:53:37 pm
Sorry I was assuming you knew what I was saying when I was refering to Modulators

In the cable industry a modulator usually takes in Composite Video and Left/Right Audio in order to pump its signal to a specific channel frequency.  It the case of a computer a 1/8 stereo mini headphone plug which is Y split out to RCA style plugs.

Sorry Perplexus, I do understand the modulator and how it works in the cable industry for Audio-Video distribution.  This device works the same way only it simply modulates audio, no video, onto an FM radio frequency rather than a television channel frequency. 

My point was that there are likely more appropriate devices to use within a home as the device in question uses a 12V power source and has an antenna connector which is designed to plug directly into a car stereo, it is not a standard coax connection, hence the need to alter the device.  This is possible but I believe there are more appropriate devices to use within a home.

This is probably getting off-topic now for discussion within the dev section for multi-room audio within LMCE, I`d be happy to continue discussing this under another topic.

J
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: krys on April 24, 2009, 05:08:49 pm
I was not suggesting that we use the FM modulator I linked, only that maybe the technology could be used. Im sure there is some product out there that uses the same principle for home or business environments.
-Krys
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: phenigma on April 24, 2009, 05:19:29 pm
Not so sure that xine is going to be the issue, that seems to be transparent. The device template could certainly easily setup the basic parameters needed for PulseAudio to initialise in a basic sense..... however, I think that the PulseAudio device will likely need to be a DCE device so that it can respond to commands coming from the media plugin telling it to bifurcate and sync a stream... media plugin is the source for that coordination, not xine... it will effectively take the problem out of the hands of xine, and handle the audio at the virtual "hardware" layer, and so need to respond to some kind of DCE commands from media plugin... which in turn will need to be mod'd to know to actually send those commands to the PulseAudio device in the first place... that being said, all seems very possible and very interesting..... :)

There is development information available for building PulseAudio clients and modules that interface directly with PA rather than through the command line interface, this would be the ideal way to implement PA as a DCE device.  All stream syncing is taken care of by PA when you choose multiple outputs (local or networked).  Things should be transparent to the media application.  PA sinks (outputs) can be looped back as a source (input) which could be sent to a squeezebox simultaneously, although I don`t know if sync between PA and the squeezeboxes would be possible.  

Development information (much of which is above me) for PA is available at: http://pulseaudio.org/wiki/DeveloperDocumentation

With inexpensive MDs (My Eee Box B202 was $313.00 CDN) costing the same as a squeezebox ($299 US List), it would be great to have the functionality without the need to purchase an additional proprietary device (especially when the MD supports video output).

J
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 26, 2009, 09:15:28 am
Has anyone been able to give pulse audio a try yet?

Very curious to see how it goes.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 26, 2009, 06:28:47 pm
Has anyone been able to give pulse audio a try yet?

Very curious to see how it goes.

If you are so curious, why don't you give it a try yourself ;)

*scnr*
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on April 27, 2009, 09:42:04 am
Has anyone been able to give pulse audio a try yet?

Very curious to see how it goes.

If you are so curious, why don't you give it a try yourself ;)

*scnr*


Unfortunate I dont have a linux box as of yet.  Will have in 2 more days. 
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on April 27, 2009, 09:48:06 am
Will have in 2 more days. 

Please keep up us updated as to your findings.

btw: You can use VirtualBox to run Linux as well...
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: david_halliday on April 29, 2009, 01:21:15 am
OK I have been lurking for a while,

I understand that DigiLinX cracked this problem in their Netstreams line. (http://www.netstreams.com/residential.aspx)

They can not only keep audio synced between zones but also between video playing through a ViewLinX and surround sound through SpeakerLinX.

I think they archive this by:

1) Minimize latency in all playback devices devices
2) Pass only uncompressed data over the wire (including video) using Multicasts
3) Rely on a high bandwidth gigabit switch

I think they may also time stamp all packets and use a local ntp style time sync between all devices on the net.

I'm not sure this is something LinuxMCE could or would want to offer but I thought I would at least point it out as food for thought.

Dave.

Ps. Passing uncompressed data only is the reason they are limited to 1080i at the moment. 1080p 60fps  requires more badwidth than gigabit. http://www.netstreams.com/commothertech.aspx?ID=3

 
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: LegoGT on May 05, 2009, 01:34:52 am
OK I have been lurking for a while,

I understand that DigiLinX cracked this problem in their Netstreams line. (http://www.netstreams.com/residential.aspx)

They can not only keep audio synced between zones but also between video playing through a ViewLinX and surround sound through SpeakerLinX.

I think they archive this by:

1) Minimize latency in all playback devices devices
2) Pass only uncompressed data over the wire (including video) using Multicasts
3) Rely on a high bandwidth gigabit switch

I think they may also time stamp all packets and use a local ntp style time sync between all devices on the net.

I'm not sure this is something LinuxMCE could or would want to offer but I thought I would at least point it out as food for thought.

Dave.

Ps. Passing uncompressed data only is the reason they are limited to 1080i at the moment. 1080p 60fps  requires more badwidth than gigabit. http://www.netstreams.com/commothertech.aspx?ID=3

 

NetStreams:
About a year ago I wanted to take the plunge and buy a full NetStreams setup. On the plus side, the system is scalable, syncs perfectly, handles audio/video streams, supports bidirectional audio (intercoms), etc. After looking at the mechanics of an install I ran into a few issues:

First, you need to use their proprietary GigE switch and dedicate it to their traffic only. I imagine you could hang a few LinuxMCE boxes off it and not get in too much trouble but it's not a supported installation method.

Second, the components are really expensive. Also, you have to contact and hire a licensed NetStreams installer to even pretend to get the products in your hands. Any devices I've been able to find, otherwise, are old demo type units. Not really a DIY type solution.

PulseAudio
As you can tell, multi-room sync'd audio is important to me. The problem I can see happens when you start listening to music in one room, add another room, and then change the source in the original room. I'm not a pulseaudio expert but I can't think of how to transfer that source to originate from a new location without restarting the stream from a new machine. I don't think pulseaudio has the ability to solve this.

Keep in mind that pulseaudio won't give any success for streaming the video part for movies, TV, or concert videos -- only the audio stream.

Softsqueeze/Squeezeslave
At the moment I've been playing a lot with softsqueeze and having pretty good luck with it. This is exciting because I can start a softsqueeze client (or even a headless squeezeslave as a command line client) from pretty much any electronic device. I like this solution because it's heavily supported, the DCE device is already made, and can turn devices not able to run as full MD's into simple music players.

Network audio pipes
As another alternative, the core could cue up each audio stream and then allow each MD (or other capable audio streaming device) to just "tune in" and play. It would require a new DCE device but might be worth the effort since it's mostly shell scripting. Here's probably the best (and easiest to jump right in) intro into piping the audio around the house: http://www.debian-administration.org/articles/145 (http://www.debian-administration.org/articles/145)


Let me know if you guys see any glaring reason to go one way or the other. I will be working on solving this regardless (for my own enjoyment!) but it would be nice if I take the path that's most useful to the rest of the community, too! Ideas?
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on May 15, 2009, 12:43:08 pm
yes. My two boxes run _in perfect sync_ (yes, i have an "overlapping" area). If you look at their bugfixes, there were quite some improvements in latest firmwares (a few months ago). I've not tested it for days, but i had it running for some hours without getting out of sync.

br, Hari


Well after upgrading to Squeezecenter 7.3.2 and getting our SB Receiver & Boombox test units added to one of our 710 test Core's...then sitting and listening to a load of music I have to agree they sound 100% in sync. They are being served a single stream...but if you also select an MD then you get a separate stream for that MD. This latter scenario causes an out of sync situation between the Squeezeboxes and MD's. If you use all Squeezebox's then you have sync'd audio.

The Receiver is on a Gigabit CAT5 connection...while the Boombox is on Wifi...and they are still in perfect sync when playing a big (200+ track playlist) from the media Floorplan...and they have stayed in sync for several hours now too.

So this is very exciting news indeed!

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on May 15, 2009, 01:44:01 pm
Andrew,

great news indeed.

Now, why not replacing xine as our audio player with softsqueeze?

That way, we might get near perfect sync more easily.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on May 15, 2009, 01:47:56 pm
Andrew,

great news indeed.

Now, why not replacing xine as our audio player with softsqueeze?

That way, we might get near perfect sync more easily.

Hmmm...that sounds like an interesting idea on the face of it... I will habe a chat with Uplink later about that.

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: nswint on May 18, 2009, 05:13:24 am
Andrew,

great news indeed.

Now, why not replacing xine as our audio player with softsqueeze?

That way, we might get near perfect sync more easily.

I don't think that xine can perform multicast streaming.  To my knowledge only vlc and maybe mplayer can do that.

VLC could probably offer uni/multicasting of audio/video and simultaneous streaming to a mp3 that a squeezebox can tune into

Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on May 18, 2009, 07:43:54 am
Andrew,

great news indeed.

Now, why not replacing xine as our audio player with softsqueeze?

That way, we might get near perfect sync more easily.

I don't think that xine can perform multicast streaming.  To my knowledge only vlc and maybe mplayer can do that.

VLC could probably offer uni/multicasting of audio/video and simultaneous streaming to a mp3 that a squeezebox can tune into



Posde idea is to replace the Xine for audio media playback with Softsqueeze...therefore moving all audio streaming clients to the same player software. this would automatically get us sync'd audio on the MD's and Squeezeboxes. Sounds like a very compelling proposition to me ;-)

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: bulek on May 18, 2009, 08:52:59 am
Hi,

I'm not sure how Softsqueeze could be used without GUI (but don't know it very well, so I believe there is an option of doing that)...

I'd just like to point out that Squeezeslave (different from SoftSqueeze, more command line oriented) at the moment is not a good option.

In my experience (I'm using it for second audio zone routed through Marantz receiver) that :
- every now and then you can hear a small hitch - like music freezes for a moment.
- it can crash on mono wav files (there is an option of recoding before it's played, but didn't yet figured out, how to do that properly). For instance, currently on 710, it dies on speech announcements...

I didn't test sync yet at all... I'm not sure what is relation of those two players and what part of code they share....

Regards,

Bulek.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: totallymaxed on May 18, 2009, 11:01:17 am
Hi,

I'm not sure how Softsqueeze could be used without GUI (but don't know it very well, so I believe there is an option of doing that)...

I'd just like to point out that Squeezeslave (different from SoftSqueeze, more command line oriented) at the moment is not a good option.

In my experience (I'm using it for second audio zone routed through Marantz receiver) that :
- every now and then you can hear a small hitch - like music freezes for a moment.
- it can crash on mono wav files (there is an option of recoding before it's played, but didn't yet figured out, how to do that properly). For instance, currently on 710, it dies on speech announcements...

I didn't test sync yet at all... I'm not sure what is relation of those two players and what part of code they share....

Regards,

Bulek.


Hi,

Softsqueeze will run 'headless' so that is not a problem in its own right. However Softsqueeze is written in Java so this might be an issue.

Squeezeslave 0.8 is also a possibility - thanks for the heads-up on the issues you have seen with this player.

The other possibility is to write a lightweight command line client to do the job. This might be the preferred route as it could be designed to do exactly what we require.

Anyway all of these options are being explored right now.

All the best

Andrew
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: nswint on May 19, 2009, 06:02:18 am
Andrew,

great news indeed.

Now, why not replacing xine as our audio player with softsqueeze?

That way, we might get near perfect sync more easily.

I don't think that xine can perform multicast streaming.  To my knowledge only vlc and maybe mplayer can do that.

VLC could probably offer uni/multicasting of audio/video and simultaneous streaming to a mp3 that a squeezebox can tune into



Posde idea is to replace the Xine for audio media playback with Softsqueeze...therefore moving all audio streaming clients to the same player software. this would automatically get us sync'd audio on the MD's and Squeezeboxes. Sounds like a very compelling proposition to me ;-)

Andrew

How would that work?

Xine plays media and streams
-------
         | Media directors tune in to the stream
         | Squeezeboxes listen to stream via mms, rtsp, mp3?

I've been away from linuxmce for quite some time.

And yes squeezeslave works well.  I use it now to sync music from squeezecenter to my fm radios where I do not have squeezeboxes.

Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Marie.O on May 19, 2009, 09:15:56 am
Posde idea is to replace the Xine for audio media playback with Softsqueeze...therefore moving all audio streaming clients to the same player software. this would automatically get us sync'd audio on the MD's and Squeezeboxes. Sounds like a very compelling proposition to me ;-)
How would that work?

Xine plays media and streams
-------
         | Media directors tune in to the stream
         | Squeezeboxes listen to stream via mms, rtsp, mp3?

no. It would work the same way as it works with the hardware Squeezeboxes. We tell Squeezecenter to play a file on a Squeezebox (either hardware or software). Xine is not involved at all.
Quote
And yes squeezeslave works well.  I use it now to sync music from squeezecenter to my fm radios where I do not have squeezeboxes.

Good to hear.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: krys on May 29, 2009, 03:58:49 pm
This might already be known, but I thought that I might mention it anyway just in case it helps spawn a good idea.

We were entertaining some guests last night at the house and I wanted to play some music, so I kick on my favorite internet stream and start listening in my home theater room. We started to move to the back patio so I go to floorplan and bounce the stream to both the home theater and the back patio. Of course they turn out to be about 1-2 sec out of sync which was annoying. So I decided to just use my internet radio scenario from the home theater, then run the same scenario from the patio (instead of just pushing the stream using the floorplan). Low and behold when I just grab the stream from both MD's it was perfectly sync'd.

So people out there who are smarter than me... how come i can grab an internet stream from multiple MD's and they be in perfect sync, but i cant grab a network stream without it being out of sync by 1-2 seconds? Surely we can figure out a way to replicate the internet radio stream but do it inside our own network....
-Krys
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Purplexus on May 31, 2009, 11:06:17 pm
Anyone else notice that Pulse audio has the ability to control multiple sound cards within the same Cpu? or was I reading that wrong??  Will pulse audio be able to send multiple different streams to multiple sound cards? as well as have the ability to sync multiple streams to multiple sound cards?  Potentially this is the same thing as a Matrix Switch and essentially a switch in which I get to control the Size of it. 

My kubuntu machine has pulse audio loaded and I have a sound blaster platinum live card kicking around I'll quickly do a test and check it out.  Unfortunately I am not sure I know exactly how to get it started in Linux so someone else may also want to test this out  Someone that will know what they are doing better then I do.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: tschak909 on June 01, 2009, 01:32:17 am
Guys, this isn't rocket science.

Write a media player that uses pulseaudio, have each zone as a child device of it. Use a plugin to coordinate the stream handling from the media plugin to the different zones.

-Thom
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Riggs on June 11, 2010, 08:06:37 pm
As regards to the sync issue you can have the best software out there even the best hardware but remember travel distance I worked in Europe at a club known as Oceana and they wanted multi room sync and we fount out that no matter what hardware or software was used it was always sightly out of sync because of distance, think of how light travels (from the sun to say pluto we see the light on earth first before pluto) same would happen in rooms as cable gets longer or signal from the wireless router get weaker. best choice in connection would be to use optic with the same length and any left over needs to be coiled at the same distance on each cable and that is not perfect.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: bongowongo on June 12, 2010, 10:46:22 am
Here we have a crappy B&O system and in all rooms it is sync.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Kooma on June 12, 2010, 12:16:11 pm
The speed of light should not be a problem here, eh...
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Riggs on June 14, 2010, 08:49:04 pm
The speed of light should not be a problem here, eh...

The speed of light was used as an example to show everything travels at a speed.
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on June 15, 2010, 10:49:25 am
So this is very exciting news indeed!

Andrew
I'm telling this for over a year..

br Hari
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Zaerc on June 15, 2010, 08:51:29 pm
So this is very exciting news indeed!

Andrew
I'm telling this for over a year..

br Hari
Well, that post you're responding too is in fact more then a year old...
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: hari on June 16, 2010, 12:32:14 am
oops.. who did bump this old thread? :-p
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: tschak909 on June 16, 2010, 12:34:18 am
Riggs.

-Thom
Title: Re: Discussion on true Multi-room Solution (continued)
Post by: Riggs on June 17, 2010, 09:48:45 pm
I was bored so i started reading through the forum