Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Dec 2008
    Location
    Netherlands, Utrecht area
    Posts
    111

    How to use SOX to downsample > 24/96 on Touch when streaming FLAC as PCM?

    I have the server stream FLAC as PCM to my Touch. The Touch cannot handle 24/176 and 24/192. How can I have SOX downsample 24/176 -> 24/88 and 24/192 -> 24/96 in such situation?
    Meridian 506.24, Squeezebox Touch, Technics SL-1210 M5G KAB + Phonoclone, DIY amplifiers, Linkwitz Orions+ incl Thors, Sennheiser HD650 + PPAv2 headphone amp

  2. #2
    Senior Member th00ht's Avatar
    Join Date
    Feb 2008
    Location
    Zürich
    Posts
    347

    Thumbs up

    I believe this is done automatically (?). Currently I'm playing 24/96 material on my beloved Squeezebox (classic) which aledgedly only handles upto 24/88. The command that is running on my SBS is:

    /opt/squeezebox-server/Bin/i386-linux/sox -q -t wav - -t flac -C 0 -r 48000 -

    so I assume it does a down sample to 48k.

    What is a bit puzzling is that when I monitor the coaxial out, my Denon DAT recorder seems to receive a 44.1k stream; it could handle 48k. Yet the music plays fine, although there is a barely audible tremelo.
    Last edited by th00ht; 2010-06-21 at 13:25.
    Ripping: EAC (free and great)
    Squeezebox Server 7.7.2 - r33893 / Arch64
    Squeezebox Classic, Quad 303 (where can I get new caps?) + two Quad ESL 57
    Squeezebox Touch, Denon AVR 1912 (Pure Direct) + two CM8 + two CM1 + CMC
    Squeezebox Radio White
    last.fm, SoS, linn

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    Buckinghamshire, England
    Posts
    9,983
    The Touch and SB3 are different.

    On the Touch, if you stream FLAC as FLAC, all sample rates are handled automatically (176.4 and 192 are downsamples to 88.2/96 via SOX)

    If you stream FLAC as PCM, 176.4 and 192 will not play, as SOX is not invoked by the standard Convert.conf entry. You will get an "unsupported file type" error message on the Touch screen.

    A special entry for custom_convert.conf needs to be crafted that will convert the FLAC to PCM and downsample. This entry is only used if the sample rate is > 96.

    I don't know if SBS supports the smart detection of switching to sample rate transcoding for FLAC streamed as PCM. It looks like it might work...

    I've hacked around a bit and never quite managed to get this to work...


    This is the entry for FLAC streamed as PCM:

    flc pcm * *
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$


    This is the entry for FLAC-FLAC downsampling:

    flc flc transcode *
    # FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
    You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
    Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
    Stax4070+SRM7/II phones
    Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.

  4. #4
    Junior Member
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Quote Originally Posted by Phil Leigh View Post
    The Touch and SB3 are different.

    On the Touch, if you stream FLAC as FLAC, all sample rates are handled automatically (176.4 and 192 are downsamples to 88.2/96 via SOX)

    If you stream FLAC as PCM, 176.4 and 192 will not play, as SOX is not invoked by the standard Convert.conf entry. You will get an "unsupported file type" error message on the Touch screen.

    A special entry for custom_convert.conf needs to be crafted that will convert the FLAC to PCM and downsample. This entry is only used if the sample rate is > 96.

    I don't know if SBS supports the smart detection of switching to sample rate transcoding for FLAC streamed as PCM. It looks like it might work...

    I've hacked around a bit and never quite managed to get this to work...


    This is the entry for FLAC streamed as PCM:

    flc pcm * *
    # FT:{START=--skip=%t}U:{END=--until=%v}
    [flac] -dcs --force-raw-format --endian=little --sign=signed $START$ $END$ -- $FILE$


    This is the entry for FLAC-FLAC downsampling:

    flc flc transcode *
    # FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
    [flac] -dcs $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -
    Phil,

    I am not quite clear on what you suggest to get the Touch to auto down convert from 176.4/24 to 88.2/24. Should the custom_convert.conf file only contain the FLC to FLC transcode statement? Or is ir to be a copy of the covert.conf, with the the FLC to PCM statement be commented out?

    Thanks for your help.

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    Buckinghamshire, England
    Posts
    9,983
    Quote Originally Posted by justpassinthru View Post
    Phil,

    I am not quite clear on what you suggest to get the Touch to auto down convert from 176.4/24 to 88.2/24. Should the custom_convert.conf file only contain the FLC to FLC transcode statement? Or is ir to be a copy of the covert.conf, with the the FLC to PCM statement be commented out?

    Thanks for your help.
    OK - basically whatever you put in custom_convert.conf will override the matching entry or entries in convert.conf

    So if you ONLY want to change the way 176.4 or 192 FLAC files are handled on a Touch (or transporter) you would just need to have a flc flc transcode * entry in custom_convert.conf

    SBS will do everything automatically for flac file streaming - you do not need to change anything.

    If you want to stream flac files as PCM with auto down-sampling of 176.4 and 192... someone else will have to jump in and help - I've never managed to get this to work, although I am 100% positive it can be made to work.
    You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
    Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
    Stax4070+SRM7/II phones
    Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.

  6. #6
    Junior Member
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Quote Originally Posted by Phil Leigh View Post
    OK - basically whatever you put in custom_convert.conf will override the matching entry or entries in convert.conf

    So if you ONLY want to change the way 176.4 or 192 FLAC files are handled on a Touch (or transporter) you would just need to have a flc flc transcode * entry in custom_convert.conf

    SBS will do everything automatically for flac file streaming - you do not need to change anything.

    If you want to stream flac files as PCM with auto down-sampling of 176.4 and 192... someone else will have to jump in and help - I've never managed to get this to work, although I am 100% positive it can be made to work.
    Phil,
    Thanks so much for your prompt response. I have been perusing your other posts and now find myself even more confused. I purchased some 176.4/24 files to burn to DVD to see how much better they might sound. (They also play fine on my PC via Media Monkey from my NAS; I am using a ReadyNAS Duo as my media server.) I then decided to try and see if my Touch would play them. I got the "unsupported format" msg instead and hence began my forum search. While reading your other posts I came across this statement -

    "The Touch CAN output 88.2 in the following circumstances:
    1) you are playing a 176.4 file - it will be downsampled by SOX to 88.2 assuming you haven't fiddled with the FLAC Transcode entry in convert.conf"

    That is all I need to happen. I am not sure why the the Touch did not downsample to 88.2/24 automatically given that I had not edited the convert.conf file in any manner. Does this statement infer that the Squeeze Server must be running on the PC and using SOX and that the downsample will not work when running Squeeze Server (full version) from a ReadyNAS Media server?

    Thanks again for your help.

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    Buckinghamshire, England
    Posts
    9,983
    Quote Originally Posted by justpassinthru View Post
    Phil,
    Thanks so much for your prompt response. I have been perusing your other posts and now find myself even more confused. I purchased some 176.4/24 files to burn to DVD to see how much better they might sound. (They also play fine on my PC via Media Monkey from my NAS; I am using a ReadyNAS Duo as my media server.) I then decided to try and see if my Touch would play them. I got the "unsupported format" msg instead and hence began my forum search. While reading your other posts I came across this statement -

    "The Touch CAN output 88.2 in the following circumstances:
    1) you are playing a 176.4 file - it will be downsampled by SOX to 88.2 assuming you haven't fiddled with the FLAC Transcode entry in convert.conf"

    That is all I need to happen. I am not sure why the the Touch did not downsample to 88.2/24 automatically given that I had not edited the convert.conf file in any manner. Does this statement infer that the Squeeze Server must be running on the PC and using SOX and that the downsample will not work when running Squeeze Server (full version) from a ReadyNAS Media server?

    Thanks again for your help.
    yes - this will only work if the computer running SBS is capable of running SOX... I don't think the ReadyNAS can do this.
    You want to see the signal path BEFORE it gets onto a CD/vinyl...it ain't what you'd call minimal...
    Touch(wired/W7)+Teddy Pardo PSU - Audiolense 3.3/2.0+INGUZ DRC - MF M1 DAC - Linn 5103 - full Aktiv 5.1 system (6x LK140's, ESPEK/TRIKAN/KATAN/SEIZMIK 10.5), Pekin Tuner, Townsend Supertweeters,VdH Toslink,Kimber 8TC Speaker & Chord Signature Plus Interconnect cables
    Stax4070+SRM7/II phones
    Kitchen Boom, Outdoors: SB Radio, Harmony One remote for everything.

  8. #8
    Junior Member
    Join Date
    Jan 2011
    Location
    USA
    Posts
    7
    Quote Originally Posted by Phil Leigh View Post
    yes - this will only work if the computer running SBS is capable of running SOX... I don't think the ReadyNAS can do this.
    The for clarifying this. I appreciate it.

Tags for this Thread

Posting Permissions

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