Announcement

Collapse
No announcement yet.

Announce: UPnPBridge = integrate UPnP/DLNA players with LMS (squeeze2upnp)

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

    Originally posted by philippe_44 View Post

    You might have an issue with 0 and some streaming services. 0 means that AS SOON AS the current track (N) is buffered by the player, the next one (N+1) is queried to LMS. As a result, LMS will start grabbing N+1 in the background and sending it to the bridge until ALL buffers are full at which point the connection will be idle. So, for highly compressed formats, it might mean that the streaming session will be idle for a VERY long time while N is being played. Most online services cut it after 30-60s

    2.1.18 was trying to be smart and inform LMS that we had grabbed the whole N track so that we can get the N+1 necessary information to program the UPnP device, BUT it would wait until the UPnP players queries N+1 before starting the connection with the server. Unfortunately, when LMS proxies the track it opens a connection as soon as it knows we are done receiving N, so this did not solve the issue of being IDLE for a very long time

    Well, conclusion is smart failed, at least my attempt at it which means something, surely
    Thanks for the explanation - the issue is becoming clearer to me now.

    So the objective is to find the minimum (non-zero) value for <next_delay> which results in stability for the device/streaming service/streaming format combination in question, while at the same time ensuring that the request for N+1 is soon enough to maintain gapless playing?

    AS SOON AS the current track (N) is buffered by the player...
    By "player" here, do you mean the UPnP device or the plugin/squeezelite?

    Unfortunately, when LMS proxies the track...
    When using this plugin, is it better to set player/audio/streaming method to direct or proxied? Or does this again depend on the streaming service/player etc?

    Many thanks
    Darrell

    Comment


      Originally posted by darrell View Post

      Thanks for the explanation - the issue is becoming clearer to me now.

      So the objective is to find the minimum (non-zero) value for <next_delay> which results in stability for the device/streaming service/streaming format combination in question, while at the same time ensuring that the request for N+1 is soon enough to maintain gapless playing?
      Indeed

      By "player" here, do you mean the UPnP device or the plugin/squeezelite?
      The UPnP device


      When using this plugin, is it better to set player/audio/streaming method to direct or proxied? Or does this again depend on the streaming service/player etc?

      Many thanks
      Darrell
      Unfortunately, many tracks cannot be directly streamed because LMS has to do some processing on it. But in general, I would say it does not matter unless your LMS server is an old NAS where CPU matters

      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


        Brilliant, it's flowing like a river now. Thanks!
        I thought about suggesting some variable time setting when I realised from the Wiim case that time was important. Not that I claim to know anything about these things but sometimes logic reveals itself to the less gifted.

        Comment


          No sign of the .19 update but people here are talking about it. Is it actually released yet?

          Comment


            Originally posted by whitman View Post
            No sign of the .19 update but people here are talking about it. Is it actually released yet?
            it’s still in the Dev state
            to get it add Philippe’s repo URL to the bottom of plugins, apply and wait a bit

            the url is in post 1 of this thread

            Jim



            VB2.4 storage QNAP TS419p (NFS)
            Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
            Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
            Dining Room SB Radio
            Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
            Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
            Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes

            Comment


              Originally posted by d6jg View Post

              it’s still in the Dev state
              to get it add Philippe’s repo URL to the bottom of plugins, apply and wait a bit

              the url is in post 1 of this thread
              Ta Jim, will do.

              Comment


                quick question... where is the config file?

                nvm, found it

                /var/lib/squeezeboxserver/prefs
                Last edited by spacecase-25; 2023-03-19, 23:59.

                Comment


                  Originally posted by spacecase-25 View Post
                  quick question... where is the config file?

                  nvm, found it

                  /var/lib/squeezeboxserver/prefs
                  The config file location is in the plugin settings.

                  Click image for larger version  Name:	Screenshot_20230319-230037.png Views:	0 Size:	286.4 KB ID:	1634338
                  Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
                  Bedroom: Radio
                  Bathroom: Radio

                  Comment


                    Originally posted by tw99 View Post
                    I'm seeing a memory leak from squeeze2upnp (squeeze2upnp-linux-arm). These logs are from 2.1.16 but I think it's been the same throughout the 2.x versions. I noticed because my swapfile was too small, and eventually it was using all the VM in the system and locking it up.

                    The first issue is that there is a small but constant memory leak, as you can see from looking at the virtual size once a minute, it slowly increases even when nothing is playing:

                    Restarting the stream and stopping it will sometimes make the leak revert to the small one again.

                    I've looked in the logs, and there's nothing unusual in there that I can see. Please let me know if you need me to collect any more information.
                    Fixed in 2.1.20. Issues was with libpupnp. I've submitted a PR https://github.com/pupnp/pupnp/pull/426

                    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


                      Originally posted by philippe_44 View Post

                      Fixed in 2.1.20. Issues was with libpupnp. I've submitted a PR https://github.com/pupnp/pupnp/pull/426
                      Thank you. I'll give it a try and let you know if I see any remaining issues,

                      Comment


                        It looks much better as there's no continual leak, but it has still grown a couple of times from its original starting size, I'll annotate the log below:

                        Restarted the server:

                        Code:
                        Mon 20 Mar 17:17:01 GMT 2023         99.88 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 17:18:01 GMT 2023        101.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 17:19:01 GMT 2023        109.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 17:20:01 GMT 2023        109.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 17:21:01 GMT 2023        109.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp​
                        Wasn't using the uPnP device and it expanded twice:

                        Code:
                        Mon 20 Mar 17:45:02 GMT 2023        109.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 17:46:01 GMT 2023        117.35 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        ​.....
                        Mon 20 Mar 18:58:01 GMT 2023        117.37 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 18:59:01 GMT 2023        125.37 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp​
                        Started playing, presumably it's expected to need more memory while playing so this looks OK:

                        Code:
                        Mon 20 Mar 19:23:01 GMT 2023        125.37 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 19:24:01 GMT 2023        125.37 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 19:25:01 GMT 2023        147.67 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 19:26:01 GMT 2023        147.74 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp​
                        Stopped playing, size isn't back to where it was before:

                        Code:
                        Mon 20 Mar 19:38:01 GMT 2023        133.48 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        Mon 20 Mar 19:39:01 GMT 2023        133.48 Mb /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp
                        
                        ... and it didn't change after that for 15 hours so far​
                        Hope this is useful. I can't do any more experiments for a few days as I'm away from home.

                        Comment


                          Hi, i have a problem with the plugin
                          UPnP/DLNA bridge
                          I can't generate the upnpbridge.xml ​

                          this is the log :

                          Starting Squeeze2upnp: /config/cache/InstalledPlugins/Plugins/UPnPBridge/Bin/squeeze2upnp-linux-x86_64 -Z -I -b 192.168.1.3 -f /config/logs/upnpbridge.log -d all=debug -x /config/prefs/upnpbridge.xml
                          [12:20:33.526819] main:1714 Starting squeeze2upnp version: v2.1.20 (Mar 19 2023 @ 17:30:46)
                          [12:20:33.527189] main:1721

                          !!!!!!!!!!!!!!!!!! ERROR LOADING CONFIG FILE !!!!!!!!!!!!!!!!!!!!!

                          [12:20:33.532448] Start:1453 Binding to iface [br0]@192.168.1.3:49152 (http:0)
                          [12:20:33.532720] register_alac:541 using alac to decode alc
                          [12:20:33.533110] register_mad:433 using mad to decode mp3
                          [12:20:33.533166] register_faad:647 using faad to decode aac
                          [12:20:33.533239] register_vorbis:346 using vorbis to decode ogg
                          [12:20:33.536532] register_pcm:339 using pcm
                          [12:20:33.536635] register_flac:313 using flac to decode flc
                          [12:20:33.538794] register_opus:286 using opus to decode ops
                          [12:20:33.538899] register_m4a_thru:308 using mp4 to aac (ADTS)
                          [12:20:33.538974] register_flac_thru:213 using flac
                          [12:20:33.539025] register_thru:107 using thru
                          [12:20:33.539076] register_soxr:391 using soxr for resampling​

                          lms is on docker, host, and on a unraid NAS

                          Can you help me?

                          Thanks!

                          Comment


                            The plugin will create a file if it finds some players.
                            Was your mention of "host" confirming that you have followed this part of the instructions?
                            Other tips
                            • With docker you must use 'host' mode network
                            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


                              yes, my docker us host mode. I have multiple players, and the plugin has worked in the past

                              Comment


                                Nice to fix the leak, but now it's not gapless anymore. Tried Force, but no change.
                                Maybe the log gives a clue: log.txt plus xml from prefs upnpbridge.zip
                                I added dev to the repository to get 2.1.19 back, but it doesn't show up in the plugins list.
                                Attached Files
                                Last edited by Zombie; 2023-03-22, 19:06.

                                Comment

                                Working...
                                X