Announcement

Collapse
No announcement yet.

C-3PO plugin, a trnscoding helper.

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

    C-3PO plugin, a trnscoding helper.

    >> You should just put this:
    >> https://github.com/marcoc1712/squeez...ezelite-R2-osx
    >> somewhere in your system give correct permission to it and run it.

    >
    > I downloaded this exact file you mention. It downloaded as .dms


    Remove the .dms extension and make it executable by running "chmod a+x
    ~/Downloads/squeezelite-R2-osx" in the terminal window (make sure you
    pick the right path, should it no longer be in your downloads folder.

    --

    Michael
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

    #2
    C-3PO plugin, a transcoding helper.

    Hi,

    Last year I released squeezelite in a modified version called 1.8.2 (R2), that always inspects the pcm file headers to detect the real sample rate, depth and endianness, enabling the server side decoding to pcm and upsampling.

    This was previously impossible due to LMS always send 44100 as sample rate information for an upsampled pcm stream, so we needed to upsample then convert back in flac on the server, receive the stream (and convert it to pcm) on the client side and play it, or let squeezelite upsample it.

    Since that time, Squeezelite-R2 (so called for mnemonics) has been included in Daphile and Audiolinux and is used by other people in Debian, Win and macOsx systems. Here you could get more information about squeezelite-R2 and download it: https://github.com/marcoc1712/squeezelite-R2/releases.

    Squeezelite-R2 make possible to stream upsampled pcm startinf from any format in the server (and even remote stream services, like Qobuz), but as a long term squeezebox server user I missed a tool to handle those tasks in an easier way than using convert.conf files and file type conversion settings.

    That's why I've released C-3PO plugin that make it possible simply using two settings pages.

    Here the first (general):

    Click image for larger version

Name:	c3po_1.jpg
Views:	1
Size:	88.8 KB
ID:	1560472

    and here the player specific:

    Click image for larger version

Name:	c3po_2.jpg
Views:	2
Size:	99.7 KB
ID:	1560473

    I hope options are self explanatory, but I will comment them in details in next posts.

    To install C-3PO plugn, just add http://www.marcoc1712.it/downloads/repository.xml to your Plugin sources in the Server, Settings, Plugins page, then restart the server. when requested.

    More information here: https://github.com/marcoc1712/C-3PO/releases

    Thanks,

    Marco.
    Last edited by marcoc1712; 2016-03-07, 21:26.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

    Comment


      #3
      General settings

      Please remmber that C-3PO is not adding any functionality or capability to LMS, other than a better integrated interface over File type conversions and custom-convert.conf file, but everything it does was already here before.

      Or better, almost everything, one is new: the capability to program the runtime conversion based on the characteristics (i.e sample rate) of the track being played.

      To archive that, C-3PO has to know:

      a. witch input formats has to be converted
      b. to what output format.

      c. If and when to resample.
      d. to what sample rate.

      Since is using SOX to perform resample, it also need to know the parameters to use.

      Use the page in Advanced settings for this.

      NOTE:

      Those parameters are valid for all and any player (unless you force them by single player, see below) so be sure players are capable to play streams so defined.

      Pay particular attention to:

      a. Output format: use WAV and AIFF only with Squeezelite-R2 compliant players, if resampling.
      b. Bit-depth: must be lower or equal the player capability.
      c. Additional effects: this is a 'free' text field, be sure to enter only valid SOX effects.
      Last edited by marcoc1712; 2016-03-07, 23:40.
      __________________________________________________ ______________________
      Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

      Comment


        #4
        Player Settings

        Settings defined in the Advanced Setings page relay on specific Player capabilities and preferences, that are defined in the Settings, Player, C-3PO page:

        Click image for larger version

