Announcement

Collapse
No announcement yet.

LMS 8.1.1 (and above) break radio streaming on SB Radio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    LMS 8.1.1 (and above) break radio streaming on SB Radio

    > Slightly different from the one that was proposed earlier and that I
    > added to my Gentoo build, but yes this works as well.
    >
    > Verified with 8.2.0 - not ready for 8.3.x yet.


    You patched yourself? Would be great if you could confirm 8.3.1, as I
    plan to release that probably soon.

    #2
    LMS 8.1.1 (and above) break radio streaming on SB Radio

    Edit: This title is in fact wrong. The problem exists with specific radio stations streaming AAC and manifests itself when you configure LMS to always pass native streams to the player.



    Yesterday I upgraded my LMS from version 8.0.0 to 8.2.0, not noticing anything wrong. This morning the alarm on Radio did the tsjiboom thing and as I investigated I found that Radio refused to play the active media which happened to be a radio station (I did find out later that it still does play local media). Receiver and Touch were not affected, not sure about Boom as I initially neglected to identify that the issue was restricted to radio stations and the current track on the Boom was a local media file.

    As LMS reported an issue with the Radio's firmware (with the version patch) I tried updating it with the community version but it wouldn't accept it and so I downgraded to 8.1.0 (there is no 8.0.1 install as mentioned in the forum post about the community firmware?) and I managed to get the community firmware on. It still states the following though:
    Code:
    You seem to be using a Radio with an outdated firmware, not recognizing this version of Logitech Media Server. Please consider patching it. Get more information.
     
    ...
    
    Player Information
    
       Player Model: Squeezebox Radio
       Player Type: baby
       Firmware: 8.0.1-r16907
       Player IP Address:
    Radio happily played the stream though and I went back to 8.2.0 only to find that it was broken again. So I stepped down again, this time to version 8.1.1 and it was still broken. So somewhere between commit effae84 and dd356a4 it went bust. My guess is that the issue may be related to one or more of the commits about transcoding somehow conflicting with the '--notranscoding' command line option.
    Last edited by gordonb3; 2022-11-18, 10:49.

    Comment


      #3
      What radio stream are you using? And are you saying you disabled transcoding? Then I'd recommend you re-enable it.
      Michael

      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
      (LMS: Settings/Information)

      Comment


        #4
        I tried two streams. They are both AAC I think. Either way that should not be the issue as they are processed quite fine by LMS up to 8.1.0

        Obviously I have my reasons for disabling transcoding. Re-enabling it is not an option.

        Comment


          #5
          Can you give a URL of one that fails for you?
          Paul Webster
          Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
          and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

          Comment


            #6
            Originally posted by Paul Webster View Post
            Can you give a URL of one that fails for you?
            Sure:

            Kink Classics

            NPO Radio 2


            Edit: seems the AAC is dictated by the automatically generated URI for those stations. Unsure why it prefers AAC.
            Last edited by gordonb3; 2022-11-16, 19:44.

            Comment


              #7
              Why not using 8.3.0? There has been a lot of work to improve audio format management consistency
              LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

              Comment


                #8
                Same problem. No playback on radio streams. It was introduced between the two indicated commits and as apparently I'm the first one to discover the bug it was never solved.

                Comment


                  #9
                  Originally posted by gordonb3 View Post
                  Same problem. No playback on radio streams. It was introduced between the two indicated commits and as apparently I'm the first one to discover the bug it was never solved.
                  I did many of these commits because the mp4/aac management was a soup that was sometimes working by error. I will have look because it’s true that I did not pay much attention to no transcoding, but if fixing the issue means coming back to spaghetti code, I won’t do it, somebody else will have to
                  LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                  Comment


                    #10
                    Okay. I guess at least it helps that I was able to pinpoint the problem to a fairly limited set of commits even though from my perspective I really need to restrict myself to the ones that are tagged as release. I've not done any deep investigation towards the actual cause but if I were to guess I'd say that something that used to be optional became compulsory and attempts to route the stream through a transcode binary that does in fact not exist on my system as I deliberately made these optional in the installer and did not select them for my personal target system.

                    Comment


                      #11
                      Originally posted by gordonb3 View Post
                      Sure:

                      Kink Classics

                      NPO Radio 2


                      Edit: seems the AAC is dictated by the automatically generated URI for those stations. Unsure why it prefers AAC.
                      I tried both of these through my own Radio (running latest community firmware, 8.0.1-r16907, and LMS 8.3.1 (see setup in Signature). First plays fine as 128kbps AAC. Second one plays fine as 64kbps AAC. All my filetype settings/transcoding, etc. are set as default (I've never changed them).

                      edit: please ignore my comment if you're using a special install/setup (e.g.,no transcoding) and my plain setup is not relevant for troubleshooting.
                      Last edited by garym; 2022-11-16, 21:20.
                      Home: Pi4B-8GB/pCP8.2.x/4TB>LMS 8.3.x>Transporter, Touch, Boom, Radio (all ethernet)
                      Cottage: rPi4B-4GB/pCP8.2.x/4TB>LMS 8.3.x>Touch>Benchmark DAC I, Boom, Radio w/Battery (Radio WIFI)
                      Office: Win11(64)>foobar2000
                      The Wild: rPi3B+/pCP7.x/4TB>LMS 8.1.x>hifiberry Dac+Pro (LMS & Squeezelite)
                      Controllers: iPhone14Pro & iPadAir5 (iPeng), CONTROLLER, Material Skin, or SqueezePlay 7.8 on Win10(64)
                      Files: Ripping: dBpoweramp > FLAC; Post-rip: mp3tag, PerfectTunes, TuneFusion; Streaming: Spotify

                      Comment


                        #12
                        Originally posted by garym View Post
                        I tried both of these through my own Radio (running latest community firmware, 8.0.1-r16907, and LMS 8.3.1 (see setup in Signature). First plays fine as 128kbps AAC. Second one plays fine as 64kbps AAC. All my filetype settings/transcoding, etc. are set as default (I've never changed them).

                        edit: please ignore my comment if you're using a special install/setup (e.g.,no transcoding) and my plain setup is not relevant for troubleshooting.
                        I have a fairly special setup

                        Logitech Media Server Version: 8.1.0 - TRUNK @ UNKNOWN
                        Hostname: babaorum
                        Server IP Address: 10.19.17.1
                        Server HTTP Port Number: 9000
                        Operating system: Linux - EN - utf8
                        Platform Architecture: armv5tel-linux
                        Perl Version: 5.34.1 - armv5tel-linux-thread-multi
                        Audio::Scan: 1.06
                        IO::Socket::SSL: 2.072
                        Database Version: DBD::SQLite 1.70 (sqlite 3.36.0)

                        Comment


                          #13
                          Originally posted by gordonb3 View Post
                          Okay. I guess at least it helps that I was able to pinpoint the problem to a fairly limited set of commits even though from my perspective I really need to restrict myself to the ones that are tagged as release. I've not done any deep investigation towards the actual cause but if I were to guess I'd say that something that used to be optional became compulsory and attempts to route the stream through a transcode binary that does in fact not exist on my system as I deliberately made these optional in the installer and did not select them for my personal target system.
                          It’s probably not a transcode binary routing but rather one of 1/ the format set for the player has been updated 2/ the internal mp4 to adts frame extraction that now allows any aac player to handle mp4 is not activated. It’s a complicated par of the streaming but I’ll look at that in the coming days. Just to be sure, can you confirm your player, os, cpu and if you could post a log with the conversion logging début set to info
                          LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                          Comment


                            #14
                            Open file /usr/share/perl5/Slim/Player/Song.pm (might in a slightly different place) and change, around line 440

                            Code:
                                           # Set the correct format for WAV/AAC playback
                                            if ( exists $streamFormatMap{$format} ) {
                                                    $format = $streamFormatMap{$format};
                                            }
                            with
                            Code:
                                           # Set the correct format for WAV/AAC playback
                                            if ( exists $streamFormatMap{$format} ) {
                                                    $format = $streamFormatMap{$format};
                                            }
                            
                                            $self->wantFormat('aac') if $format eq 'aac';
                            and you should be good to go
                            LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                            Comment


                              #15
                              Interesting.

                              Since the number of changes were limited I did some tracing and found the offending change:

                              Code:
                              diff --git a/Slim/Player/Squeezebox.pm b/Slim/Player/Squeezebox.pm
                              index e3411fe0e94..786c5a8600e 100644
                              --- a/Slim/Player/Squeezebox.pm
                              +++ b/Slim/Player/Squeezebox.pm
                              @@ -705,12 +705,8 @@ sub stream_s {
                               		
                               		# container type and bitstream format: '1' (adif), '2' (adts), '3' (latm within loas), 
                               		# '4' (rawpkts), '5' (mp4ff), '6' (latm within rawpkts)
                              -		#
                              -		# This is a hack that assumes:
                              -		# (1) If the original content-type of the track is MP4 or SLS then we are streaming an MP4 file (without any transcoding);
                              -		# (2) All other AAC streams will be adts.
                              -		
                              -		$pcmsamplesize   = Slim::Music::Info::contentType($track) =~ /^(?:mp4|sls)$/ ? '5' : '2';
                              +
                              +		$pcmsamplesize   =  $controller->song->wantFormat ne 'aac' ? '5' : '2';
                               		$pcmsamplerate   = '?';
                               		$pcmendian       = '?';
                               		$pcmchannels     = '?';
                              Thanks for finding the correct method to fix this.

                              Comment

                              Working...
                              X