Announcement

Collapse
No announcement yet.

Announce: CastBridge = integrate Chromecast players with LMS (squeeze2cast)

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

    Announce: CastBridge = integrate Chromecast players with LMS (squeeze2cast)

    > Just checked at least for RP: the protocol handler of RP (the part of
    > the plugin that tells LMS how to stream data for a given source and
    > collect metadata) tells LMS that interactive streams cannot be paused,
    > so LMS stops them. I vaguely remember a simialr thing for Qobuz where
    > (for no good reasons AFAIR) it refuses to pause.


    I think for Qobuz there was a limitation with seeking within https
    streams or something, wasn't there? Something you improved at some point?

    RP is different: The interactive stream is a series of blocks of tracks.
    Handling these blocks is a bit complicated as a block can have many
    tracks. Thus the file length has little to do with the individual track
    length. And RP (at least at the time I implemented it) didn't support
    seeking on their end. Therefore I didn't invest time into making it work.
    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
    Announce: CastBridge = integrate Chromecast players with LMS (squeeze2cast)

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

    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:
    https://downloads.sourceforge.net/project/lms-plugins-philippe44/dev/repo-sf.xml
    Go to the 'Chromecast Bridge' settings to check but it should work, no parameter tweaking is normally needed (it's more simple than UPnP). It will install the bridge application on the LMS machine and run it.

    It should provide pretty much all the features of squeezelite, except synchronization (all you can have is a 2-sec accurate sync start). ChromeCast group of players appear as another LMS player, so it gives synchronization within a CC group

    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 ChromeCast player with almost no modification (except a few tweaks for PCM -uncompressed- and flac).
    • Except for PCM tracks, replay gain, fade in/out/in-out will not work
    • Gapless does not work
    • Supported codecs are ogg, mp3, flac, pcm and aac with limitations - result will vary from track to track


    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 is sent to the ChromeCast player all the time
    • Replay gain, fade in/out/in-out are supported
    • Supported codecs are ogg,mp3,aac,flac,pcm
    • 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 ChromeCast player)


    NB: A port is used to open a webserver (49152 by default, but it might vary up to 49162). Under Windows, you might have a popup (only the very first time the application is started) asking to allow squeeze2cast-win to access your network. In any case:

    !! 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 propably have these ports blocked to the Chromcast player cannot get the audio. In Windows, add a rule authorizing squeeze2cast-win.exe or go into C:\ProgramData\Squeezebox\Cache\InstalledPlugins\P lugins\CastBridge and launch *once* squeezecast-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

    Other tips
    • With docker you must use 'host' mode network

    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.
    Last edited by philippe_44; 2022-12-20, 14:09.
    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


      #3
      Thanks for attempting this. I'm still having some issues here...my LMs Log keeps reporting this: [15-11-13 09:07:53.7618] Plugins::CastBridge::Squeeze2cast::beat (171) crashed ... restarting over and over on Linux (Debian ARM) using the ARMv6_hf binary. I'm off to work now, will test more later today.

      Comment


        #4
        Originally posted by CommanderROR View Post
        Thanks for attempting this. I'm still having some issues here...my LMs Log keeps reporting this: [15-11-13 09:07:53.7618] Plugins::CastBridge::Squeeze2cast::beat (171) crashed ... restarting over and over on Linux (Debian ARM) using the ARMv6_hf binary. I'm off to work now, will test more later today.
        Are you using a raspi ? I'm doing my tests on a B, but LMS is not running on it, just the squeeze2cast-am6hf binary. I've tried standalone on an Odroid C1, a raspiB+ and on a Cubie2 that runs LMS. All worked
        Last edited by philippe_44; 2015-11-13, 08:30.
        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
          It's an Odroid U3. Strangely it worked once (but only showed my FireTV, not the Chromecast Audio devices) but then suddenly stopped. I'll try it again once I get home.

          Comment


            #6
            OK, back home now.

            So...the Plugin seems to load fine, it also finds three devices ,my Amazon FireTV and two devices it just calls "Hash...xxxx"which should then be the CCA units.
            Sadly, it only shows my FireTV as Player in LMS an still spams the LMS log with "crashed - restarting" messages.

            [15-11-13 13:10:25.7510] Plugins::CastBridge::Squeeze2cast::beat (171) crashed ... restarting
            [15-11-13 13:10:37.3794] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:37.4194] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:37.4300] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:37.4368] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:37.4486] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:40.4814] Plugins::CastBridge::Squeeze2cast::beat (171) crashed ... restarting
            [15-11-13 13:10:44.3810] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!
            [15-11-13 13:10:44.4324] Slim::Web::JSONRPC::requestMethod (443) request not dispatchable!

            Something must be missing on my Setup I guess. Or maybe the Players are interfering with each other? Squeeze2Cast Log looks like this:

            [13:15:32.103885] main:1252 Starting squeeze2cast version: v0.1.0.0-dev-2

            [13:15:32.104080] slimproto_loglevel:942 slimproto change log
            [13:15:32.104109] stream_loglevel:293 stream change log
            [13:15:32.104135] output_mr_loglevel:316 output_mr init 3
            [13:15:32.104160] decode_init:125 init decode, include codecs: exclude codecs:
            [13:15:32.104181] WebServerLogLevel:144 webserver change loglevel 3
            [13:15:32.104205] main:1290 Buffer path /tmp
            [13:15:32.159495] uPNPInitialize:841 uPNP init success - 192.168.178.54:49152
            [13:15:32.159589] uPNPInitialize:852 ControlPoint registered
            [13:15:32.159615] uPNPInitialize:863 WebServer enabled
            [13:15:32.159638] uPNPInitialize:874 VirtualDir set for Squeezelite
            [13:15:32.159658] uPNPInitialize:891 Callbacks registered for VirtualDir
            [13:15:36.883624] CallbackEventHandler:583 Answer to uPNP search -1306523000
            [13:15:36.883650] CallbackEventHandler:583 Answer to uPNP search -1307571576
            [13:15:41.826354] CallbackEventHandler:583 Answer to uPNP search -1306521264
            [13:15:41.826379] CallbackEventHandler:583 Answer to uPNP search -1318057264
            [13:15:47.000188] UpdateMRThread:657 Begin Cast devices update
            [13:15:47.037451] UpdateMRThread:744 Updating configuration /var/lib/squeezeboxserver/prefs/castbridge.xml

            Retarting Squeeze2cast after crash: /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/CastBridge/Bin/squeeze2cast-armv6hf -Z -I -f /var/log/squeezeboxserver/castbridge.log -d all=debug -x /var/lib/squeezeboxserver/prefs/castbridge.xml
            [13:15:49.029745] main:1252 Starting squeeze2cast version: v0.1.0.0-dev-2

            Comment


              #7
              OK, some progress here:

              I pulled the plug from my FireTV, and then the ChromeCast devices showed up as players. Apparently the bridge tries to use FireTV as a CC, fails and then crashes.
              Despite that success (workaround for now, will need to find a way to make the Plugin ignore my FireTV) I could not get the CCA to play. It starts and then immediately stops again.

              I then used TuneIn on my Phone to Cast to the CCA in the dining room, which worked perfectly. When I tried to connect with LMS again it failed to show the CCA devices completely. It scans for them, but comes up empty. Will keep trying!

              Comment


                #8
                Installed on Win 10 LMS, has been working flawlessly for the last 6 hours, apart from no replaygain and no gapless, it behaves just like any other Squeezebox.

                I started a shuffled playlist using the web GUI, controlling volume, skip track etc. with SqueezeControl app, on my Android phone, and using same app on my Nexus tablet as a display, 54 tracks in and still going strong.

                Haven't tried to sync.

                Many thanks..
                Attached Files
                Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)

                Lounge - DAC32 - AudioEngine B2
                Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
                Bedroom - Echo Show 8

                Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers

                Comment


                  #9
                  I have two Amazon Fire Tvs and they both showed up in LMS. I tried playing music to them and it didn't work and then it caused my CCA to dissappear as well. I restarted CastBridge and my CCA is working again. I have just turned the Amazon Fire's off in LMS but it would be great if they didn't show up if they aren't going to cooperate. Also, it I have to make sure whatever app I am casting from is fully disconnected before using CastBridge as it won't just take over the CCA when I switch to it. It seems switching between apps causes problems as I now have to restart the bridge to get my CCA to show up again in LMS. It's a bummer that these things can't do gapless, I could have sworn that gapless worked with Google Music but I just tested again with some live concerts I have uploaded and sure enough there are small perceptible breaks between the tracks. Looks like I wont be replacing any of my squeezeplayers with more CCA's just yet.

                  Comment


                    #10
                    Airplay working with the Chromecast?

                    Has anyone tried airplay yet using one of the shairplay plugins? I haven't yet tried to install that plugin on my Windows LMS but am curious if anyone else has and if it is working with the CCA.

                    Comment


                      #11
                      Before I invest in a CCA does it support 24bit/96 and/or 24/192 FLAC ?
                      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


                        #12
                        It supports 24/96, perhaps even 24/192 (not verified).
                        Currently there is a bug that causes everything to resample to 16/48 (when using Optical Out), but that will be resolved in the next few weeks according to Google.

                        Comment


                          #13
                          @usc95

                          How did you turn your FireTVs off in LMS? I'm trying to do the same, but have failed to find a suitable option...

                          Comment


                            #14
                            Originally posted by d6jg View Post
                            Before I invest in a CCA does it support 24bit/96 and/or 24/192 FLAC ?
                            Google's original Chromecast was a runaway success, and now the company is hoping to do for audio streaming what it did for video. The Chromecast…


                            £25.00 at Currys offer until Monday: ~http://www.currys.co.uk/gbuk/tv-and-...0151113193931:
                            Server - LMS 8.4.0 RPi4B 4GB/NanoSound ONE case/pCP 8.1.0 - 75K library, playlists & LMS cache on Sata SSD (ntfs)

                            Lounge - DAC32 - AudioEngine B2
                            Office - RPi 3B+/HiFiBerry DAC HAT/RPi screen - Edifier D12
                            Bedroom - Echo Show 8

                            Spares - 1xSB Touch, 1xSB3, 4xRPi, AVI DM5 speakers

                            Comment


                              #15
                              Originally posted by CommanderROR View Post
                              OK, some progress here:

                              I pulled the plug from my FireTV, and then the ChromeCast devices showed up as players. Apparently the bridge tries to use FireTV as a CC, fails and then crashes.
                              Despite that success (workaround for now, will need to find a way to make the Plugin ignore my FireTV) I could not get the CCA to play. It starts and then immediately stops again.

                              I then used TuneIn on my Phone to Cast to the CCA in the dining room, which worked perfectly. When I tried to connect with LMS again it failed to show the CCA devices completely. It scans for them, but comes up empty. Will keep trying!
                              Normally, you should be able to uncheck the FireTV in the setting page and it then will be ignored by the plugin
                              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

                              Working...
                              X