Name:	c3po_2.jpg
Views:	2
Size:	99.7 KB
ID:	1560474

        Default values comes form the player model capabilities, but you could refine and restrict the selection.

        Supported Sample Rates is used toghether with general settings to define the target sample rate of the stream.

        Supported codecs is unmodifiable, since depends on player model and C-3PO capabilities, buf for every codec (format) you could enable or disable:

        a. transcoding to the general settings output format.
        b. resampling

        disabling both is same to disable the format.


        You then have two more capabilities:

        c. seek
        d. standard input

        They are a little tricky, but in short they correspond to the "T" and "I" capabilities we used to use in convert.conf file. Firts is needed to seek inside a stream (i.e to reach a track in a cue sheet), second is used by many external source applications, like Qobuz plugin, or CDPlay or...

        Too bad, LMS could not have seek and standard Input enabled toghether when transcoding, so we must choose. Since streaming services like Qobuz use flac and people normaly use cue sheets with WAV, the default is to enable seek for WAV and stdIn for Flac, here is where you could change it.

        Hope is clear enought, but if you don't use .cue sheets or Qobuz, just don't mind.

        That's all is needed in normal scenarios.
        Last edited by marcoc1712; 2016-03-07, 22:11.
        __________________________________________________ ______________________
        Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

        Comment


          #5
          Changing general settings by player

          If you have very specific requirement and need different upsampling methods for specific players, you should use general setting as intended for 'normal' cases, then you could 'force' same settings but just for the players you need.

          to do this, just uncheck the Use global settings box and click "show":

          Click image for larger version

