Announcement

Collapse
No announcement yet.

C-3PO plugin, a trnscoding helper.

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

    #16
    Originally posted by philippe_44 View Post
    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
    Yep, I supposed was like that. But this is not me, is LMS.

    Without C-3PO you should define same rules in custom-convert.conf obtaining same result, then still needing a modfied version of squeezelite.

    Is not clear to me what are you referring with "the -p option -I think- of flac", if you are referring to flac.exe transcoding command, I use something equivalent to:

    flc pcm squeezelite *
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs $START$ $END$ -- $FILE$ |[sox] -q -t wav - -t wav -r 192000 -c 2 -3 -s -L - gain -3 rate -v


    where SOX upsampling parameters hare there if you ask to upsample, othervise the pipe end just before, with FLAC decoding to WAV (I use flac in this case becouse seek capaility is required, if not, I'll use just SOX).

    Is still not clear to meif, how and where you upsample.

    To bad your bridges needs raw pcm, this way they could not receive server side upsampled and decoded streams. Those little devices have too low horse power for heavy upsampling but far enought to just receive and play back hi res streams. Squeezelite-R2 is aimed to power this kind of devices and let use them in high quality systems instead of noisy, power hungry big computers.

    Maybe we could work on this, please ask if you'd like to.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

    Comment


      #17
      Originally posted by marcoc1712 View Post
      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").
      If the current builds work as you intended then checking for 1.8.3 in the squeezelite firmware version should be enough.

      The 1.8.3 version change was specifically for the -W option.
      Last edited by ralphy; 2016-03-09, 15:04.
      Ralphy

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

      Comment


        #18
        Originally posted by PasTim View Post
        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.

        Please read the conversation with philippe_44. The way it use squeezelite inside its bridges require raw pcm streams, that in LMS means no decoding + upsampling server side. No use for C-3PO (or others) in this case
        Originally posted by PasTim View Post
        I really don't understand. I have different players with different needs, so I do not see how I can use the General Settings.
        In the scenario I figured out from your indications you don't need specific player settings other than supported sample rates and choice to resample or decode.

        If this is the case, the values in general settings are valid for all the players and you don't need to change them, checking the "use general settings" box is an helper function that means exactly this.

        Is like to normally have one single address for all the family but name and age for each member. If and when one of them moves to another location, you could specify a new address for him, but all the others still share the same old one. Just aasier than ask you to fill the address for each member.

        p.s.

        Considering what philippe_44 explained about his players needs, too bad I think there is actually no way to feed them with a server side upsampled and decoded stream, C-3PO or not.

        Originally posted by PasTim View Post
        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).
        Sorry, I did not realize you mentioned those specifically, so "Resample when" and" Quality" are the broken settings. Symptoms are you could change them once, but not anymore, or better, they always come back to the old value after applying. Is that correct?

        Is not like this in my installation, but I'll have a better look at this. Thanks for your help.

        I'm aware you sometime have to click twice the button to show/hide parameters, I could not find a reliable solution yet, I'll keep searching.
        __________________________________________________ ______________________
        Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

        Comment


          #19
          Originally posted by PasTim View Post
          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).
          I've tried again, same result. If I set the Global settings to avoid any transcoding/resampling then I can (finally) get squeeze2upnp to work, but I can't get squeezelite-R2 to work with that Global Setting and the player-specific settings simply don't seems to ever stay as I set them. As soon as I Apply, they go back to what they were. There must be some sort of issue there.

          You might want to notice that squeeze2upnp reports itself as being squeezelite (this was to support ickStream if I remember correctly) so C-3PO might be getting confused by having both compliant (R2) and non-compliant players.
          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


            #20
            Originally posted by marcoc1712 View Post
            In the scenario I figured out from your indications you don't need specific player settings other than supported sample rates and choice to resample or decode.

            If this is the case, the values in general settings are valid for all the players and you don't need to change them, checking the "use general settings" box is an helper function that means exactly this.

            Is like to normally have one single address for all the family but name and age for each member. If and when one of them moves to another location, you could specify a new address for him, but all the others still share the same old one. Just aasier than ask you to fill the address for each member.
            I don't know if there's a language problem or I am being really stupid, but I really do not understand. Sorry. If I could get C-3PO settings that work on each device (which seems unlikely now) I will need player-specific settings, so surely I can't tick the 'use general settings'? If I set 'resample' in the general setting and nothing in player-specific then surely it means resample for all players, which won't work for me.

            Sorry, I did not realize you mentioned those specifically, so "Resample when" and" Quality" are the broken settings. Symptoms are you could change them once, but not anymore, or better, they always come back to the old value after applying. Is that correct?

            Is not like this in my installation, but I'll have a better look at this. Thanks for your help.
            It may well apply to all the settings - I haven't tested them all. Where are they stored? I could try editing in place.
            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


              #21
              Just a note: squeeze2upnp assumes that when receiving 'pcm' data, they are in the default LMS mode, i.e. no header. If a transcoding rule forces a wav or aiff header to be added, then it will fail.


              Envoyé de mon iPad en utilisant Tapatalk
              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


                #22
                Originally posted by PasTim View Post
                I've tried again, same result. If I set the Global settings to avoid any transcoding/resampling then I can (finally) get squeeze2upnp to work, but I can't get squeezelite-R2 to work with that Global Setting .
                That's correct.

                Originally posted by PasTim View Post
                and the player-specific settings simply don't seems to ever stay as I set them. As soon as I Apply, they go back to what they were. There must be some sort of issue there.
                All the players has its own different mac address correct? The key for settings is the player id (mac address).

                Originally posted by PasTim View Post
                You might want to notice that squeeze2upnp reports itself as being squeezelite (this was to support ickStream if I remember correctly) so C-3PO might be getting confused by having both compliant (R2) and non-compliant players.
                No, it should not, it should instead give you a warning if you choose to resample and decode to pcm, as only squeezelite is (was) capable to handle this situation,

                This afternoon I had a problem and I'll have no time to check this untill tomorrow. Let me try to simulate your scenario and see what's happening.
                __________________________________________________ ______________________
                Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                Comment


                  #23
                  Originally posted by PasTim View Post
                  I don't know if there's a language problem or I am being really stupid, but I really do not understand. Sorry. If I could get C-3PO settings that work on each device (which seems unlikely now) I will need player-specific settings, so surely I can't tick the 'use general settings'? If I set 'resample' in the general setting and nothing in player-specific then surely it means resample for all players, which won't work for me.

                  It may well apply to all the settings - I haven't tested them all. Where are they stored? I could try editing in place.
                  Sure is my fault with english, but this is what we have:

                  GENERAL SETTINGS:

                  Resaple when: "Always"
                  Resample to "max"

                  PLAYER SETTINGS:

                  PLAYER A:

                  SAMPE RATES: 44100, 48000, 88200, 96000

                  Enable Resample (FLAC) NO
                  Enable Decode (FLAC) NO

                  is exactly the same as setting "Resample when" at Never for that player AND FLAC, you are STILL using general setting, BUT not upsampling nor decoding for that player when input format is FLAC.

                  PLAYER B:

                  SAMPE RATES: 44100, 48000

                  Enable Resample (FLAC) YES
                  Enable Decode (FLAC) YES

                  Think is clear.


                  If, instead, you need to , say, use Ditering for player A and not for all the others, you need to set

                  GENERAL SETTINGS:

                  ...

                  Dithering NO.

                  PLAYER A:

                  Use general settings NO

                  SHOW ->

                  Use dithering YES

                  APPLY


                  FOR ALL OTHER PLAYERS:

                  Use general settings YES.

                  In Your scenario You don't need to change the resampling parameters, but just enable or disable resampling and decoding and this could and should be done using specific per codec settings for every player.

                  Settings are stored in C-3PO.prefs in the .../preference/plugins folder (see info in settings) as c3po.pref I suggest you not to edi the file directly.

                  As said before, I'havent had time to better check why settings are broken for you, i suspect is related to the mac address, could you check please if every player has its own mac address different than 00:00:00:00:00...?
                  __________________________________________________ ______________________
                  Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                  Comment


                    #24
                    Originally posted by philippe_44 View Post
                    Just a note: squeeze2upnp assumes that when receiving 'pcm' data, they are in the default LMS mode, i.e. no header. If a transcoding rule forces a wav or aiff header to be added, then it will fail.

                    Envoyé de mon iPad en utilisant Tapatalk
                    I assume that, as for all other players, is going to work only when STRM and 'real' format is the same, adding a sonore "click" at the beginning, when trying to play the header as a chunk of audio data, in other situations result is impredictable (pops, clicks, with noise, slow motion, fast forward...).

                    That's why C-3PO spots a warning message when the detected player is not Squeezelite-R2 compliant and decode to wav/aiff is selected togheter with resampling. Please consider that the same is going to happen (but without any warning message) if using custom-convert.conf decoding and upasmpling commands.
                    __________________________________________________ ______________________
                    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                    Comment


                      #25
                      Originally posted by marcoc1712 View Post
                      Sure is my fault with english, but this is what we have:

                      GENERAL SETTINGS:

                      Resaple when: "Always"
                      Resample to "max"

                      PLAYER SETTINGS:

                      PLAYER A:

                      SAMPE RATES: 44100, 48000, 88200, 96000

                      Enable Resample (FLAC) NO
                      Enable Decode (FLAC) NO

                      is exactly the same as setting "Resample when" at Never for that player AND FLAC, you are STILL using general setting, BUT not upsampling nor decoding for that player when input format is FLAC.
                      Is 'Enable Resampling' TO the selected (possibly transcoded) output formats or FROM the original formats? I assumed that it was FROM the selected formats since further down you can select the single output (TO) format. Enable Transcoding specifically says for the output format, which seems to duplicate the setting below, which confuses me. There's only one output format isn't there? I think it's obvious to me that I've failed to understand what you are trying to achieve and why the various parameters are as they are.

                      As said before, I'havent had time to better check why settings are broken for you, i suspect is related to the mac address, could you check please if every player has its own mac address different than 00:00:00:00:00...?
                      The MAC addresses are different for all. I did experiment briefly, just now, with editing the prefs directly (as an experiment) and on doing so the changes did remain as I set that way. It was the only way I could get the settings to be under my control, but I know that's not a sensible thing to do and won't do so in future.

                      I really must let this rest now, at least for a while. If it makes sense to use it with squeeze2upnp in future I'll come back to it, but until then it doesn't really serve a purpose for me as far as I can see, and has got me confused and not a little frustrated at myself for being that way. Again - apologies.
                      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


                        #26
                        Originally posted by PasTim View Post
                        Is 'Enable Resampling' TO the selected (possibly transcoded) output formats or FROM the original formats? I assumed that it was FROM the selected formats since further down you can select the single output (TO) format. Enable Transcoding specifically says for the output format, which seems to duplicate the setting below, which confuses me. There's only one output format isn't there? I think it's obvious to me that I've failed to understand what you are trying to achieve and why the various parameters are as they are.

                        The MAC addresses are different for all. I did experiment briefly, just now, with editing the prefs directly (as an experiment) and on doing so the changes did remain as I set that way. It was the only way I could get the settings to be under my control, but I know that's not a sensible thing to do and won't do so in future.

                        I really must let this rest now, at least for a while. If it makes sense to use it with squeeze2upnp in future I'll come back to it, but until then it doesn't really serve a purpose for me as far as I can see, and has got me confused and not a little frustrated at myself for being that way. Again - apologies.
                        Hi Tim - I've not gone through the whole post in details, but is there some specific goal you have ? I can work on making sq2u adaptation for you if you want to
                        LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

                        Comment


                          #27
                          Originally posted by philippe_44 View Post
                          Hi Tim - I've not gone through the whole post in details, but is there some specific goal you have ? I can work on making sq2u adaptation for you if you want to
                          Hi philippe. No, not really. I started looking for a current version of squeezelite (to make sure I could get one when googlecode goes away) and was just trying this out at the same time. After a while I reckoned that C-3PO would only work with upsampling for squeezelite (but am still not sure why it wouldn't work with sq2u if upsampling to flac - if that works). I then got into a muddle I never really got out of, and decided that unless sq2u was fully compatible the exercise was mostly not worth my while since most of my listening is through sq2u (for which still many thanks). If sq2u and C-3PO were compatible, then I might use it to upsample tracks as wav 24/192000 to my M1 CLiC renderer Of course it's possible that wouldn't work due to some renderer limitation but I believe it should (one never knows.....).

                          Having said that, I can't suggest it's worth your effort just for me to play around with, unless others want something like it as well (putting the processing load on the server, although increasing the network load on the renderer). I'm also somewhat concerned that I might get other issues using C-3PO. It seems to disable several transcodings, which could give me other problems. For instance, my M1 CLiC isn't very happy with aac, so I transcode that to flac (for use with the BBC iPlayer).
                          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


                            #28
                            Originally posted by PasTim View Post
                            Is 'Enable Resampling' TO the selected (possibly transcoded) output formats or FROM the original formats?
                            Is Resampling FROM the actual sample rate of the track being played (unkown at the moment of settings) TO the sample rate calculated runtime, considering the "Resample At" setting AND the list of supported sample rate. Take place only if Resample is enabled for the player AND the format (codec) of that track.

                            Is Transcoding FROM the actual format of the track being played, always TO the format selected in "Output format" setting. Take place only if Transcoding is enabled for the player AND the format (codec) of that track.

                            If you need player A always transcode to WAV and Player B always transcode to Aiff, then you need to use specific player settings, if you just need palyer B not to trascode, but mantain in output same codec than in input, just disable transcoding for player B and all imput codecs, no needs to specify "Output format" per player in this case.
                            Last edited by marcoc1712; 2016-03-10, 18:27.
                            __________________________________________________ ______________________
                            Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                            Comment


                              #29
                              Originally posted by PasTim View Post
                              Hi philippe. No, not really. I started looking for a current version of squeezelite (to make sure I could get one when googlecode goes away) and was just trying this out at the same time. After a while I reckoned that C-3PO would only work with upsampling for squeezelite (but am still not sure why it wouldn't work with sq2u if upsampling to flac - if that works). I then got into a muddle I never really got out of, and decided that unless sq2u was fully compatible the exercise was mostly not worth my while since most of my listening is through sq2u (for which still many thanks). If sq2u and C-3PO were compatible, then I might use it to upsample tracks as wav 24/192000 to my M1 CLiC renderer Of course it's possible that wouldn't work due to some renderer limitation but I believe it should (one never knows.....).

                              Having said that, I can't suggest it's worth your effort just for me to play around with, unless others want something like it as well (putting the processing load on the server, although increasing the network load on the renderer). I'm also somewhat concerned that I might get other issues using C-3PO. It seems to disable several transcodings, which could give me other problems. For instance, my M1 CLiC isn't very happy with aac, so I transcode that to flac (for use with the BBC iPlayer).
                              Just two notes:

                              1. C-3PO isn't disabling anything, it just leave LMS handle Lossy codecs 'as usual', as if it was not there. You could arrange to decode aac to flac via custom-convert.conf (or any other way you are used to) no matter if C-3PO is installed or not.

                              I personally don't think is a valuable practice to upsample or decode lossy formats, that's why is not in C-3PO, but this is up to you.

                              Anyway, adding support to other codecs in C-3PO it's feasible, if there is a real needs I could think about it.

                              2. C-3PO could upsample and encode to flac (this is what is going to happen: decode to pcm, upsample, encode pcm to flac) and in that case LMS is also producing correct strm messages. Any player capable to play flac at that output sample rate and bit depth could play that stream, included 'normal' versions of squeezelite.

                              Was the 'normal' way we used to upsample server side before squeezelite-R2.

                              I personally think is quite a waste of power (you then have your client decode a much bigger stream to pcm, in order to play it), but is still there.
                              __________________________________________________ ______________________
                              Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                              Comment


                                #30
                                Originally posted by marcoc1712 View Post
                                Is Resampling FROM the actual sample rate of the track being played (unkown at the moment of settings) TO the sample rate calculated runtime, considering the "Resample At" setting AND the ist of supported sample rate. Take place only if Resample is enabled for the player AND the format (codec) of that track.
                                So the codecs listed next to Enable Resampling are the FROM codecs? ie only Resample for tracks that are already in the codecs listed on the same line?
                                Is Transcoding FROM the actual format of the track being played, always TO the format selected in "Output format" setting. Take place only if Transcoding is enabled for the player AND the format (codec) of that track.
                                So the codecs listed next to Enable Transcoding are the FROM codecs? ie only Transcode for tracks that are already in the codecs listed on the same line? That's not how I read the information tip on the GUI, which may be one cause of my puzzlement.
                                If you need player A always transcode to WAV and Player B always transcode to Aiff, then you need to use specific player settings, if you just need palyer B not to trascode, but mantain in output same codec than in input, just disable transcoding for player B and all imput codecs, no needs to specify "Output format" per player in this case.
                                I think I may now understand. Thanks.
                                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