Announcement

Collapse
No announcement yet.

C-3PO plugin, a trnscoding helper.

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Does anyone use LMS and C-3PO on macOs?

    someone is reporting to me about problems in installing squeezelite and LMS on newer macOs. Is someone using them? what about C-3PO?

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

    Comment


    • Originally posted by marcoc1712

      in the meanwhile, the workaround Is to enable ONE and ONLY ONE output sample rate, this way:
      Hi Marco,

      Thanks for the update. I have tried enabling one single output sample rate for the player but the plugin still remains disabled with the same error in the log during startup and the player will not play anything...

      Are you sure this is related with the player sample rate because I get the same error during server startup even when there is no player connected to the server at all...? so this seems to be independent of any player settings...

      In the meantime I've been running the plugin with the hack described above and it's been running perfectly fine for me, I haven't encountered any issues even if the exe test is overridden....

      Click image for larger version

Name:	Image2.png
Views:	1
Size:	32.7 KB
ID:	1569094

      Click image for larger version

Name:	Image5.png
Views:	1
Size:	35.4 KB
ID:	1569095

      Code:
      [20-06-09 15:49:47.2248] Plugins::C3PO::CapabilityHelper::new (135) unlimitedDsdRate  : undef
      [20-06-09 15:49:47.2252] Plugins::C3PO::Plugin::_initCodecs (823) _initCodecs
      [20-06-09 15:49:47.2253] Plugins::C3PO::PreferencesHelper::_getCurrentVersion (515) C-3PO version is: 20302
      [20-06-09 15:49:47.2254] Plugins::C3PO::PreferencesHelper::_init (79) Prefs version: 20302
      [20-06-09 15:49:47.2255] Plugins::C3PO::Plugin::_initCodecs (836) _refreshCodecs
      [20-06-09 15:49:47.2258] Plugins::C3PO::Plugin::_initCodecs (845) Refreshed codecs       : { aif => "on", alc => "on", dff => "on", dsf => "on", flc => "on", wav => "on" }
      [20-06-09 15:49:47.2263] Plugins::C3PO::EnvironmentHelper::testC3POEXE (142) command: C":\PROGRA~1\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\C-3PO.exe" -h hello -l "C:\ProgramData\Squeezebox\Logs" -x "C:/PROGRA~1/SQUEEZ~1/server"
      [20-06-09 15:49:47.9311] Plugins::C3PO::EnvironmentHelper::testC3POEXE (150) WARNING: 512
      [20-06-09 15:49:47.9322] Plugins::C3PO::EnvironmentHelper::testC3POPL (191) command: C":\Perl\bin\perl.exe" "C:\ProgramData\Squeezebox\Cache\InstalledPlugins\Plugins\C3PO\C-3PO.pl" -h hello -l "C:\ProgramData\Squeezebox\Logs" -x "C:/PROGRA~1/SQUEEZ~1/server"
      [20-06-09 15:49:48.1217] Plugins::C3PO::EnvironmentHelper::testC3POPL (199) WARNING: 512
      [20-06-09 15:49:48.1219] Plugins::C3PO::Plugin::_testC3PO (1134) WARNING: C3PO will not start on call: 
      [20-06-09 15:49:48.1227] Plugins::C3PO::Plugin::_testC3PO (1135) WARNING: Perl path: C:\Perl\bin\perl.exe
      [20-06-09 15:49:48.1230] Plugins::C3PO::Plugin::_testC3PO (1136) WARNING: C-3PO.pl path: C:\ProgramData\Squeezebox\Cache\InstalledPlugins\Plugins\C3PO\C-3PO.pl
      [20-06-09 15:49:48.1234] Plugins::C3PO::Plugin::_testC3PO (1137) WARNING: C-3PO path: C:\PROGRA~1\SQUEEZ~1\server\Bin\MSWin32-x86-multi-thread\C-3PO.exe
      [20-06-09 15:49:48.1238] Plugins::C3PO::PreferencesHelper::_getCurrentVersion (515) C-3PO version is: 20302
      http://www.last.fm/user/amatala

      Comment


      • Originally posted by amatala
        Hi Marco,

        Thanks for the update. I have tried enabling one single output sample rate for the player but the plugin still remains disabled with the same error in the log during startup and the player will not play anything...
        I just did a fresh installation to a brand new Win10 machine and it works to me with only one output sample rate selected. The error message is still there, but it play fine, doing resample and DSP.

        What do you mean with "the plugin still remains disabled"?

        Could you please post your settings and the last executed command?

        THX
        Last edited by marcoc1712; 2020-06-10, 00:34.
        __________________________________________________ ______________________
        Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

        Comment


        • I did fresh installations on both Windows 7 and Windows 10 and had the same problem on both. Now with the settings below it seems to play fine (it didn't seem to like pcm but when using uncompressed flac as output format and only one sample rate selected it is playing fine ), however the message is still there "Unable to run C-3PO transcoder, see server log" and still getting the error during the startup. This is why I assumed the plugin was not actually enabled and doing anything.
          If the last executed command looks fine, does it mean I can safely ignore these errors and all is working fine even if it shows an error?

          Click image for larger version

Name:	Image2.png
Views:	1
Size:	43.0 KB
ID:	1569100
          Click image for larger version

Name:	Image5.png
Views:	1
Size:	45.4 KB
ID:	1569101
          Click image for larger version

Name:	Image6.png
Views:	1
Size:	45.8 KB
ID:	1569102
          Click image for larger version

Name:	Image8.png
Views:	1
Size:	31.6 KB
ID:	1569103
          http://www.last.fm/user/amatala

          Comment


          • Originally posted by amatala
            I did fresh installations on both Windows 7 and Windows 10 and had the same problem on both. Now with the settings below it seems to play fine (it didn't seem to like pcm but when using uncompressed flac as output format and only one sample rate selected it is playing fine ), however the message is still there "Unable to run C-3PO transcoder, see server log" and still getting the error during the startup. This is why I assumed the plugin was not actually enabled and doing anything.
            If the last executed command looks fine, does it mean I can safely ignore these errors and all is working fine even if it shows an error?

            [ATTACH]30666[/ATTACH]
            [ATTACH]30667[/ATTACH]
            [ATTACH]30668[/ATTACH]
            [ATTACH]30669[/ATTACH]
            Yes, the message states that C-3PO converter (that's the executable) won't run (maybe is not the clearest way to state it, any suggestion is appreciated), using only one output rate is the way to avoid it.

            To me both Wav and FLAC works fine, that's quite strange.
            __________________________________________________ ______________________
            Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

            Comment


            • bug

              I'd like to report a bug:
              When using (I guess) the option "use hi precision clock" SoX gives an error of "Invalid syntax of RATE command".
              As an example with this command " [sox] -q -t flac - -t flac -b 24 —buffer 65536 —multi-threaded - gain -h rate -v -M -t -b 95 -f 352800 -D" the problem is the "-f" which i guess is related to "hi precision clock", this option is not documented on sox documentation, removing it will remove the syntax error too.

              Second problem that I have is that while using pcm->dsd conversion works flawlessy (adding fir convolution too); I really can't let pcm upsampling work.

              The options I use are:

              TRANSCODER SETTINGS:
              Enable seek: disable for everything.
              Enable stdin: enabled for everything
              Convert, resample, Addictional effets : enabled for everything
              Automatic headroom: yes

              CONVERT
              Output format: wav

              RESAMPLE:
              Only max sample rate selected, i want a fixed upsample to the max sample rate, all other sr are disabled.
              DSD: unselected
              Target sample rate: closest supported
              Quality: very high
              Phase: intermediate
              All the other options untouched

              ADDITIONAL EFFECTS: untouched

              SPECIAL CASES: untouched

              The resulting string is like this:
              Code:
               [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav -b 16 --buffer 8192 - gain -h rate -q -M -b 90.7 96000 -D
              C-3PO LOG:
              C-3po-log.txt


              SQUEEZELITE LOG
              Code:
              MacBook-Pro-di-Simone:Desktop simonefilippini$ ./squeezelite-macOS -d debug=al-d all=debug
              [15:56:38.073204] stream_init:290 init stream
              [15:56:38.073443] stream_init:291 streambuf size: 2097152
              [15:56:38.073557] output_init_pa:403 init output
              [15:56:38.073569] output_init_pa:415 requested latency: 0
              [15:56:38.124117] output_init_common:346 outputbuf size: 3528000
              [15:56:38.124154] output_init_common:370 idle timeout: 0
              [15:56:38.178993] output_init_common:410 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
              [15:56:38.179011] _pa_open:248 opening device in PlayNice mode
              [15:56:38.181213] _pa_open:268 opened device 1 - Built-in Output at 44100 latency 14 ms
              [15:56:38.181321] decode_init:129 init decode, include codecs:  exclude codecs:
              [15:56:38.181363] register_dsd:906 using dsd to decode dsf,dff
              [15:56:38.181596] load_faad:592 dlerror: dlopen(libfaad.2.dylib, 2): image not found
              [15:56:38.182449] load_vorbis:300 loaded libvorbisfile.3.dylib
              [15:56:38.182459] register_vorbis:329 using vorbis to decode ogg
              [15:56:38.182890] load_flac:266 loaded libFLAC.8.dylib
              [15:56:38.182899] register_flac:294 using flac to decode flc
              [15:56:38.182902] register_pcm:424 using pcm to decode aif,pcm
              [15:56:38.184232] load_mad:383 loaded libmad.0.dylib
              [15:56:38.184242] register_mad:412 using mad to decode mp3
              [15:56:38.184399] discover_server:756 sending discovery
              [15:56:38.184743] discover_server:767 got response from: 172.16.0.139:3483
              [15:56:38.184809] slimproto:849 connecting to 172.16.0.139:3483
              [15:56:38.185094] slimproto:882 connected
              [15:56:38.185230] slimproto:893 local player
              [15:56:38.185238] sendHELO:124 mac: 6c:40:08:b2:24:b6
              [15:56:38.185243] sendHELO:126 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.8.4 (R2),ModelName=SqueezeLite-R2,MaxSampleRate=384000,dsf,dff,ogg,flc,aif,pcm,mp3,loc
              [15:56:38.206965] process:494 strm
              [15:56:38.206983] process_strm:256 strm command q
              [15:56:38.206986] decode_flush:190 decode flush
              [15:56:38.206988] output_flush:423 flush output buffer
              [15:56:38.206991] sendSTAT:171 STAT: STMf
              [15:56:38.207082] process:494 strm
              [15:56:38.207096] process_strm:256 strm command q
              [15:56:38.207101] decode_flush:190 decode flush
              [15:56:38.207104] output_flush:423 flush output buffer
              [15:56:38.207108] sendSTAT:171 STAT: STMf
              [15:56:38.207199] process:494 setd
              [15:56:38.207252] process:494 setd
              [15:56:38.207320] process:494 aude
              [15:56:38.207331] process_aude:395 enable spdif: 1 dac: 1
              [15:56:38.207495] process:494 audg
              [15:56:38.207505] process_audg:413 audg gainL: 3840 gainR: 3840 adjust: 0
              [15:56:38.207510] set_volume:76 setting internal gain left: 65536 right: 65536
              [15:56:39.004355] process:494 strm
              [15:56:39.004385] process_strm:256 strm command t
              [15:56:39.004393] sendSTAT:171 STAT: STMt
              [15:56:44.005101] process:494 strm
              [15:56:44.005133] process_strm:256 strm command t
              [15:56:44.005138] sendSTAT:171 STAT: STMt
              [15:56:47.896569] process:494 strm
              [15:56:47.898981] process_strm:256 strm command q
              [15:56:47.899069] decode_flush:190 decode flush
              [15:56:47.899143] output_flush:423 flush output buffer
              [15:56:47.899396] sendSTAT:171 STAT: STMf
              [15:56:47.921931] process:494 audg
              [15:56:47.922044] process_audg:413 audg gainL: 3840 gainR: 3840 adjust: 0
              [15:56:47.922096] set_volume:76 setting internal gain left: 65536 right: 65536
              [15:56:47.923751] process:494 strm
              [15:56:47.923890] process_strm:256 strm command s
              [15:56:47.923901] process_strm:325 strm s autostart: 1 transition period: 10 transition type: 0 codec: p
              [15:56:47.923906] sendSTAT:171 STAT: STMf
              [15:56:47.923947] codec_open:218 codec open: 'p'
              [15:56:47.923956] pcm_open:405 pcm size: 3 rate: 48000 chan: 2 bigendian: 0
              [15:56:47.923982] stream_sock:384 connecting to 172.16.0.139:9000
              [15:56:47.924119] stream_sock:413 header: GET /stream.mp3?player=6c:40:08:b2:24:b6 HTTP/1.0
              
              
              [15:56:47.924127] sendSTAT:171 STAT: STMc
              [15:56:47.924153] process_strm:357 set fade mode: 0
              [15:56:47.924178] process:494 audg
              [15:56:47.924183] process_audg:413 audg gainL: 3840 gainR: 3840 adjust: 0
              [15:56:47.924187] set_volume:76 setting internal gain left: 65536 right: 65536
              [15:56:47.990803] stream_thread:176 headers: len: 115
              HTTP/1.1 200 OK
              Server: Logitech Media Server (7.9.2 - 1568726655)
              Connection: close
              Content-Type: audio/L16
              
              
              [15:56:47.990886] sendRESP:202 RESP
              [15:56:48.051461] process:494 strm
              [15:56:48.051480] process_strm:256 strm command q
              [15:56:48.051483] decode_flush:190 decode flush
              [15:56:48.051485] output_flush:423 flush output buffer
              [15:56:48.051505] sendSTAT:171 STAT: STMf
              [15:56:49.002636] process:494 strm
              [15:56:49.002667] process_strm:256 strm command t
              [15:56:49.002672] sendSTAT:171 STAT: STMt
              The tab LATEST COMMAND is EMPTY.
              No sound reproduced at all. The track start for 3 seconds and then stop.
              Tested on Linux, BSD, MacOS, same behaviour.
              Using Squeezelite-R2 and modified SoX. Trying the exact same command on SoX converting one file offline is working without any problem. Squeezelite-R2 working for pcm-dsd conversione using C-3PO and reproducing hi-res files without C-3PO too.

              What am I missing?
              Website https://audiodigitale.eu
              Contact me at: [email protected]

              Comment


              • Originally posted by Simonef
                the problem is the "-f" which i guess is related to "hi precision clock", this option is not documented on sox documentation
                Not a direct response to your main question, but FYI, the "-f" option sets rolloff to "allow none" (as opposed to "allow small"). The "use high-precision clock" option is "-t".

                SoX's documentation lags far behind current development. I haven't been able to find the latest syntax for the "rate" (resample) effect anywhere else on the web, so here it is, as I understand it from examining the code:
                rate [<quality-level>] [<override-options>] <rate>

                The higher the quality level, the more compute power is required.

                The quality-level options are as follows. If none is chosen, the default is "-h" (high):
                -q = quick
                -l = low
                -m = medium
                -g = medium-high
                -h = high
                -e = extra
                -v = very high
                -u = ultra

                These quality levels set the resampler parameters to:
                filter phase = linear (50%)
                anti-aliasing bandwidth percentage = 100 (no aliasing above the audio passband)

                bandwidth, noise rejection, bit depth, and allowed passband rolloff are set according to this table:

                quality
                level
                0 dB
                bandwidth
                -3 dB
                bandwidth
                noise
                rejection
                bit
                depth
                rolloff
                allowed
                -q n/a n/a ~30 dB 16 0.35 dB
                -l 68% 80% 96 dB 16 0.35 dB
                -m 91% 95% 96 dB 16 0.35 dB
                -g 91% 95% 96 dB 16 0.01 dB
                -h 91% 95% 120 dB 20 0.01 dB
                -e 91% 95% 144 dB 24 0.01 dB
                -v 91% 95% 168 dB 28 0.01 dB
                -u 91% 95% 192 dB 32 0.01 dB

                The override-options parameters, if provided, will override the values in the above table. In the following list of override options, the options in each group are mutually exclusive. For example, you can use -s, or -b <n>, or -B <n>, or none of those three, but you cannot use any combination of -s, -b, and -B.
                Quality:
                • -Q <0 .. 7> = optional numeric method of specifying quality; numerals correspond to q|l|m|g|h|e|v|u

                Filter Phase:
                • -M = minimum (0%)
                • -I = intermediate (25%)
                • -L = linear (50%)
                • -p <0 .. 100> = specified percentage (values between 50 and 100 are unlikely to be useful)

                Allow Aliasing:
                • -a = above the -3 dB audio passband
                • -A <85 .. 100> = above a specified bandwidth percentage

                Bandwidth (Audio Passband Percentage):
                • -s = -3 dB 99% (steep filter)
                • -b <74 .. 99.7> = -3 dB percentage
                • -B <53 .. 99.5> = 0 dB percentage

                Noise Rejection / Bit Depth:
                • -R <90 .. 200> = noise rejection dB
                • -d <15 .. 33> = bit depth

                Passband Rolloff:
                • -f = 0 dB (no passband rolloff allowed)

                The following override-options parameters are also supported, but they merely change the internal implementation of certain aspects of the resampler. They are for software testing and development, and are not intended to have any effect on the sound:
                -t = use high-precision clock (i.e., use a double-precision floating-point number, rather than a fixed-point Q32.32 number, to express the ratio between output and input sample rates). Apparently intended for testing weird resampler use-cases like continuously variable sampling rates. Has no effect on C-3PO's sampling-rate conversions.

                -i <-1 .. 2> = force a particular coefficient interpolator

                -c <100 .. INT_MAX> = for certain values of the -i parameter, set maximum amount (in approximately kilobytes) of memory used for coefficients

                -n: no small integer optimization
                Last edited by fastfwd; 2020-07-25, 22:57.
                LMS 8.3.0 on Debian Jessie (x86-64)
                Touch w/ EDO --> Benchmark DAC3 HGC --> Counterpoint NPS200 MkII + NPS400 --> Meadowlark Heron
                Touch w/ EDO --> Schiit Bifrost 2/64 --> Eddie Current Aficionado --> Sennheiser HD800 SDR, ZMF Verite Ziricote
                and a third Touch for remote control, and a Radio, and a couple SB3s and a Transporter somewhere

                Comment


                • &quot; Unable to run C-3PO transcoder see server log&quot;

                  I haven't used LMS for awhile because I was able to upsample to DSD256 on my Windows 10 computer with other software. I read today that 3-cpo allows LMS to do that, so I reinstalled LMS and tried to enable the plug-in. Everything else in the installation seems to have gone well, but, when I tried to configure 3-cpo in Advanced Settings, I found this error message: "Unable to run C-3PO transcoder see server log." I looked at the log and have no idea how to decipher it. Here's a snip of it:

                  Click image for larger version

Name:	Annotation 2020-09-02 214142.jpg
Views:	1
Size:	209.8 KB
ID:	1569754

                  Any ideas about a fix? Thanks for your help.

                  Comment


                  • Originally posted by Mike Rubin
                    I haven't used LMS for awhile because I was able to upsample to DSD256 on my Windows 10 computer with other software. I read today that 3-cpo allows LMS to do that, so I reinstalled LMS and tried to enable the plug-in. Everything else in the installation seems to have gone well, but, when I tried to configure 3-cpo in Advanced Settings, I found this error message: "Unable to run C-3PO transcoder see server log." I looked at the log and have no idea how to decipher it. Here's a snip of it:

                    [ATTACH]31447[/ATTACH]

                    Any ideas about a fix? Thanks for your help.
                    And now I have this additional error message: "Squeezelite version is non R2, assuming is compliant. See players."

                    My player is a Sonore Signature Rendu SE, which always has run both LMS, generally, and DSD, specifically, without incident before.

                    Comment


                    • Originally posted by Mike Rubin
                      And now I have this additional error message: "Squeezelite version is non R2, assuming is compliant. See players."

                      My player is a Sonore Signature Rendu SE, which always has run both LMS, generally, and DSD, specifically, without incident before.
                      Squeezelite on Rendu is 1.9.6.1196. I suspect that Squeezelite is a secondary issue, however, as the initial failure to run occurs even before a player is linked to LMS.

                      Comment


                      • Originally posted by Mike Rubin
                        Squeezelite on Rendu is 1.9.6.1196. I suspect that Squeezelite is a secondary issue, however, as the initial failure to run occurs even before a player is linked to LMS.
                        Just for fun, I installed C-3po in LMS 7.9.2 on my Synology DS-218+ NAS just to see if it would run. (I didn’t intend to use it, as that NAS doesn’t have enough cpu power to transcode to DSD.). I did not get the same error message. As the NAS and my PC both are connected to the same router via Ethernet, I assume that the PC’s issues have something to do with its network settings or with Windows 10.

                        Comment


                        • Originally posted by Mike Rubin
                          Just for fun, I installed C-3po in LMS 7.9.2 on my Synology DS-218+ NAS just to see if it would run. (I didn’t intend to use it, as that NAS doesn’t have enough cpu power to transcode to DSD.). I did not get the same error message. As the NAS and my PC both are connected to the same router via Ethernet, I assume that the PC’s issues have something to do with its network settings or with Windows 10.
                          Is there a reason why you upsample to DSD?

                          Sent from my Pixel 3a using Tapatalk
                          Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
                          Bedroom: Radio
                          Bathroom: Radio

                          Comment


                          • Originally posted by slartibartfast
                            Is there a reason why you upsample to DSD?

                            Sent from my Pixel 3a using Tapatalk
                            To my ears and in my system, both Roon and Audirvana sound signicantly better that way. Never tried it with LMS, but I prefer its interface to those two, so want to see if it can be made to sound as good as they do. If it can, I probably would switch most of my listening back to it.

                            Comment


                            • C-3PO and physical sqeezeboxen

                              Its a long thread so after a few pages decided its faster to ask the question.

                              Am I right in assuming/inferring that C-3PO wont work with a Transporter, only squeezlite, even if I use C-3PO to direct upsampled FLAC (44k->96k) to a Transporter?

                              I would have thought that as the PCM inside the FLAC stream was sent at 24/96 that the Transporter would use the FLAC headers as the correct version of the truth rather than the metadata from LMS.

                              Thanks,

                              Peter

                              Comment


                              • Originally posted by posnos
                                Its a long thread so after a few pages decided its faster to ask the question.

                                Am I right in assuming/inferring that C-3PO wont work with a Transporter, only squeezlite, even if I use C-3PO to direct upsampled FLAC (44k->96k) to a Transporter?

                                I would have thought that as the PCM inside the FLAC stream was sent at 24/96 that the Transporter would use the FLAC headers as the correct version of the truth rather than the metadata from LMS.

                                Thanks,

                                Peter
                                If the stream in output is FLAC it should work, it will not it WAV/AIFF due to the feature (sure is not a bug!) in the SB firmware solved by squeezelite.R2 and now in any squeezelite version.
                                __________________________________________________ ______________________
                                Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

                                Comment

                                Working...
                                X
                                😀
                                🥰
                                🤢
                                😎
                                😡
                                👍
                                👎