Streaming via Remote Speakers or Airfoil, Dropouts

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Streaming via Remote Speakers or Airfoil, Dropouts

Post by 0rca »

Hi all,

I have a bit of a difficult issue here and would need some help from the community to pin down the source of my problems.

Disclaimer:
Please excuse if this will become a lengthy post, but I am gonna try to be as precise as possible. I also know, that the scenario described is unusual and that my problems might very well not be related to MediaMonkey at all. So please forgive me for posting my questions here, but I simply know that my chances of finding an answer are much better here then elsewere...

Background:
After using MM for many years I wouldn't wanna miss it for anything - not for love nor for money. It is my player of choice for any audio playing in my home. I have been playing around with many multiroom audio solutions in the past, but most of them lack the flexibilty in automated playback that MM together with some of the great plugins and scripts available offer. I've tried Linksys Wireless Home Audio, Logitech Squeezeboxes, Sonos, I've looked at many forms of UPnP devices, I've tested many different audio or AV clients, I have network cables as well as optical cables (TOS-Link) running through my whole appartment - but I keep coming back to MediaMonkey as the perfect source/player. MM's great Auto-/Last.fm-/Scrobbler-/MusicIP-/Similar Artists-DJ-functionalities are absolutely unique and the best and only way for me to really enjoy my large music collection. So for me there is only one multiroom scenario that really works: A powerful and flexible audio server running MM, a convenient way to select and control the music remotely and several simple (i.e. dumb) and not to expensive audio clients throughout the appartment. I think I have found the perfect setup for me now - if I can get it to work flawlessly that is:

Setup:
  • Audio server: MediaMonkey running on a Windows 7 virtual machine hosted on a beefy Windows Server 2008 R2 with Hyper-V enabled (which I happen to be running anyway)
  • Remote controls: iPod Touches and hopefully soon an iPad to control everything via MonkeyTunes (awesome)
  • Streaming: In order to get any sound out of a machine that has no soundcard (Hyper-V doesn't), I tried several ways like USB-via-LAN, Virtual Audio Cable, Airfoil and Remote Speakers Output - I am using the latter right now.
  • Clients: 4 Airport Express' hooked up to active speakers in every room.
The above setup would be perfect for me, but I ran into one problem early on:

Problem:
Whatever OS I use, whatever resources I assign to the VM, however I configure everything, I have drop outs. I have been researching the possible causes and have eliminated many of them: Network bandwidth itself is sufficient (Gigabit to the first Airport Express, excellent HP switch, the WiFi itself is running as 802.11n, nothing else is on that WiFi network, radio channel is completely free, I have checked all other remedies re dropout issues with airfoil/airtunes/RSO that can be found on the internet). CPU power is not an issue, MM is the only task running on that machine, CPU usage is very low, I disabled all other VMs for testing

So I have been digging deeper, looking at Windows' Ressource Monitor and found out, that every time I hear dropouts, I can see the network throughput within Windows dropping This could simply be the logic consequence of audio dropouts resulting in "nothing to stream".
I have also watched the latencies of the 4 four threads streaming to port 5000 of the Airport Expresses going up on such occasions. But what really got me wondering was that I could observe MediaMonkey's playback time counting irregularly on such occasions, sometimes even stopping a little while, then catching up again. I can also see the little VU meter/visualization shortly dropping at those points.

atm I am trying to find a way how to measure or analyze what is happening there. Is MM waiting for the Remote Speakers Output plugin to "receive more audio"? Can the plugin affect playback stability in such ways? Or is MM somehow running wild within the VM? How would I measure the output latency? Or is the network latency the culprit and MM is simply struggling as a consequence?

I know that there are very many variables in this whole setup making it hard to isolate the real isssue. But I so want this to work and I'm not gonna give up.
Maybe some of you have any input, any ideas? Do you know any tools, that could help my analyze what is happening there? I am going to send this to Eric Milles (dev of RSO) too, he might know much more about this. But I am not sure at all, if this is a RSO issue, because it happens with Airtunes and Airfoil too (just much more frequent and regular dropouts there)

And, before I forget it: The whole setup is running flawlessly, when I do this on a physical computer. But I don't want to be running a PC just for MediaMonkey (I will in the end if I have to, but first I would like to try to eliminate the problem in the VM)

Thanks for your patience, if you have read until here, you are as much a geek as me :wink:

Cheers

0rca
Last edited by 0rca on Mon Nov 14, 2011 2:11 pm, edited 3 times in total.
emilles
Posts: 16
Joined: Tue Apr 11, 2006 9:01 pm
Contact:

Re: Multiroom, Latencies, Streaming, Remote Speakers etc.

Post by emilles »

If the playback counter is racing/acting irregularly, that is a sign that the buffer within RSO or the AirPort Express suddenly has a lot of room in it to fill. RSO does not do anything to try and sync the playback timer to the audio coming out of the remote speakers. It is tied directly to the position in the track that MM has reached in passing it to the output plug-in. There is also little flow control within RSO at this time, so any little blip in the network may cause a rush as it tries to fill available buffers, which may make the situation more extreme.

Airfoil and iTunes use a UDP protocol and RSO currently uses the simpler TCP protocol. This may explain why you are seeing a difference between the three. But in my experience, the network tends to be the source of the problem. With three Expresses all hooked up to wired Ethernet, I never experience any dropouts.

Beyond your first Express, how are the others connected? Is it WDS? They Expresses are not terribly powerful network boxes. The constant stream of audio going through the first might be your bottleneck. Have you enabled logging on it? Also, what type of audio are you playing when this happens (local file, stream, what format, etc.).
Remote Speakers output plug-in
Stream audio from MediaMonkey to any AirPlay device
Pete10
Posts: 36
Joined: Sat Apr 18, 2009 12:59 pm
Contact:

Re: Multiroom, Latencies, Streaming, Remote Speakers etc.

Post by Pete10 »

One easy thing to check is badly written drivers locking up your system for too long.
See dpclat.exe at http://www.thesycon.de/deu/latency_check.shtml to see if there is anything suspicious (dunno if it runs on your OS though).
0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Re: Multiroom, Latencies, Streaming, Remote Speakers etc.

Post by 0rca »

Hi there,

thanks Eric and Pete. Sorry for the late reply, but I have been out of town and only now could get back to solving my problem.

It turns out that Eric is right with the Airport Expresses being the bottleneck. I have played round with so many different configurations, that I might have lost track of all the variables. I'll try to round it up for anybody interested:

Hyper-V resp. any virtual machine in general is by design not very well suited to reliably playback streams. Latency is always higher than on physical machines and kinda unpredictable. If you're interested in details, I've received a very detailed answer on the topic here: http://social.technet.microsoft.com/For ... 84eddc7988

That said, it turns out that my Hyper-V installion does it's streaming job rather well, even though latencies are getting quite big at times.

Eric's hint at WDS made me re-check my WiFi settings and no matter what I tried (WDS, extended wireless network) I still had drop outs. The only solution that helped was running two of the Aiport Expresses wired and the other two each connecting wirelessly to a different (wired) Express. This way the load on the Expresses was small enough to make the drop outs go away almost completely.

FYI: The same VM playing music to the same network via Airfoil still produces quite regular drop outs.

So, all in all my planned solution works, it's awesome, Remote Speakers is awesome, Eric's support is too and MM is anyway ;-)
0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Ressurected

