Post by nicolas75When the stream is bad, you will necesseraly experience rebuffering.
Increase the buffer, and you well get rebuffering every 3 (or whatever
figure depending of the size increase) minutes instead of every minute,
and each rebuffering will be awfully long (3 seconds is not acceptable
user experience, it is too long).
The problem is not the size of the buffer, the problem is that replay
stops during rebuffering.
This is a well known problem for streaming software developpers.
This depends, partly, on the protocol used to deliver the stream. If
the streaming protocol allows for missing sections of data (such as
delivery by UDP), or changes its delivery based on performance (such as
adaptive rate streaming), then these problems occur less, but this is
not usually the case with radio stations. Knowing what station you were
having problems with, and therefore what the protocol used for delivery
was, would help to identify if either of these are the issue.
However, for HTTP based streaming - which is common, whether it
utilises the plain HTTP stream or the ICY variant - this is TCP based,
so the former method used to skip data isn't possible. Except by stream
reconnection, and that usually results in a greater interruption due to
the streams being desynchronised (possibility of repeating or skipping
sections), and TCP having a slower start due to its own connection and
protocol. Plus, if the problem is at the local end, initiating a
secondary connection will slow the first, exacerbating the problem.
You suggest in your first comment that the problem is a corrupt MP3
stream. If the stream were corrupt, then that is an issue for the
source to address, and its much less likely that the player is at
fault. Corrupt MP3s can produce rebuffering indications and the like,
but you are far more likely to hear blips and squeals in the audio than
see rebuffering indications.
Your last comment suggests a lack of understanding of the process is
used during the playback, and the way that players handle bursty or
otherwise bad connections - if its just the phrasing that I've taken
the wrong way then I'm sorry. Streaming players are always buffering
data as it arrives. There may be multiple layers of buffering taking
place which affect the stream. For example, TCP based connections (such
as those used by HTTP) have their own internal buffers (so do UDP, but
I'm focusing on the TCP as HTTP is more common and it follows to the
next point).
The internal TCP buffers can be varying sizes and are there for 2
reasons - firstly they allow the receiving application to do other
things whilst blocks of data are received. Secondly, the allow the data
to arrive in different orders and be resequenced. This latter part of
sometimes a logically separate buffer to the former, as out-of-order
data has NOT (from the player's point of view) been received yet
(that's just the way that TCP is - you get everything in order, which
is why you cannot skip sections, as you might with UDP based
protocols).
So, in the case of a 'bad' stream, you might be experiencing packet
drop - if connections in between are dropping packets then only some
will arrive at the client and those that are not received will be
waited for. If they do not arrive then a 'retransmit request' will be
sent to ask for that data. This takes a while - depending on the TCP
configuration, the retransmit delay might be a few seconds.
At this point it is important to also include the fact that the
'client' in the streaming may not be the server. In some cases, the
Squeezebox itself is capable of performing the streaming itself without
the interaction of the server - at least that's what I remember from
looking into it some time back and I accept that my memory may be
flakey. So it might be important to know which Squeezebox model you are
streaming to - I don't know whether the Touch will perform streaming
directly or not.
Ok, so you've got TCP buffering involved. Then there is the application
level buffering which may be in two forms - input data (how much has
just been streamed and needs decoding) and output data (how much is
available to play). As the buffer size in the server is measured in
seconds, it is reasonable to assume that the buffer being configured is
the output buffer.
As the data arrives it is buffered (by TCP and then by the application
input buffer).
It is then decoded into playable data and buffered in the output buffer
for playback.
When the output buffer is full (to your configured level) playback
starts.
All the time the output buffer is draining all the time that playback
is happening.
As time progresses more data will arrive - maybe in small bursts either
because of delays in delivery or packet loss - and all the time the
output buffer is being drained of data as it is playing.
*When the output buffer is empty, playback stops* (and you are usually
presented with a 'rebuffering' message)
This is why, as you say "replay stops during rebuffering". There is NO
data to play, so there is no way to play anything. As data arrives and
reaches your configured buffer size, playback will resume. If you want
playback to start sooner, you configure the buffer size *down* - this
means that as soon as there is that much data available it will play
it. However, when that data runs out, playback will stall, so with a
poor connection that could not keep up, you will be interrupted more
often. Which is just a fact - if the data coming over the network
cannot be delivered sufficiently quickly to keep up with realtime it
will always drop out.
If you have a *larger* buffer then any temporary delays in the stream
(because of packet loss, or slower delivery) will be smoothed out. The
streaming server will attempt to keep up to real time, so the data
should (if it was only a /temporary/ delay) catch up later in the
stream, thus re-filling the buffers. The larger buffer smooths out the
temporarily delayed data. If it never does catch up then the output
buffer will drain completely and you'll get a 'Rebuffering' message.
If, for example, you have a 3 second buffer configured then it will
take 3 seconds for your stream to start, and you will be running 3
seconds behind real time. If you get a 'rebuffering' message, that
means that the stream couldn't keep up with realtime and is now running
3 seconds behind.
There may be issues outside of the buffering which are at fault, but
without more information on the station you have problems with,
suggesting a change of buffer size is the best bet.
There was a way to see the buffering level, but I cannot seem to find
it on my player at the moment - maybe someone else can suggest
something. Or maybe it only exists on certain configurations or
players.
You suggest that there are other players that "do not stop playing when
rebuffering occurs", and as you suggest, these may not work the same
way. I would suggest that if they keep playing whilst displaying a
'rebuffering' message what they mean is that their output buffer has
drained below a limit and they are now *warning* you that you're
running out of data and there is data being buffered.
Alternatively they could have a large output buffer /beyond/ that used
by the application. For example, DirectSound might be buffering a few
seconds of data, so whilst your PC players have no output data to hand
off to the DirectSound system (or equivalent, if you're using a
non-Windows system) and are therefore in need of rebuffering, there is
still sound coming out of the speakers.
So whilst, yes, those application may be working differently to the
Squeezebox - they're merely reporting that they are rebuffering when
there it still data available to them, whereas the Squeezebox is
reporting that it is rebuffering only at the point that it has actually
run out of data.
--
gerph
------------------------------------------------------------------------
gerph's Profile: http://forums.slimdevices.com/member.php?userid=1819
View this thread: http://forums.slimdevices.com/showthread.php?t=92738