Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 44
  1. #31
    Junior Member
    Join Date
    May 2020
    Posts
    17

    Some streams not working when players are synced

    Can this thread be renamed? The title is misleading.
    Wish it was explicit in the UI which one is master!
    12:26:08 - With Slimp3 as master, TSF Jazz doesn't work. Buffers infinitely. I don't want to leave it in this state too long, I've no idea what the far end thinks of my connection attempts. I cannot pause the stream in this state, I all I can do is pick another playlist entry. Local FLAC plays fine.

    12:29:16 - With squeezelite as master. Local FLAC looks like it's playing in UI but silence on both. Can't pause it. Press pause and it goes back to zero and counts up again. Can't play TSF Jazz either. It logs that a connection was refused on the first attempt, second attempt it buffers as before.

    squeezelite as master.log.zip
    slimp3 as master.log.zip

  2. #32
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,857
    Quote Originally Posted by troffasky View Post
    Can this thread be renamed? The title is misleading.
    Try editing the foirst post and then click "Advanced" - the Title appears in a editable box

    Wish it was explicit in the UI which one is master!
    12:26:08 - With Slimp3 as master, TSF Jazz doesn't work. Buffers infinitely. I don't want to leave it in this state too long, I've no idea what the far end thinks of my connection attempts. I cannot pause the stream in this state, I all I can do is pick another playlist entry. Local FLAC plays fine.

    12:29:16 - With squeezelite as master. Local FLAC looks like it's playing in UI but silence on both. Can't pause it. Press pause and it goes back to zero and counts up again. Can't play TSF Jazz either. It logs that a connection was refused on the first attempt, second attempt it buffers as before.
    Interesting that "master" has significance. Before delving into code, I'll wait until Philippe comes back online as he may have a better "feeling" if this line of inquiry is significant - otherwise I could be wasting everybody's time.

  3. #33
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,817
    To the OP: have you tweak squeezelite stream and output buffers value? I really donĺt understand why streaming stops systematically around 160kB and stalls, preventing threshold to be reached and playback to start
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  4. #34
    Junior Member
    Join Date
    May 2020
    Posts
    17

    Certain streams won't play when players are synced

    No, I haven't. I am just running "squeezlite".

  5. #35
    Junior Member
    Join Date
    May 2020
    Posts
    17

    Certain streams won't play when players are synced

    Started squeezelite with -d all=debug. Laptop and Slimp3 synced, Slimp3 is master.

    Test 1 - play a local FLAC file. Worked fine on laptop and Slimp3.
    Log from client:
    flacplaylog-squeezelite.log.zip

    Log from server:
    flacplaylog-server.log.zip



    Test 2 - play Bassdrive stream. Didn't work on either, behaved exactly as TSF Jazz has been. Buffers forever on server. Can't stop it through web UI so have to choose a FLAC in the playlist instead.

    bassdriveplaylog-squeezelite.log.zip

    bassdriveplaylog-server.log.zip

    Test 3 was going to be TSF Jazz but as Bassdrive just did what TSF Jazz had been doing anyway I didn't see the point.

  6. #36
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,857
    As I see it, the issue is because the players are sync - the "autostart" is not set and so players need an explicit command from LMS to start playing.
    However LMS will not start the player until the data in the player buffer reach a threshold level.
    However LMS is also not sending the data to the player to fill the buffer to reach the required level.

    Need to figure out why is data not being sent ?

  7. #37
    Junior Member
    Join Date
    May 2020
    Posts
    17

    Certain streams won't play when players are synced

    As before but with squeezelite log level at sdebug. Couldn't play or pause the stream, had to play a FLAC to stop it.


    bassdriveplaylog3-squeezelite.log.zip
    bassdriveplaylog3-server.log.zip

  8. #38
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,857
    Quote Originally Posted by troffasky View Post
    As before but with squeezelite log level at sdebug. Couldn't play or pause the stream, had to play a FLAC to stop it.
    With my limited knowledge of sync - I feel the problem is on the LMS side - unfortunately it means going through code - I don't think more logs will give any new clues .

  9. #39
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,817
    You know, I looked at SLIMP3 protocol handler and it stops sending chunks of data when the output buffer is full. I don't know SLIMP3, I know slimproto but looking at the code there (sendNextChunk)
    Code:
    	if ($fullness > $BUFFER_FULL_THRESHOLD) {
    
    		if ( main::DEBUGLOG && $log->is_debug ) {
    			$log->debug($client->id, "- $streamState - Buffer full, need to poll to see if there is space");
    		}
    
    		# if client's buffer is full, poll it every 50ms until there's room 
    		# Note: already dealt with 'stop' case above; previous test for 'play' || 'eof' may have missed certain race conditions
    		Slim::Utils::Timers::setTimer(
    			$client, 
    			make_timeout($client, $BUFFER_FULL_DELAY),
    			\&sendEmptyChunk
    		);
    
    		return 0;
    	}
    I would not be surprised that the old device becomes full much before the new one and because it does not accept data anymore, in sync, where data is proxied, it stops the whole source streaming process and so the larger slimproto buffer never receives enough data to start and here you have your deadlock. It is a fair bit of forensic for me to investigate exactly what happens precisely in the streaming/pipeline process when *at least* one of the device is full (beyond the code underneath), but it looks like a credible explanation. So at this point, maybe the "Radio Station Buffer Seconds" value in LMS's settings (networking) is what has changed compared to the when you said it was working. That's all I can do

    in Player::Source.pm

    Code:
    sub nextChunk {
    	my $client       = shift;
    	my $maxChunkSize = shift;
    	my $callback     = shift;
    
    	my $chunk;
    	my $len;
    
    	return if !$client;
    	
    	my $queued_chunks = $client->chunks;
    
    	# if there's a chunk in the queue, then use it.
    	if (ref($queued_chunks) eq 'ARRAY' && scalar(@$queued_chunks)) {
    
    		$chunk = shift @$queued_chunks;
    
    		$len = length($$chunk);
    		
    	} else {
    		
    		# Bug 14117
    		# If any client in sync-group has exceeded the high water-mark, then just sleep
    		# until the queue gets drained.
    		foreach ($client->syncGroupActiveMembers()) {
    			if (ref($_->chunks) eq 'ARRAY' && scalar(@{$_->chunks}) >= QUEUED_CHUNKS_HWM) {
    				main::DEBUGLOG && $log->is_debug && $log->debug('Waiting for queue to drain for ', $_->id);
    				$client->streamReadableCallback($callback) if $callback;
    				return undef;
    			}
    		}
    
    		# otherwise, read a new chunk
    		my $controller = $client->controller();
    		my $master = $controller->master();
    
    		$chunk = _readNextChunk($master, $maxChunkSize, defined($callback));
    Last edited by philippe_44; 2020-05-28 at 17:22.
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  10. #40
    Junior Member
    Join Date
    May 2020
    Posts
    17
    Quote Originally Posted by philippe_44 View Post
    I would not be surprised that the old device becomes full much before the new one and because it does not accept data anymore, in sync, where data is proxied, it stops the whole source streaming process and so the larger slimproto buffer never receives enough data to start and here you have your deadlock. It is a fair bit of forensic for me to investigate exactly what happens precisely in the streaming/pipeline process when *at least* one of the device is full (beyond the code underneath), but it looks like a credible explanation.
    Would setting the squeezelite's buffer to the same or less than the slimp3's be a valid test of this hypothesis?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •