Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Dec 2017
    Posts
    17

    downsampling files beyond 96/24 on the fly

    Hello,

    I have searched the forum before posting my particular question but couldnĺt find a clear answer as most of those threads I found were related to old Logitech hardware like SBT.

    I have LMS running on a NAS streaming audio to an RPi with picoreplayer. Picoreplayer again feeds audio via SPDIF HAT to an old R2R DAC which accepts 96/24 maximum.

    My library has only very few highres files (most of it being CD resolution), nevertheless I would like to have LMS on my NAS downsample all files beyond 96/24 in such way on the fly: 192/24 to 96/24 and 176.4/24 to 88.2/24 and everything else being left untouched.

    Is there a setting available in LMS to do just that? Or do I have to change some config files as I read in some SBT related threads?

    Best regards
    Stefan

    P.S. Sorry if that topic might have been discussed already, a link to a relevant thread is welcome as well of course!
    P.P.S. picoreplayer is set to prefer PCM streams as input in case that should matter

  2. #2
    Senior Member Mnyb's Avatar
    Join Date
    Feb 2006
    Location
    Vństerňs Sweden
    Posts
    16,471
    There are settings in picore player (squeezelite) , then it reports it's capacity to LMS
    --------------------------------------------------------------------
    Main hifi: Touch + CIA PS +MeridianG68J MeridianHD621 MeridianG98DH 2 x MeridianDSP5200 MeridianDSP5200HC 2 xMeridianDSP3100 +Rel Stadium 3 sub.
    Bedroom/Office: Boom
    Kitchen: Touch + powered Fostex PM0.4
    Misc use: Radio (with battery)
    iPad1 with iPengHD & SqueezePad
    (spares Touch, SB3, reciever ,controller )
    server HP proliant micro server N36L with ClearOS Linux

    http://people.xiph.org/~xiphmont/demo/neil-young.html

  3. #3
    Junior Member
    Join Date
    Dec 2017
    Posts
    17
    Ok, that means I fill in "96000" into the max sample rate field of picoreplayer and LMS then will downsample everything above 96kHz the way I described above?

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,085
    You should probably tell us what you tried so far, and what the outcome was. Yes, LMS should transcode on the fly. But it depends on the server system (does it have all the necessary binaries), the file format, the player...

    So please provide detailed information about your LMS setup, check the server.log file for any information reported when you tried to play such a file etc.
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  5. #5
    Junior Member
    Join Date
    Dec 2017
    Posts
    17
    Quote Originally Posted by mherger View Post
    You should probably tell us what you tried so far, and what the outcome was. Yes, LMS should transcode on the fly. But it depends on the server system (does it have all the necessary binaries), the file format, the player...

    So please provide detailed information about your LMS setup, check the server.log file for any information reported when you tried to play such a file etc.
    LMS runs on a QNAP NAS (TS 451A) with digimaster's great "QLogitechMediaServer" installed from QNAPclub appstore. LMS is the latest version, pCP is 3.22 (will update to 3.50 soon)
    In pCP I tried "max sample rate" = "96000" and "Upsample setting" left empty. Trying to play a 192/24 file results in a message that this sample rate is not supported. My guess is that as long as there is no upsampling setting specified, nothing gets resampled.

    I found there is a very good overview about resampling options in squeezelight right here:
    http://manpages.ubuntu.com/manpages/...ml#contenttoc4

    From that I would guess I should do:
    max sample rate: "44100,48000,88200,96000"
    upsample setting: "E" to allow synchronous resampling to max sample rate while leaving all natively supported sample rates below 96 kHz untouched (or "E:::28" – for doing the same as before with 28bit precision)

    It might be interesting to put v, h, m, l or q in front of "E" to hear how the different quality settings (different complexity of filtering?) might translate into different sound...

    Furthermore – as my DAC is nonos – it might be fun to explore, what different upsampling strategies do; Archimago has some suggestions her:
    http://archimago.blogspot.com/2017/1...igital_23.html
    And John Swenson's favourite in this forum some years ago was:
    upsample setting: "mI:::28"

    But the latter is a different story. First I'm going to try the settings for downsampling everything beyond 96 kHz and will report back. By the way, how can I monitor what sample rate actually gets sent out by LMS from my NAS to pCP? And how do I know what sample rate goes from pCP to my DAC? Monitoring this would help to see if actually LMS on the NAS takes over the resampling task.
    Last edited by steklo; 2018-06-12 at 05:36.

  6. #6
    Senior Member
    Join Date
    Jan 2006
    Location
    South Coast, NSW, Australia
    Posts
    1,221
    In this post John Swenson explains upsampling and will compliment your reference in the Ubuntu Manpages-
    https://forums.slimdevices.com/showt...l=1#post751357
    A camel is a racehorse designed by a committee.

    Seen sprayed on the outside wall of the local library -
    Three things I hate in life :
    1. Vandalism
    2. Irony
    3. Lists

  7. #7
    Junior Member
    Join Date
    Dec 2017
    Posts
    17
    Quote Originally Posted by Wirrunna View Post
    In this post John Swenson explains upsampling and will compliment your reference in the Ubuntu Manpages-
    https://forums.slimdevices.com/showt...l=1#post751357
    Thanks! That's the post where I found his favourite upsampling setting.

    Meanwhile I tried using the above mentioned settings in pCP:

    max sample rate: "44100,48000,88200,96000"
    upsample setting: "E"

    Trying to play a 192/24 album resulted in "unsupported sample rate" error just as before. Only after I cleared the field "Restrict codec setting" (it was "pcm,alac,mp3" before) this album was then played nicely! The "restrict codec setting" with pcm at first place asks LMS to convert my ALAC files to PCM and send PCM; this obviously is not possible in conjunction with resampling.

    So basically the settings seem to do what I want now, as long as I generally accept ALAC to be send to pCP instead of PCM. I haven't compared if there is a difference in soundquality as for PCM vs. ALAC; I only know that some swear that it makes a difference whereas others don't. I'll have to check myself some time.

    Two things I am not sure about:
    1. Where is the resampling now actually taking place? Is this within LMS on the server as intended or does it take place in the pCP client?
    2. Where do I see which sample rate actually gets transferred from LMS server to pCP client?
    Probably all of that gets recorded in the logfiles of LMS and pCP? If so ľ I'm a stupid Mac user, sorry ľ how and where could I find and read them?

    Best regards
    Stefan

  8. #8
    Junior Member
    Join Date
    Dec 2017
    Posts
    17
    It seems the C-3PO plugin is able to do the things I want – resampling on server site within LMS. And still preserving the ability to send PCM from LMS to pCP.

    https://forums.slimdevices.com/showt...pcm+upsampling

    This might be an interesting option in case I would find to prefer PCM sonically against ALAC in my setup... Or if it turns out that my above settings in pCP result in resampling on the client site instead of the server.
    Any experience with that? How would I have to set it up to downsample audio above 96/24 to the next even-numbered supported sample rate and leave everything up to and including 96/24 as is?
    Last edited by steklo; 2018-06-13 at 03:54.

  9. #9
    Senior Member
    Join Date
    Dec 2009
    Location
    Albinea (RE) Italy
    Posts
    659
    Quote Originally Posted by steklo View Post
    It seems the C-3PO plugin is able to do the things I want – resampling on server site within LMS. And still preserving the ability to send PCM from LMS to pCP.

    https://forums.slimdevices.com/showt...pcm+upsampling

    This might be an interesting option in case I would find to prefer PCM sonically against ALAC in my setup... Or if it turns out that my above settings in pCP result in resampling on the client site instead of the server.
    Any experience with that? How would I have to set it up to downsample audio above 96/24 to the next even-numbered supported sample rate and leave everything up to and including 96/24 as is?
    To resample everything to 96Khz, just select ONLY 96Khz as "Output sample rates (PCM)" in C-3PO and any of the "Target sample rate is" options.

    To resample to 96kHZ only material with sample rate greather than 96Kz, you could just set max rate (-r 96000) and use one of -E|X| option in squeezelite (this require squeezelite being compiled with resample option), be sure to not include -x option!

    If you preffer to use C-3PO, you could check i.e. 44100, 48000, 88200, 96000 Hz as "Output sample rates (PCM)" and choose the "Target sample rate is" options that better suite your needs.

    Using C-3PO, you could select "Output Bit-depth" and a right dithering option, usefull when downsampling/reducing the bit lenght.

    I advise you to stay with Very Hight Quality resampling and Linear phase, unless severe hw limitation, in that case try first to reduce the passband, any value > 900 is safe, but this is just my opinion, you better try yourself, at the end of the day, this is the real mission of C-3PO.


    Enjoy!

    Marco
    Last edited by marcoc1712; 2018-06-13 at 10:35.
    __________________________________________________ ______________________
    Author of C-3PO plugin, Squeezelite-R2, Falcon Web interface - See www.marcoc1712.it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •