Announcement

Collapse
No announcement yet.

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

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

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

    This plugin/app integrates UPnP/DLNA players found on your network and let LMS use them as if they were regular Squeezeboxes (they appear as a modified squeezelite instance).

    The stable version is now part of the 3rd party plugin built-in list, so you should find it in the plugins page. If you want to test the development version (there is not always one on-going), just add the following repository
    Code:
    http://downloads.sourceforge.net/project/lms-plugins-philippe44/dev/repo-sf.xml
    It should provide pretty much all the features of squeezelite, except synchronization that does not and will never work (all you can have is a 2-sec accurate sync start)

    Once installed, there is a "UPnP/DLNA Bridge" page added to your "Settings" and you'll have to tweak probably a few parameters there. A list of pre-existing profiles is available as well, but if your player is not included and you manage to have it working, please post here your successful configuration settings so that I can add them to the list of known devices.

    You need at least to select one helper binary, the bridge will not run otherwise. For Windows users, please install the Microsoft package whose link is provided. In general, prefer the non-static version if possible. For arm devices, the armv6 is for older CPU (PiZero 1st gen and other early Pi with ARM1176 processor)

    There are two processing audio modes

    1- Passthrough
    • In this mode, the audio tracks are simply passed to the UPnP/DLNA player with almost no modification (except a few tweaks for PCM -uncompressed- and flac).
    • Success will vary from track to track, depending on your UPnP/Player characteristics
    • Except for PCM tracks, replay gain, fade in/out/in-out will not work
    • Gapless works with UPnP/DLNA players that support it, but quite often it's not true gapless
    • Codec setup can be complicated, see below note


    2- Full processing
    • In this mode, the tracks are decoded and resampled (if needed) by the bridge and either sent as uncompressed PCM or re-encoded using flac or mp3
    • This mode provides much better compatibility as the same format can be sent to the UPnP/DLNA player
    • Replay gain, fade in/out/in-out are supported
    • Supported codecs are ogg,mp3,aac,flac,pcm and this is indépendant from what your player support as the Bridge does transcoding
    • There is a special option named "flow" to send all the tracks as a long single stream to enable true gapless and crossfade (you'll lose metadata display on the UPnP/DLNA player unless re-encoding uses mp3, icy metadata is enabled and supported by the player)


    In Passthrough mode, what codec to choose is a frequent question, so here are few tips:
    • Remember that, in passthrough mode, UPnPBridge does not do transcoding, just a few format tweaking. So the "agreement" on supported codecs is between LMS and your player, UPnPBridge just helps the negotiation
    • flc,mp3 are very likely to work in all cases - transcode the rest in LMS, do not try sample rate higher than 48kHz
    • pcm (and aiff) usually work
    • ogg works correctly if your player supports it
    • aac might work but there are at least 6 sub-formats and result totally depends of your player, track by track - it's a hit and miss, really. Some player have support but don't report it in their "mimetypes", so you need to add "audio/aac"
    • if your player does not support 24 bits samples (Sonos and many others don't) and you have such files, then you *must* use uncompressed codecs format like 'pcm' and/or 'aif'. There is an option in UPnPBridge to then truncate down to 16 bits. You won't know if 24 bits works before you try as players won't say they do or don't (they go silent) and LMS does not offer possibility for the player to feedback its sample size abilities anyway
    • These issues go away if you use full processing mode, available since version 1.x


    I'd like to really thank PasTim for his numerous suggestions, tests and continuous support and ralphy for patches and builds that allowed this to work on OSX, Windows XP and ARM

    !! CHECK YOUR FIREWALL STATUS !!

    The Bridge installs a web server on a random port from 49152 (can be configured), up to 32 ports, so your firewall must allow that. If everything seems to work but you have no sound, you probably have these ports blocked so the UPnP/DLNA player cannot get the audio. In Windows, add a rule authorizing squeeze2upnp-win.exe or go into C:\ProgramData\Squeezebox\Cache\InstalledPlugins\P lugins\UPnPBridge and launch *once* squeezeupnp-win.exe where you'll be prompted for authorization.

    This plugin *requires* SSL to stream HTTPS directly so make sure it's installed on your LMS server. Not a problem for Windows, OSX, most Linux x86, Raspberry pi, Cubie, Odroid and others that use a Debian-based, but can be problematic with some NAS. I don't have a perfect guide, so please refer to your NAS forum, but most of the recent NAS firmware update include SSL as well, so that might be all that is required.

    Other than that, Perl must have SSL support enabled, which again is available in all recent distribution and LMS versions (I think). But in case of problem and for Debian-ish Linux, you can try "sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl" at any command prompt. Here is as well the link to the original thread http://forums.slimdevices.com/showth...l=1#post631449

    Sonos tips

    Sonos players, when grouped, will keep their synchro within the Sonos group. When a group is created, all slave players will disappear from LMS, only the master is kept. They will re-appear when un-doing the group. You must use the Sonos app to create/delete groups.

    Other tips
    • With docker you must use 'host' mode network
    • IGMP snooping is very often a cause of issues with player's discovery / stability - check your router parameters
    • Read the User's Guide which is accessible in the Settings


    Debug HELP

    Folks, if you want help, you must post here the LMS version you're using, the OS and CPU. Then you must take a log of the bridge (go to the plugin's settings in LMS settings, tab advanced, it's self-explanatory).
    I won't be able to help and I will not answer dry questions like "it does not work"


    Advanced information

    The "binary helper" is an independent application that is the *real* bridge. The LMS plugin part does not do much other than offering a UI to edit config files. So you can run that binary helper on *any* computer/Pi on your network, it does not have to run together with LMS. The compromise is that you will have to edit manually the XML config file. A version with detected players can be generated automatically using the -i option, but after that you're on your own. Refer to user guide for more details.

    For manual installation, please follow

    Last edited by philippe_44; 2023-02-28, 01:05.
    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

    #2
    Originally posted by philippe_44 View Post
    If should work for Windows, OSX, Linux x86 and ARMv5 and v6+
    Ahh, this means no love for powerpc-based WD MyBookLive NAS, right?

    Comment


      #3
      Originally posted by tgv View Post
      Ahh, this means no love for powerpc-based WD MyBookLive NAS, right?
      What Operating system does that run? A little googling says it runs linux, which should be fine.
      LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
      LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
      Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
      Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
      Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

      Comment


        #4
        [rfu]

        Just one message reserved for future use
        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


          #5
          Originally posted by tgv View Post
          Ahh, this means no love for powerpc-based WD MyBookLive NAS, right?
          I would need support of ralphy to build on powerPC. I don' thave a cross-compiler chain for that. Having said that, squeeze2upnp does not need to run on the same machine as LMS, it can be on any computer on your network

          1/ For easy configuration:
          - install LMS on any Windows/Linux machine, or even a Raspberry pi
          - add UPnPBridge plugin

          2/ Find the configuration that works for your UPnP player
          - use the LMS UI for easy changes of squeeze2upnp parameters

          3/ Stop the LMS server

          3/ Launch squeeze2upnp standalone on the machine/raspberry pi
          - it is in the LMS sub directory cache/InstalledPlugins/plugins/UPnPBridge/Bin, choose the apps that maches your platform (squeeze2upnp-win.exe for Windows ...)
          - configuration file is in LMS subdirectory prefs/upnpbridge.xml
          - either copy these 2 somewhere else of let them where they are
          - launch the app (eg for Windows) with 'squeeze2upnp-win.exe -x <path to upnpbridge.xml>'
          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


            #6
            Great job! Thanks for the plugin.
            I mainly tested streaming from tidal (flac) and it works well with an Atoll st200 streamer. however i have got an issue with the pause and resume. It will play the track from the begining again. I use the pioneer n30 settings. Any idea ?

            Comment


              #7
              Originally posted by herve View Post
              Great job! Thanks for the plugin.
              I mainly tested streaming from tidal (flac) and it works well with an Atoll st200 streamer. however i have got an issue with the pause and resume. It will play the track from the begining again. I use the pioneer n30 settings. Any idea ?
              If I remember well, I already had a hard time with such a problem. Just to confirm, can you tell me if it does the same thing with a local file vs tidal ? You can also try to check "LMS seeks on resume" option. I have to look back earlier in this thread for the details, but if I remember this is due to the fact that, some players, when they pause a stream, they close the connection and when un-pausing, they re-open the connection but do no ask to "seek" to the paused position. They treat it as if it was a live, non-seekable stream (although I've set the parameters to say that it is a seekable stream). If you can also take a log, that would help me confirm. I'll dig into the "archives", but I think one of the solution was to force flac transcoding in LMS. PasTim might also remember all that better than I do

              [edit]: if you use the "HTTP streaming option" at "chuncked", try "no size" or "fixed large size". If it still does not work, then go back to 'chunked' and tryp "LMS seeks on resume"
              Last edited by philippe_44; 2015-06-06, 07:21.
              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
                I just tried to use the stable OSX plugin and had 16/44.1 playing at half speed. TIDAL worked just fine. Would not play hirez files. I had the codecs set initially for a slew and reduced them to flc, mp3 still with no luck. I am going back to the executable for awhile until this is more sorted. There are a lot of folks that are going to use and love this when it's finally ready for primetime and I am extremely grateful for all the work invested by several of you, especially Philippe. Please keep the process moving forward.

                Comment


                  #9
                  Originally posted by scintilla View Post
                  I just tried to use the stable OSX plugin and had 16/44.1 playing at half speed. TIDAL worked just fine. Would not play hirez files. I had the codecs set initially for a slew and reduced them to flc, mp3 still with no luck. I am going back to the executable for awhile until this is more sorted. There are a lot of folks that are going to use and love this when it's finally ready for primetime and I am extremely grateful for all the work invested by several of you, especially Philippe. Please keep the process moving forward.
                  ah ... few questions then, because the executable is in fact still used in the plugin, it's just a newer version

                  1- Which version of the executable works for you ?
                  2- Not playing hirez files: what is hirez ? 24 bits ? Sampling rate > 96 KHz ?
                  3- 16/44.1 playing half speed: I guess you mean pitch is obviously reduced by half ?

                  Any chance you can take a few logs ? I've no open issue on 2.3.0 (the executable used with the plugin) so if I re-introduced bugs compared to a previous version, any help is welcome to try to remove them

                  [edit]: I was looking at out latest exchanges. You had issues with "next track" not working properly as well. I suggested un-checking "Player handles next track" ? Also, if "hirez" files means 24 bits files, then it means that the OPPO (which I think is your player) might not be able handle 24 bits files. There is now a workaround for that : enable 'pcm' in your codecs and set '16 bits convert' in section "24 bits PCM"

                  [edit2]: I checked on all my machines: LMS 7.7.2 does not handle rates above 96k. A file with a rate of 176k is sent to squ2 with an apparent sampling rate of 44.1k in the header (but no downsampling is made), which I pass to the player, hence what you hear (I think). Using the same files (24bits/176k and 24/192k), LMS 7.9.x sends to sq2u a proper header indicating 176k (or 192k), so I pass this to the player and it works fine. What version do you use on your Mac ? Seems 7.7.2 which explains the high sampling rate problem.

                  [edit3]: I'm really willing to help, but without log I'm shooting in the dark, unfortunately. With the plugin, it is now much easier to take a log. For full logging, click the 'Enable logging" and set "debug logging" to all. Then run a playlist and once it has failed to move to next track, copy the log file (it should be, for a MAC, /Users/<your name>/Library/Logs/Squeezebox/upnpbridge.log - if you use Finder, enable the 'show library folder' in the 'view' options). Rename it "upnpbridge.txt" so that it is accepted by this forum as an attachement. Add also your configuration file, that can be copy/pasted directly from safari after you've opened it using the "view" link on the "configuration file" line (Settings). With that, I should really be able to tell you why the "next track" does not work. I've been able to make it work for all other players, so it should be feasible with the OPPO as well, but I just need to see what's going on

                  [edit4]: Did you have a look at http://www.oppodigital.com/blu-ray-b...-Firmware.aspx. It seems that there was some formware updates to correct various gapless issues as well as some hires playback problems
                  Last edited by philippe_44; 2015-06-07, 07:53.
                  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
                    Originally posted by philippe_44 View Post
                    If I remember well, I already had a hard time with such a problem. Just to confirm, can you tell me if it does the same thing with a local file vs tidal ? You can also try to check "LMS seeks on resume" option. I have to look back earlier in this thread for the details, but if I remember this is due to the fact that, some players, when they pause a stream, they close the connection and when un-pausing, they re-open the connection but do no ask to "seek" to the paused position. They treat it as if it was a live, non-seekable stream (although I've set the parameters to say that it is a seekable stream). If you can also take a log, that would help me confirm. I'll dig into the "archives", but I think one of the solution was to force flac transcoding in LMS. PasTim might also remember all that better than I do

                    [edit]: if you use the "HTTP streaming option" at "chuncked", try "no size" or "fixed large size". If it still does not work, then go back to 'chunked' and tryp "LMS seeks on resume"
                    I had what may be the same problem. I had to add a custom-convert file. The extract from the user guide is as follows:

                    Some renderers do not support re-positioning of flac well. If you have this problem you need to create a custom transcoding rule. You first need to find the convert.conf file on your system (on linux this is in /etc/squeezeboxserver). This file contains the rules LMS uses to transcode from one format to another. To add a new rule, create a new file called 'custom-convert.conf' in the same directory and
                    restart LMS. This file should contain (if you copy-paste below,be careful with the indentation):
                    Code:
                    flc flc * *
                        # IR
                        [flac] -cs - -
                    This tells LMS to create a complete new flac file when a flac starts playing or is re-positioned. The LMS File Type for flac should now show flac transcoded to 'flac' rather than 'native'.

                    philippe - is the user guide copied to anywhere on the system when the plugin is used? I also see a few cross-references have errors in them (Erreur ! Source du renvoi introuvable.)
                    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                    Comment


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

                      [QUOTE=PasTim;820655]I had what may be the same problem. I had to add a custom-convert file. The extract from the user guide is as follows:

                      Some renderers do not support re-positioning of flac well. If you have this problem you need to create a custom transcoding rule. You first need to find the convert.conf file on your system (on linux this is in /etc/squeezeboxserver). This file contains the rules LMS uses to transcode from one format to another. To add a new rule, create a new file called 'custom-convert.conf' in the same directory and
                      restart LMS. This file should contain (if you copy-paste below,be careful with the indentation):
                      Code:
                      flc flc * *
                          # IR
                          [flac] -cs - -
                      This tells LMS to create a complete new flac file when a flac starts playing or is re-positionne. The LMS File Type for flac should now show flac transcoded to 'flac' rather than 'native'.

                      philippe - is the user guide copied to anywhere on the system when the plugin is used? I also see a few cross-references have errors in them (Erreur ! Source du renvoi introuvable.)
                      thank you for your feedback, I will try as soon as possible this weekend.
                      Last edited by herve; 2015-06-06, 11:52.

                      Comment


                        #12
                        Originally posted by PasTim View Post

                        philippe - is the user guide copied to anywhere on the system when the plugin is used? I also see a few cross-references have errors in them (Erreur ! Source du renvoi introuvable.)
                        No, it is not copied during local installation. What I can do is add a link to it so that it opens up within the web browser
                        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


                          #13
                          Originally posted by philippe_44 View Post
                          No, it is not copied during local installation. What I can do is add a link to it so that it opens up within the web browser
                          May as well since you produced it. I don't know how useful people will find it, but you never know.....
                          LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                          LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                          Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                          Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                          Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                          Comment


                            #14
                            Originally posted by PasTim View Post
                            May as well since you produced it. I don't know how useful people will find it, but you never know.....
                            Integrated in a 0.2.4 dev version that I will release when I'll have some updates from Scintilla
                            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
                              I will load the plugin and run it with some logging tomorrow. Sorry for delay am working this weekend.

                              Comment

                              Working...
                              X