Name:	c3po_3.jpg
Views:	1
Size:	70.6 KB
ID:	1560475

          Tthen you have a private copy of the general settings to be used with the specific player.

          that's all.

          Some more info about Squeezelite-R2, C-3PO and falcon (a web interface for squeezelite) is found here: www.marcoc1712.it, too bad in italian language only at the moment.
          __________________________________________________ ______________________
          Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

          Comment


            #6
            Originally posted by marcoc1712 View Post
            Since that time, Squeezelite-R2 (so called for mnemonics) has been included in Daphile and Audiolinux and is used by other people in Debian, Win and macOsx systems. Here you could get more information about squeezelite-R2 and download it: https://github.com/marcoc1712/squeezelite-R2/releases.
            I've included this capability with my squeezelite builds 1.8.3-709 and newer.
            The feature is off by default, you need to add -W to the command line options to enable it.
            Code:
            -W    Read format from wave and aiff file headers, ignore server parameters
            When you first asked me about the change I was reluctant to incorporate it. However, I felt is was unfair not to add it after adding other enhancements for picoreplayer.
            Ralphy

            1-Touch, 5-Classics, 3-Booms, 2-UE Radio
            Squeezebox client builds donations always appreciated.

            Comment


              #7
              Originally posted by ralphy View Post
              I've included this capability with my squeezelite builds 1.8.3-709 and newer.
              The feature is off by default, you need to add -W to the command line options to enable it.
              Code:
              -W    Read format from wave and aiff file headers, ignore server parameters
              When you first asked me about the change I was reluctant to incorporate it. However, I felt is was unfair not to add it after adding other enhancements for picoreplayer.
              Great! Is like that for ANY build? I'll add a notice in gitHub and other places, that is exactly what I was meaning when asking you to have just one 'common' repository. More than Happy you decided to do it.

              By the way, are You still using "squeezelite" both for model name and model type? I use "squeezelite-R2" in model name just to inform the server (C-3PO) that the player is enabled to receive upsampled pcm streams, just to avoid errors, but sure I could change, just let me know what to test to identify your versions (I think 1.8.3 is not enought, you never know if other branches use the same version code, that's why I introduced R2 identifier as Daphile use "daphile").

              I'll have a try of your version on RPI soon.

              EDIT: Where should I find 1.8.3-709 builds for Win and OsX ? thanks.

              regards.

              Marco.
              Last edited by marcoc1712; 2016-03-08, 15:23.
              __________________________________________________ ______________________
              Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

              Comment


                #8
                Hi Marco,

                All my files are stereo (a few mono) flacs, from 16/44100 to 24/192000.

                For squeezelite-R2 I mostly use a Meridian Explorer DAC, and started it using options -r 192000 -u hLE. The DAC indicates it's getting a 24/192000 feed - whether FLAC or PCM I don't know for sure, but I assume flac when not running C-3PO. Using C-3PO I got crackling and all sorts, even on 16/44100 tracks, whatever settings I tried. Today I tried starting squeezelite using -u vHX and it seems to be working much better with C-3PO. Is it possible that the squeezelite-R2 command line options need to match C-3PO in some fashion?

                Several player parameters never seem to stick. So, for instance, no matter what I set 'Quality' to it always seems to be reset to 'High' for this player. The same is true for the 'Resample' parameter. Why would that be?



                For squeeze2upnp I use 2 renderers. One will take flac or pcm to 24/192000, but I have no upsampling set, just conversion to pcm (no wav header) so the server does the conversion work. For the other it seems to prefer wav (ie pcm plus with a proper wav header) or flac, up to 24/96000. I got neither device to work at all with C-3PO.

                I probably don't really need this plugin, but if you want me to test things for your and other's benefits I'll happily do so.
                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


                  #9
                  Originally posted by PasTim View Post
                  Hi Marco,

                  All my files are stereo (a few mono) flacs, from 16/44100 to 24/192000.

                  For squeezelite-R2 I mostly use a Meridian Explorer DAC, and started it using options -r 192000 -u hLE. The DAC indicates it's getting a 24/192000 feed - whether FLAC or PCM I don't know for sure, but I assume flac when not running C-3PO. Using C-3PO I got crackling and all sorts, even on 16/44100 tracks, whatever settings I tried. Today I tried starting squeezelite using -u vHX and it seems to be working much better with C-3PO. Is it possible that the squeezelite-R2 command line options need to match C-3PO in some fashion?.
                  Be aware that you should avoid to resample both on player and on server, using C-3PO, you should NOT use -u options launching squeezelite anymore.

                  Did you restarted the DAC after enabling C-3PO (and so changing the output fomat)? that's probably why today, after a restart, things went better.

                  Assuming you want to play everything at 192KHz/24bit, try this:

                  GENERAL SETTINGS:

                  Supported formats: be sure to select AT LEAST Flac.

                  Resample "Always"
                  Target sample rate "Max supported"
                  Output format "WAV"

                  bit-depth 24 (3).


                  Please leave all the others at default value.


                  PLAYER SETTINGS:

                  Select the Meridian Explorer DAC attached Squeezelite-R2 player, then set:

                  Supported Sample Rates: be sure 192KHz is the maximum value checked for the player, you could add ANY lower value but NOT higher, is important.

                  Enable Transcoding and Resampling for FLAC.
                  Live the others at Default values at the moment.

                  Please check the "use general settings" box and apply changes.


                  SQUEEZELITE-R2 COMMAND LINE:

                  here a sample and safe command line, but You could try to adjust buffers (-b) if still get pop and clicks.

                  Squeezelite-R2 -o (what you normally use) -a 100:3:24:1 -b 8192:8192 -r 192000:192000

                  Pleas dont add -u option, the server is going to upsample to 192000Hz, 24 bit and decode to WAV.

                  Please restart the DAC and Squeezelite with the new command line and try to play a flac 44100/16 or 192000/24 file, you should see squeezelite rreceive WAV 192KHz/24bit in both case.

                  Forgot tio ask: are you using a wired network, correct? If not, be aware that where flac 44.1/16 is using less than 1 Mb/s, Wav 192/24 is at least 5 times the traffic, so be sure you have enougth bandwidth.

                  Originally posted by PasTim View Post
                  Several player parameters never seem to stick. So, for instance, no matter what I set 'Quality' to it always seems to be reset to 'High' for this player. The same is true for the 'Resample' parameter. Why would that be?.
                  Not sure to well understand. Do you mean that setting quality in the general settings (or in the player setting after uncheking the use general setting box) is not working? In that case are you sure to always 'apply' changes before leave the page?

                  Or you meant you don't see changes reflected to squeezelite? In that case is correct, as said before, you should NOT use -u option in squeezelite anymore.

                  Could you please better elaborate?

                  Originally posted by PasTim View Post
                  For squeeze2upnp I use 2 renderers. One will take flac or pcm to 24/192000, but I have no upsampling set, just conversion to pcm (no wav header) so the server does the conversion work. For the other it seems to prefer wav (ie pcm plus with a proper wav header) or flac, up to 24/96000. I got neither device to work at all with C-3PO.
                  Assuming your general settings are as explained before, to strictly archive what you describe you have to:

                  a. select PLAYER ONE and:

                  Supported Sample Rates: be sure 192KHz is the only value checked.

                  Enable Transcoding for FLAC.
                  Disble Resampling for FLAC.

                  Live the others at Default values at the moment.
                  Please check the "use general settings" box and apply changes.

                  This way ONLY 192Khz flac files will be converted to WAV (there is no support for raw PCM in LMS) and sent to Squeezelite, files with other samplerate will be refused (seems to me is to strict, if you want to allow any samplerate decode and playback but not resampling till 192KHz, check as supported all samplerates starting from 44100 to 192Khz).

                  b. select PLAYER TWO and:

                  Supported Sample Rates: check ALL frequencies from 44100 to 96000, be sure nothing higher.

                  Enable Transcoding for FLAC.
                  Enable Resampling for FLAC.

                  Live the others at Default values at the moment.
                  Please check the "use general settings" box and apply changes.


                  Originally posted by PasTim View Post
                  I probably don't really need this plugin
                  Is not clear to me how you today arrange to decode and upsamlìple, if in LMS using custom-convert.conf file, you could find C-3PO usefull just becouse is easier to use, if by the playrs, no, you don't need C-3PO at all.

                  C-3PO is born to perform decode and upsampling SERVER SIDE, in order to need and use really low power by the client.


                  Originally posted by PasTim View Post
                  but if you want me to test things for your and other's benefits I'll happily do so.
                  Tester are always welcome, but use of C-3PO make sense only in place of custom-convert.conf file and "File Type" conversion settings on LMS. If you are using them now, You'll probably find C-3PO easier and valuable, if not you'll probably fint it difficult and useless, just becouse you don't know how boring is using the others.

                  Hope is more clear now, please try the settings I've posed, then please report if they works for you or not, or - if I misandestood - please post here your actual custom-convert.conf file and I'll try to replicate it in C-3PO settings.

                  Marco
                  __________________________________________________ ______________________
                  Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                  Comment


                    #10
                    Originally posted by marcoc1712 View Post
                    Be aware that you should avoid to resample both on player and on server, using C-3PO, you should NOT use -u options launching squeezelite anymore.

                    Did you restarted the DAC after enabling C-3PO (and so changing the output fomat)? that's probably why today, after a restart, things went better.

                    Assuming you want to play everything at 192KHz/24bit, try this:

                    GENERAL SETTINGS:

                    Supported formats: be sure to select AT LEAST Flac.

                    Resample "Always"
                    Target sample rate "Max supported"
                    Output format "WAV"

                    bit-depth 24 (3).


                    Please leave all the others at default value.


                    PLAYER SETTINGS:

                    Select the Meridian Explorer DAC attached Squeezelite-R2 player, then set:

                    Supported Sample Rates: be sure 192KHz is the maximum value checked for the player, you could add ANY lower value but NOT higher, is important.

                    Enable Transcoding and Resampling for FLAC.
                    Live the others at Default values at the moment.

                    Please check the "use general settings" box and apply changes.


                    SQUEEZELITE-R2 COMMAND LINE:

                    here a sample and safe command line, but You could try to adjust buffers (-b) if still get pop and clicks.

                    Squeezelite-R2 -o (what you normally use) -a 100:3:24:1 -b 8192:8192 -r 192000:192000

                    Pleas dont add -u option, the server is going to upsample to 192000Hz, 24 bit and decode to WAV.

                    Please restart the DAC and Squeezelite with the new command line and try to play a flac 44100/16 or 192000/24 file, you should see squeezelite rreceive WAV 192KHz/24bit in both case.

                    Forgot tio ask: are you using a wired network, correct? If not, be aware that where flac 44.1/16 is using less than 1 Mb/s, Wav 192/24 is at least 5 times the traffic, so be sure you have enougth bandwidth.



                    Not sure to well understand. Do you mean that setting quality in the general settings (or in the player setting after uncheking the use general setting box) is not working? In that case are you sure to always 'apply' changes before leave the page?

                    Or you meant you don't see changes reflected to squeezelite? In that case is correct, as said before, you should NOT use -u option in squeezelite anymore.

                    Could you please better elaborate?



                    Assuming your general settings are as explained before, to strictly archive what you describe you have to:

                    a. select PLAYER ONE and:

                    Supported Sample Rates: be sure 192KHz is the only value checked.

                    Enable Transcoding for FLAC.
                    Disble Resampling for FLAC.

                    Live the others at Default values at the moment.
                    Please check the "use general settings" box and apply changes.

                    This way ONLY 192Khz flac files will be converted to WAV (there is no support for raw PCM in LMS) and sent to Squeezelite, files with other samplerate will be refused (seems to me is to strict, if you want to allow any samplerate decode and playback but not resampling till 192KHz, check as supported all samplerates starting from 44100 to 192Khz).

                    b. select PLAYER TWO and:

                    Supported Sample Rates: check ALL frequencies from 44100 to 96000, be sure nothing higher.

                    Enable Transcoding for FLAC.
                    Enable Resampling for FLAC.

                    Live the others at Default values at the moment.
                    Please check the "use general settings" box and apply changes.




                    Is not clear to me how you today arrange to decode and upsamlìple, if in LMS using custom-convert.conf file, you could find C-3PO usefull just becouse is easier to use, if by the playrs, no, you don't need C-3PO at all.

                    C-3PO is born to perform decode and upsampling SERVER SIDE, in order to need and use really low power by the client.




                    Tester are always welcome, but use of C-3PO make sense only in place of custom-convert.conf file and "File Type" conversion settings on LMS. If you are using them now, You'll probably find C-3PO easier and valuable, if not you'll probably fint it difficult and useless, just becouse you don't know how boring is using the others.

                    Hope is more clear now, please try the settings I've posed, then please report if they works for you or not, or - if I misandestood - please post here your actual custom-convert.conf file and I'll try to replicate it in C-3PO settings.

                    Marco
                    Thanks - that's a lot of information for me to process in one go. Apologies if I haven't done what you asked, but some of what you ask doesn't seem to work at all, notably changing specific settings.

                    When I said settings don't 'stick', I have a problem in that when I change several of the player-specific settings, and apply, next time I look at the settings they have reverted to what they were before. Until I can rely on the changes I make, all my attempts will fail. I can't even disable everything for some players, so I can't live with the plugin at all (I just get noise using squeeze2upnp players).

                    I'm assuming that because my players are so different the general settings are irrelevant. I do not understand when you seem to suggest changing player-specific settings and then tick 'use general settings' - surely if they are 'specific' they are not 'general'?

                    You say LMS doesn't support pcm. Well my understanding (using squeeze2upnp) is that it does. Looking at the standard flac file type settings, the option is convert to pcm, not to wav. In fact, as I understand it, the developer of that plugin had to specifically add wav headers for players that could not handle raw pcm.

                    As to not using the squeezelite options, I think it clarifies that I am wasting your time - I'm just not getting where this is coming from or going to - sorry - I am not very clever at this stuff. In my case squeezelite and LMS are, usually, on the same machine. So I think it's best if we just drop this conversation. You are better off testing with someone who understands LMS, and audio, much better than I do and can help you with what you are doing. I'm sure it's really good for some situations, but I'm too dim to make it work. Sorry for wasting your time.
                    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
                      Originally posted by PasTim View Post
                      Thanks - that's a lot of information for me to process in one go. Apologies if I haven't done what you asked, but some of what you ask doesn't seem to work at all, notably changing specific settings.

                      When I said settings don't 'stick', I have a problem in that when I change several of the player-specific settings, and apply, next time I look at the settings they have reverted to what they were before. Until I can rely on the changes I make, all my attempts will fail. I can't even disable everything for some players, so I can't live with the plugin at all (I just get noise using squeeze2upnp players).

                      I'm assuming that because my players are so different the general settings are irrelevant. I do not understand when you seem to suggest changing player-specific settings and then tick 'use general settings' - surely if they are 'specific' they are not 'general'?

                      You say LMS doesn't support pcm. Well my understanding (using squeeze2upnp) is that it does. Looking at the standard flac file type settings, the option is convert to pcm, not to wav. In fact, as I understand it, the developer of that plugin had to specifically add wav headers for players that could not handle raw pcm.

                      As to not using the squeezelite options, I think it clarifies that I am wasting your time - I'm just not getting where this is coming from or going to - sorry - I am not very clever at this stuff. In my case squeezelite and LMS are, usually, on the same machine. So I think it's best if we just drop this conversation. You are better off testing with someone who understands LMS, and audio, much better than I do and can help you with what you are doing. I'm sure it's really good for some situations, but I'm too dim to make it work. Sorry for wasting your time.
                      Don't worry, you are welcome, but let me abuse a little more of yor patient:

                      We have General settings and Player Specific Settings in different pages.

                      For each player you could decide to use the general settings (normal situation, as I was asking You to do) OR enable the capability to change same settings that you have in 'general' but for the specific player. This is done by unchecking the "use general settings" box. This is normally not necessary, and it was not in my advice in the last post.


                      When you state: " I have a problem in that when I change several of the player-specific settings, and apply, next time I look at the settings they have reverted to what they were before." wich specific setting are you referring?

                      Seems like a big bug, but I can't replicate it, could you please name one specific setting that's broken that way?

                      ---
                      FIY:

                      WAV vs PCM in LMS is a bit confusing. Sometime it name it PCM and sometime WAV, but what is streamed is wav (or aiff), this is what I realized and moved me to modify squeezelite. If it where raw pcm I had no chance.

                      I'll have a look to the plugin you mention, sound strange to me, but if it does what you say, for sure it could not work with upsampled PCM/WAV/AIFF stream: what information is writing to the header? If it trust LMS, is wrong, how is it guessing them? That, indeed, explain why it does not work with C-3PO (and will not work with custom-convert.conf too). To stream and decode WAV (or AIFF or PCM) you need the modified version of squeezelite, that trust on the fact that the stream ALWAIS contains a valid header and don't care what LMS reports.

                      The only other way is make LMS report the correct format info in the steam information block sent to the player.

                      ---

                      If you have squeezelite and LMS on the same machine, best is to use "Local player plugin" and nothing more.

                      Regards, Marco.
                      __________________________________________________ ______________________
                      Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                      Comment


                        #12
                        Originally posted by marcoc1712 View Post
                        WAV vs PCM in LMS is a bit confusing. Sometime it name it PCM and sometime WAV, but what is streamed is wav (or aiff), this is what I realized and moved me to modify squeezelite. If it where raw pcm I had no chance.
                        Did you change a protocol handler to do that ? Because, by default, when the $formatbyte in the strm message is 'p', LMS sends raw PCM with no header of any kind - just a blob of bytes. The SlimProto header of strm contains information about sample size, rate, endianness so that the player knows. One bug, as we discussed before, is that on transcoded live streams, LMS sets rate and size @ 44.1/16 regardless and that does not work very well
                        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
                          Did you change a protocol handler to do that ? Because, by default, when the $formatbyte in the strm message is 'p', LMS sends raw PCM with no header of any kind - just a blob of bytes. The SlimProto header of strm contains information about sample size, rate, endianness so that the player knows. One bug, as we discussed before, is that on transcoded live streams, LMS sets rate and size @ 44.1/16 regardless and that does not work very well
                          Nope, LMS is untouched.

                          You are right, but only when talking about 'native' (?) raw PCM.

                          When transcoding, in case of pcm output (and wav is handled exactly as pcm) LMS try to look at the track/original file for sample rate to be sent to players via strm message, using 44100 as default value if not found (i.e. in case or remote streams), no matter if a resample took place.

                          Here is the bug:

                          a. the transcoding command is a 'black box', LMS just know the incoming (track, stream or file) and the outcoming (stream), no others. Somehow correct.

                          b. When the outcoming stream is (raw) PCM it has no header, then we could not inspect it. As a fault back we get sample rate from incoming (or use default 44100/16 L). Debatable, I'll preffer at least upsampling where disabled when output is (raw) pcm.

                          c. WAV is PCM, so we could not inspect the wav header to get sample rate. That's WRONG and here is the confusion, WAV is PCM, but is not RAW PCM.

                          Not brave enought to engage a fight to change this in LMS, where it should be, but fortunally LMS streams the result of the transcoding command as is, with header if wav, still using 'p' as format in the strm message, then the workaround is to always 'transcode' to WAV or AIFF i(i.e. with C-3PO) and let player inspect the header.

                          But, accordingly to slimproto, when the format is 'p' there should be no header in the stream (WRONG ASSUMPTION, see point c) then all the players but Squeezelite-R2 (and from now on ralphy versions used with -W option) trust strm message about sample rate and forget the header, resulting they could not play server side upsampled wav (or aiff) streams.

                          Hope is clearer.
                          __________________________________________________ ______________________
                          Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                          Comment


                            #14
                            I think it is, let me try - you create systematically transcoding rules where, contrary to the build-in ones, you do not ask the transcoder to output raw PCM (eg the -p option -I think- of flac), you ask it to output wav or aif (which are PCM with a header) and LMS bravely output the transcoded result as a blob so you end up in a stream with a wav/aif header that you decode at the other end, but you need a compatible player. This is a clever trick but my bridges (upnp, chromecast, AirPlay) use a very heavily modified version of squeezelite that expects PCM as raw, hence I guess the confusion with PasTim
                            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
                              Originally posted by marcoc1712 View Post
                              Don't worry, you are welcome, but let me abuse a little more of yor patient:

                              We have General settings and Player Specific Settings in different pages.

                              For each player you could decide to use the general settings (normal situation, as I was asking You to do) OR enable the capability to change same settings that you have in 'general' but for the specific player. This is done by unchecking the "use general settings" box. This is normally not necessary, and it was not in my advice in the last post.


                              When you state: " I have a problem in that when I change several of the player-specific settings, and apply, next time I look at the settings they have reverted to what they were before." wich specific setting are you referring?

                              Seems like a big bug, but I can't replicate it, could you please name one specific setting that's broken that way?


                              ---

                              If you have squeezelite and LMS on the same machine, best is to use "Local player plugin" and nothing more.

                              Regards, Marco.
                              I really don't understand. I have different players with different needs, so I do not see how I can use the General Settings. Currently I can't even get squeeze2upnp to work at all with C-3PO so need to try to set player-specific settings. But they don't work either.

                              I did mention two parameters that did not work before, but I'll do so again. With squeezelite-R2 (still started with -u because I can't use C-3PO other than to check a few things for you and I don't want to have to chop and change that setting every time), I proceed as follows. I go to the player, make sure 'use global' is not ticked. I press 'show/hide' (I often have to do this twice to see the settings). I select the Resample box and change the setting to, say ' Always' from 'Only when samplerate is not supported'. I save. The player settings disappear so I have to press show/hide again (twice). The settings I change has not taken effect. The same is true of Quality. I always get 'High' whatever I change it to. The 'Use Global' is still not ticked (and in fact the general settings are different from this).
                              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

                              Working...
                              X