PDA

View Full Version : Buffering problem with Duet



ken@ken.net
2012-11-24, 08:20
I have a duet and boom in the house and the boom works 100% fine but the duet is suffering from re-buffering problems that are confounding me. In most cases the Duet and Boom are tuned to a BBC Radio 4 stream (the same config) and the Boom never chokes but the Duet does periodically and by periodically I mean it can go long periods without any issue but when it hits a "trouble period" it tends to re-buffer frequently (as much as once per minute or so). Let me tell you what I know/think:

- WiFi signal strength to both Boom and Duet are pretty strong although Duet is slightly stronger (so I don't think it's WIFI signal-to-noise ratio)
- To optimise WiFi I did scan for neighbourhood interference and did change channels to optimise. Again, don't think it's the WiFi signal to the wireless base station where the problem is happening.
- I saw somewhere in this forum that you could turn on a display to show buffering information. Turns out that's only on the Boom (which has a display) not the duet. The display is a bit confusing and so far it hasn't helped me ... I can get more specific but for now I'm assuming this is more of a distraction
- Today there was a "bad patch" where the re-buffering problem was happening so I switched the radio to play some local iTunes music and the problems disappeared. I tuned back to BBC Radio 4 and the problem returned. During this same time the Boom was tuned to BBC Radio 4 the whole time and never had a problem.
- The Boom and Radio are getting their signal from different WiFi routers but are on the same network (e.g., 192.168.1.x) and all other devices behave exactly the same running off both routers.