Post by 0rca »

One and a half year later this thread gets ressurrected :wink:

The combination MM and RSO has been running flawlessly all this time. But I have decided to look into the drop outs from itunes and airfoil once again.

To summarize everything for those who don't want to read all of the old posts: I have MM running on a windows 7 VM under Hyper-V and use RSO to get the sound to my Airport Expresses. RSO is the only solution that works reliably, neither iTunes nor Airfoil do. Both have very regular drop-outs, which I attributed to the VM resp. Hyper-V and timing problems (Eric hinted at UDP vs. TCP possibly being the root cause). You can see the dropouts on the attached screen shot, where I connected the digital out of an Airport Express with my soundcard and recorded the signal.

Image

Just recently I set up a Hyper-V server for a customer and tried streaming with iTunes from within a VM and it worked flawlessly. So I started looking at my configuration again but couldn’t find anything that might cause these dropouts.
I installed iTunes/Airfoil on the Parent, disabled Hyper-v completely (so it effectively ran on a standard Windows server 2008 R2) and the same dropouts occurred. I switched NICs, I disabled any service that came to my mind – nothing helped.

So it seems, that this problem is something very specific to that machine, that I simply cannot find. I am now looking for ways to look into the communication between iTunes/Airfoil and the Airport Expresses to see, where these dropout come from.

Hence this post, as somebody here might have in-depth knowledge of the architecture and know where to start looking/diagnosing. Any ideas?
0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Re: Multiroom, Latencies, Streaming, Remote Speakers..

Post by 0rca »

Just had a new idea and tried Airfoil and Airfoil Speakers on the same machine (i.e. my server, not in a VM) and even then I have drop-outs. Not as regularly as shown above, but still...
So there must be something disturbing the streaming even when it's not transmitted over the network. :o
I am stumped. Any ideas on how to diagnose/test this? Any thoughts?
0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Re: Streaming via Remote Speakers or Airfoil, Dropouts

Post by 0rca »

Nobody? Surely someone here has more dateiled knowledge about these things...
bilzebub
Posts: 50
Joined: Wed May 17, 2006 5:37 pm
Contact:

Re: Streaming via Remote Speakers or Airfoil, Dropouts

Post by bilzebub »

Well my problem is not the same as yours, but I thought this airfoil thread might be a useful place to post it -- apologies if not. My first experience with airfoil was tecrashed 70% of the time on my win7-64 . Their support ppl got me on a beta of it (now official release) and it no longer crashes. BUT i can only hijack foobar2000 or other audio, not mediamonkey -- weird, no?
0rca
Posts: 23
Joined: Mon Apr 10, 2006 7:45 pm
Contact:

Re: Streaming via Remote Speakers or Airfoil, Dropouts

Post by 0rca »

I've got no problem with hijacking MM using either the latest stable or the latest development-build, so I guess you'd have to ask RA about it...
bilzebub
Posts: 50
Joined: Wed May 17, 2006 5:37 pm
Contact:

Re: Streaming via Remote Speakers or Airfoil, Dropouts

Post by bilzebub »

I'll do just that, thanks :)
Post Reply