In my modification of the ShairTunes2 plugin, I have issues when playing on synchronized players. It works, but there is often rebuffering (at least on LMS 7.7.5). It only happens with sync players, when streaming is not direct. Without entering into details, this plugin gets the RTP stream from AirPlay and re-offers that as an HTTP stream that either a player gets directly or LMS proxies it. All streams are 1411Kbps. As AirPlay is RTP, it's realtime, but the RAOP protocol allows the client to buffer using a latency parameter and I've done that.
This problem is even worse when using my AirPlay plugin where I might have neglected a bit the various buffer information that my virtual players (a sort of squeezelite) forward to LMS, repsectign slimproto. So this leads me to believe that there is something with what the player reports to LMS as status of its internal buffer and some other LMS plugin options
For example, looking at the squeezebox.pm code, there is
Does anybody have recommendation of ways to tweak buffering? ShairTunes2 declare the stream as Remote and I specify the bitrate as 1411200, so I was assuming that would be enough, LMS would buffer enough and would not be starved by the RTP stream, but obviously there are other dependencies that I don't understand, as I can see with my AirPlay bridge making things worse
This problem is even worse when using my AirPlay plugin where I might have neglected a bit the various buffer information that my virtual players (a sort of squeezelite) forward to LMS, repsectign slimproto. So this leads me to believe that there is something with what the player reports to LMS as status of its internal buffer and some other LMS plugin options
For example, looking at the squeezebox.pm code, there is
Code:
# Calculate the correct buffer threshold for remote URLs
if ( $handler->isRemote() ) {
my $bufferSecs = $prefs->get('bufferSecs') || 3;
# begin playback once we have this much data in the decode buffer (in KB)
$params->{bufferThreshold} = 20;
# Reduce threshold if protocol handler wants to
if ( $handler->can('bufferThreshold') ) {
$params->{bufferThreshold} = $handler->bufferThreshold( $client, $params->{url} );
}
# If we know the bitrate of the stream, we instead buffer a certain number of seconds of audio
elsif ( my $bitrate = $controller->song()->streambitrate() ) {
$params->{bufferThreshold} = ( int($bitrate / 8) * $bufferSecs ) / 1000;
# Max threshold is 255
$params->{bufferThreshold} = 255 if $params->{bufferThreshold} > 255;
}
$client->buffering($params->{bufferThreshold} * 1024, $bufferSecs * 44100 * 2 * 4);
}