For my sanity (and my wife's) could someone help us figure out how to troubleshoot this further?

Ken

p.s. does anyone know if the Duet has a smaller internal buffer than the Boom?

matka
2012-11-24, 08:33
I had a similar problem when using qobuz plugin, duet and transporter would badly buffer.
On some advice I found on this forums I have changed "MP3 streaming method" for the player from "Direct Streaming" to "Proxied Steaming" and it worked, even when qobuz plugin was streaming in flac... I believe this somehow increased (or created) a buffer size on the server for the player.

I've set this up via server settings>>player>>audio

ken@ken.net
2012-11-24, 10:21
Looks promising. I had noticed that under Advanced > Network > Radio Station Buffer (seconds) I could move the setting but it seemed to have zero impact, maybe I needed to switch to proxied streaming as you suggest for that to make a difference. Anyway, will give this a try and report back on how it works in the next day or two. BTW, I've currently only set the Duet to proxied as this is the only one behaving badly ... does anyone what the effect of having one in "proxy" and the other in "direct" and the two devices synchronized? I'll play around with this a little too.


I had a similar problem when using qobuz plugin, duet and transporter would badly buffer.
On some advice I found on this forums I have changed "MP3 streaming method" for the player from "Direct Streaming" to "Proxied Steaming" and it worked, even when qobuz plugin was streaming in flac... I believe this somehow increased (or created) a buffer size on the server for the player.

I've set this up via server settings>>player>>audio

bpa
2012-11-24, 12:36
Which format are you playing the BBC stream AAC or WMA ?

If it is AAC - then the LMS will be transcoding to Flac and you may be having network or processor loading problems. If it is AAC then proxy or buffer settings changes won't be effective.

ken@ken.net
2012-11-25, 05:26
Ok that's interesting. I don't actually know. I think if I go down and dig into the remote's menu system it will tell me what type of stream but is there a way from the browser interface to answer this question? Also, why is it that AAC would be transcoded to Flac? That seems wasteful as you can't create something from nothing (aka, lossless from lossy). Might be just my misunderstanding. Also, why would AAC cancel the proxy buffer settings?

Last thought ... I'm assuming the processor load you're talking about is on my computer that would be transcoding between AAC and Flac and therefore I don't think there is any issue there based on the fact that the two radios (duet and boom) can be streaming the same station and only the duet has problems. Also the computer is quite powerful and I never see any CPU spikes when this problem is happening (although it is possible that I'm just not looking at the right time ... still I'd be surprised).


Which format are you playing the BBC stream AAC or WMA ?

If it is AAC - then the LMS will be transcoding to Flac and you may be having network or processor loading problems. If it is AAC then proxy or buffer settings changes won't be effective.

Mnyb
2012-11-25, 05:44
One fact neither the duet receiver or boom do AAC natively ,so the server has to transcode , that would not solve your problem ,but just so you know.

And why lossles you cant transcode one lossy format to another lossy without losing soundqality (sometimes it gets spectacularly bad ) .
The lossles rendition of the lossy stream would sound the same it would not improve in any way but at least be the same.

You can invoke lossy transcoding (I think havenít tried recently ) by imposing a bitrate limit on the player then it will always be the selected rate of mp3 whatever you play .

bpa
2012-11-25, 05:53
Ok that's interesting. I don't actually know. I think if I go down and dig into the remote's menu system it will tell me what type of stream but is there a way from the browser interface to answer this question?
What format will initially depend somewhat on the menu you have used to play the stream. If it is the Logitech BBC Radio App - then it will always be WMA. If it is used the Tune-in then it can be AAC or WMA. If it is using the BBC iPlayer plugin then it will dpeend on the settings.

When playing the fpormat is displayed intthe "more info" on what ever is controlling the stream or on the Browser interface on the RHS just under the station name - there will be the speed and format.


Also, why is it that AAC would be transcoded to Flac? That seems wasteful as you can't create something from nothing (aka, lossless from lossy). Might be just my misunderstanding.
LMS will transcode to Flac so that no more losses will be introduced i.e sound quality is kept as best as possible. If you transcode to MP3 then sound quality will be worse than that broadcasted.


Also, why would AAC cancel the proxy buffer settings?
LMS will not be proxying because it will be transcoding in LMS and then sending Flac stream. Radio Streram buffer timeout is for streams which go directly from Station to player (i.e. audio does not go through local LMS) - transcoding means data first arrives in LMS and is then transcoded.


Last thought ... I'm assuming the processor load you're talking about is on my computer that would be transcoding between AAC and Flac and therefore I don't think there is any issue there based on the fact that the two radios (duet and boom) can be streaming the same station and only the duet has problems. Also the computer is quite powerful and I never see any CPU spikes when this problem is happening (although it is possible that I'm just not looking at the right time ... still I'd be surprised).
Without details of network or LMS server, all I can do is highligh possible issues. It is up to you to research them. Change to WMA and if issue goes away then you know it is either CPU and/or network. It is possible that two flac streams is overloading your network or the duet signal is just not quite of Flac. That is for you to investigate (e.g. use LMS network load test)

ken@ken.net
2012-11-26, 04:50
First let me thank all of you (@matka, @bpa, @mnyb) for helping me try and track this problem down. I had secretly hoped that @matka's suggestion of buffering would solve all my problems but last night proved that this problem still exists (at least with buffer set to the default of 3 seconds). The one thing last night's buffering problem did do (it was quite bad last night) was let me test local streaming of MP3's. Streaming 320kbs MP3's; worked without issue. Based on what's been said about AAC/WMA versus MP3 though I guess this test isn't perfect as my MP3's were streamed directly to the Duet as it can handle it natively versus being transcoded to FLAC and streamed. @bpa, I still don't have a perfect answer for you on the streaming format of BBC. I actually have experimented with multiple BBC connections (and I think they all have the buffering issue). The one I use the most is the BBC London stream; information is as follows:


URL: http://opml.radiotime.com/Tune.ashx?id=s25419&formats=aac,ogg,mp3,wma,wmvoice&partnerId=16&serial=3c662caea11537999841dcee91a7799d.
It reports to be "56kbps CBR Internet Radio." You can see an image snapshot of what's in my control panel http://www.screencast.com/t/QgYP0uWXM

To me the most interesting part is the URL which specifies a number of possible formats. I wonder if I could switch this to only have mp3?

I also used to use this feed which I know experienced the same problem. It clearly is WMA format (and higher bandwidth). I switched to the first option because it sends over a picture of the radio show now playing rather than being blank. A nice feature but I'd love to have a wider 128kbs stream and a picture (anyway, I digress):


URL: http://bbc.co.uk/radio/listen/live/r4.asx.
It reports to be "128kbps CBR, WMA Internet Radio." So in this case it is being explicit about the format.

Finally I use the BBC iPlayer too (although I haven't used it enough to know if the problem exists there too). For live streaming of Radio 4 it apparently uses 128kbps AAC.

Anyway, here's what I think we can eliminate from the troubleshooting (and why); I'd be interested if anyone disagrees:


It's not the Wireless signal. I say that because the signal strength is always much higher (~ 80%) for the Duet than for the Boom and yet its only the Duet that has this problem

It's not the local network between the LMS and the squeezebox devices as local content (aka, MP3's) stream without issue

It MIGHT be:


A problem with transcoding to Flac for radio steams that are in WMA or AAC formats. I can test this by switching to my MP3 feed of Last.fm the next time I'm running into this problem.This seems unlikely as this should have had impact on the Boom as much as the Duet but maybe there's a way it would only effect one and not the other.

A bandwidth/latency issue of carrying FLAC audio to the squeezebox devices. This seems unlikely for the same reason as above ... why does it break on the Duet and not the Boom particularly when the Duet has a better network connection (albeit they're both only 802.11b/g not n). Additionally, why would this happen only periodically? The times it is happening are definitely NOT high network usage times. I should be able to test this to some degree by ripping a few FLAC files on my computer and trying to stream them over network.

Is it possible that the Duet has a more limited local cache than the Boom? I'm just guessing that maybe some local caching is taking place with the Boom which makes it a better netizen.

Finally, I think I may experiment with mangling the URL for the radiotime URL's ... they have a comma-delimited list formats ... I may just force it to only have MP3. Not sure it it'll work but all i can do is try. Any other suggestions would be greatly appreciated.

bpa
2012-11-26, 06:17
Are you in the UK or outside the UK. If outside the UK are you using some sort of VPN to get good quality UK stream ?

1. The stream is not "clearly WMA" as if you are outside the UK WMA streams are 48kbps and AAC streams are 56kbps. Radiotime can insert their own metadata so presence of pictures, data etc. cannot be used to decide the stream format.
2. Don't waste time with Radio time urls. It will be a distraction. There is no http/mp3 BBC stream (IIRC there may still be a Flash/mp3 stream for UK listerners). The Radiotime URL just lists the formats that the player can play - not the formats that are available from the station.
3. The BBC iPlayer can choose different formats depends on the plug settings so unless you check the settings you cpould be getting. 128kbps AAC or WMA is only available to UK listeners.
4. Wifi signal may still be a problem - just because you can play a 320kbps MP3 does not measn you can play a 750kbps Flac which is what transcoded AAC.

You need to get more precision with your investigation and definitively eliminate some possibiltiies. So far you have not done so regarding AAC vs WMA or Wifi.

Check the BBC IPlayer settings and change the settings to no transcoding and WMA.

ken@ken.net
2012-11-26, 07:31
Are you in the UK or outside the UK. If outside the UK are you using some sort of VPN to get good quality UK stream ?

I am in the UK.



1. The stream is not "clearly WMA" as if you are outside the UK WMA streams are 48kbps and AAC streams are 56kbps. Radiotime can insert their own metadata so presence of pictures, data etc. cannot be used to decide the stream format.

In the case where I said it was clearly WMA was where it was pointing to the BBC URL. In the cases where a Radiotime URL is used it does not specify format (which based on what you say is probably the right thing to do).



2. Don't waste time with Radio time urls. It will be a distraction. There is no http/mp3 BBC stream (IIRC there may still be a Flash/mp3 stream for UK listerners). The Radiotime URL just lists the formats that the player can play - not the formats that are available from the station.


Too late, i tried it. :)

You appear to be right though. When I reduced the URL to just MP3 the stream no longer flows and instead it plays a warning message that the stream is not available in MP3 format.


3. The BBC iPlayer can choose different formats depends on the plug settings so unless you check the settings you cpould be getting. 128kbps AAC or WMA is only available to UK listeners.


I'm in the UK and I have the settings set to AAC.


4. Wifi signal may still be a problem - just because you can play a 320kbps MP3 does not measn you can play a 750kbps Flac which is what transcoded AAC.

Yes that's precisely what I suggested in my last post, right? I don't have any Flac files right now but I'll create some and try pumping it around the house. The reason why I don't think this is a network saturation issue mainly comes down to the fact that there are two devices on the network and only one of them (the one with the stronger WiFi signal) shows this effect. Also there is zero difference between having one device streaming and two so presumably by turning off the second device -- in this case the Boom -- you'd have 1/2 the bandwidth over the network and yet doing this does not prevent the problem from happening. Instead it seems to be very episode-specific in nature (meaning it is either happening or it is not and during a given period of time).



You need to get more precision with your investigation and definitively eliminate some possibiltiies. So far you have not done so regarding AAC vs WMA or Wifi.

I simply followed your instructions on how to get the codec. I think maybe now that you've seen this post you'll start to agree that I have done this adequately. The answer, with a certain amount of certainty -- and please suggest any alternative way of being more definitive -- is:

BBC on Radiotime - Unknown but not MP3
BBC on BBC URL - WMA
BBC on iPlayer - AAC


Check the BBC IPlayer settings and change the settings to no transcoding and WMA.

I will change this to WMA (versus AAC) but what's the benefit? Both will transcode to Flac, right? I will also turn off the "allow transcoding" feature but won't that mean I can't listen to it?

ken@ken.net
2012-11-26, 07:40
I will change this to WMA (versus AAC) but what's the benefit? Both will transcode to Flac, right? I will also turn off the "allow transcoding" feature but won't that mean I can't listen to it?

I've changed the iPlayer settings to WMA and turned off the "allow transcoding". It does stream; I'm confused why it works but it does. Haven't listened to it nearly long enough to know if the problem still exists. I'm assuming it does.

bpa
2012-11-26, 07:54
I will change this to WMA (versus AAC) but what's the benefit? Both will transcode to Flac, right? I will also turn off the "allow transcoding" feature but won't that mean I can't listen to it?

No transcoding with WMA and stream will be direct from BBC to player. For UK users WMA is usually 128kbps and this is lower than 320bps MP3 and so network should not be a problem and since stream goes straight to player - LMS processor is not used and hence not an issue. If you still get buffering, then you shoudl try enabling the LMS proxying under WebUI/Settings/Player/Audio confusingly called "MP3 Streaming method"

edit:
Missed one post when creating above response.



I've changed the iPlayer settings to WMA and turned off the "allow transcoding". It does stream; I'm confused why it works but it does

The Duet can play WMA natively and so no need to transcode. Duet cannot play AAC natively and so must be transcoded into a 750kbps Flac stream (even if the original AAC stream is something like 56kbps)