Project

General

Profile

Support #895

Stuttering with private network stream

Added by Artem S. Tashkinov over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Minor
Assignee:
-
Category:
-
Target version:
-
Start date:
July 22, 2019
Due date:
% Done:

0%

Estimated time:
Affects version:

Description

I listen to an mp3 radio station (bitrate: 320 Kbps) with which

  • WinAMP works fine
  • MPV works fine
  • Windows Media Player works fine

However Audacious keeps stuttering every half a second or even more often which makes listening a very painful and unpleasant experience.

My settings:

Audacious:
  Network buffer: 512KB (tried different values - none worked)
  Audio plugin: Pulse
    Buffer size: 100ms

WinAMP (running under Wine/PulseAudio):
  MPEG input plugin:
    Streaming data buffer: 64KB
    Streaming prebuffer: ~35%
    How much to prebuffer at the start of a stream: ~10%
  Output: DirectSound
    Buffer length: 3000ms
    Prebuffer on start / seek / underrun: 500ms
    Buffer-ahead on track change: 500 ms

MPV (PulseAudio output):
  Cache: 1s+69KB (which translates into roughly ~1.7 seconds)
  Average buffer fill: 99%

I cannot share this station URL because it's private but I can send the URL to you directly.

History

#1 Updated by John Lindgren over 4 years ago

  • Subject changed from Networking buffering doesn't really work for certain streams to Stuttering with private network stream
  • Tracker changed from Bug to Support

An audio buffer size of 100 ms could cause stuttering, have you tried something larger? The default is 500 ms, but if you're trying to get rid of stuttering, I'd try 1-2 seconds for starters.

I tried playing http://hi5.adagio.fm with default settings just now (128 KB, 500 ms, ALSA) and didn't experience any stuttering.

Changing to Support.

#2 Updated by Artem S. Tashkinov over 4 years ago

John Lindgren wrote:

An audio buffer size of 100 ms could cause stuttering, have you tried something larger? The default is 500 ms, but if you're trying to get rid of stuttering, I'd try 1-2 seconds for starters.

I tried playing http://hi5.adagio.fm with default settings just now (128 KB, 500 ms, ALSA) and didn't experience any stuttering.

Changing to Support.

I tried buffer size up to 5 seconds - doesn't help at all. Again I can send you the URL of this radio station privately but you seem not to be reading emails sent to your official email address or my messages end up as SPAM.

#3 Updated by John Lindgren over 4 years ago

You will need to post the link here, I do not provide support via email.

#4 Updated by John Lindgren over 4 years ago

  • Category deleted (core)

#5 Updated by John Lindgren over 4 years ago

  • Status changed from New to Rejected

The stream you sent me by email plays without stuttering here. Closing.

#6 Updated by Artem S. Tashkinov over 4 years ago

John Lindgren wrote:

The stream you sent me by email plays without stuttering here. Closing.

I've found the culprit: it's the Crossfade plugin (set to two seconds).

As soon as I disabled it everything got fixed.

#7 Updated by John Lindgren over 4 years ago

I added some tracing to the ALSA plugin to show the buffer fill level, and looked at this a bit more.

Crossfade is a red herring. It adds a little bit of jitter on the Audacious side (about 1/2 second) which slightly worsens the problem, but the root problem is the server. It appears to be configured with a burst size of zero (Google "icecast burst size") which means that its buffering is basically useless and the entire burden falls on Audacious.

I am seeing occasional underruns even with a 2 second audio buffer. 5 seconds seems pretty stable here but of course it depends on network conditions, so what works for me may not be enough for you. You can try a huge buffer like 10 seconds -- that means you will wait for 10 seconds between when you hit "Play" and when you hear audio. Or you can use the old trick of pausing the stream for a few seconds, when it stutters, to buffer some audio manually.

It's like the early 2000's all over again. There's a reason most servers aren't configured like that.

#8 Updated by Artem S. Tashkinov over 4 years ago

John Lindgren wrote:

I added some tracing to the ALSA plugin to show the buffer fill level, and looked at this a bit more.

Crossfade is a red herring. It adds a little bit of jitter on the Audacious side (about 1/2 second) which slightly worsens the problem, but the root problem is the server. It appears to be configured with a burst size of zero (Google "icecast burst size") which means that its buffering is basically useless and the entire burden falls on Audacious.

I am seeing occasional underruns even with a 2 second audio buffer. 5 seconds seems pretty stable here but of course it depends on network conditions, so what works for me may not be enough for you. You can try a huge buffer like 10 seconds -- that means you will wait for 10 seconds between when you hit "Play" and when you hear audio. Or you can use the old trick of pausing the stream for a few seconds, when it stutters, to buffer some audio manually.

It's like the early 2000's all over again. There's a reason most servers aren't configured like that.

Thank you very much John! Very much appreciated. I will try to contact the owner of the stream and ask him to fix the streaming settings.

Also available in: Atom PDF