Downsample/convert hi-res 24 bit to 16 bit with Audacity or Foobar2000.

Discussion in 'Audio Hardware' started by bbanderic, Jan 1, 2015.

Thread Status:
Not open for further replies.
  1. bbanderic

    bbanderic Forum Resident Thread Starter

    Hi All,

    I'm interested in downsampling/converting 24/192 and 24/96 audio to 16/44.1. I have both foobar2000 and Audacity on my PC. Are both of these programs capable of a high quality conversions and are there any tutorials around for either of these programs for doing this?

    Thanks!
     
  2. Apesbrain

    Apesbrain Forum Resident

    Location:
    East Coast, USA
    Converting Hi-Res (HR) to 16/XX with foobar2000
    These instructions are for Windows; all software is free

    1. Do a "Full" installation of foobar2000 and its Encoder Pack

    2. Open foobar2000 "File" > "Preferences" - "Components" and drop the SoX Resampler installation zip file on the open window; click "Apply" and restart when prompted

    3. Drag your HR files to foobar2000 main window

    4. Configure your file conversion:
    - highlight all music files in foobar2000
    - right-click and select "Convert" > "..."
    - Output Format: Format: FLAC, level 6; Output bit depth: 16; Dither: always
    - Destination: Output folder: Ask me later. Output type: Convert each track to an individual file. Name format: /%artist%/%album%/%filename%
    - Processing: Add "Resampler (SoX)" to Active DSP list: configure Resampler for XXX00 "Target Samplerate" (your choice: 44100, 48000, 88200, 96000)
    - Other: When finished: "ReplayGain-scan output files as albums" and "Transfer metadata (tags)". Optionally, select "Transfer attached pictures" if your files have embedded artwork. If you have a cover art JPG in the folder, put *.JPG in the box labelled "Copy other files..."
    * IMPORTANT - Save this configuration as "HR To 16/XX" preset so you can easily use it again
    - Press "Convert" -- BE SURE TO SPECIFY AN OUTPUT FOLDER DIFFERENT FROM WHERE THE ORIGINAL FILES ARE LOCATED

    5. [OPTIONAL: 16/44 ONLY] Good hygiene with 16/44 files is to check for Sector Boundary Errors (SBEs) which can cause problems if you ever burn these files to audio CD. You can use Trader's Little Helper to do this.
     
    Last edited: Jan 1, 2015
    Biggles, joejoe, Robert C and 4 others like this.
  3. bbanderic

    bbanderic Forum Resident Thread Starter

    Thanks a million Apesbrain, those instructions worked great! One question...is the "ReplayGain-scan output files as albums" mandatory for high quality conversions? If not, I think I prefer to keep it unchecked, I don't really need any players to adjust volume levels for me.
     
  4. testikoff

    testikoff Seasoned n00b

    OP, please keep in mind that fb2k's native noise-shaped dithering algorithm although excellent is a tad "noisy"... You may try experimenting with Audacity's dithers or SoX dithers, FTM.
     
  5. bbanderic

    bbanderic Forum Resident Thread Starter

    Thanks for the info testikoff, I'll look it over. I used the SoX resampler 0.8.3, is your version of Sox dithers in your link something different and do I install it on top of the version I already have? I'm new to this so forgive me if it's a stupid question, but I'm learning quick!. Also, My original source audio files are 24/192 and 24/96 HDTracks Flac downloads should I convert them to WAV before downsampling for best quality or does it not matter. As far as Audacity, I have it installed but don't know how to do conversions with it, haven't come across a good tutorial for seteup and conversion. Thanks!
     
    Last edited: Jan 3, 2015
  6. testikoff

    testikoff Seasoned n00b

    SoX Resampler is a fb2k sample rate converter plug-in. Dithering is used for PCM word length reductions (say, from 24 to 16 bits). SoX software offers a command-line interface of dithering with TPDF or noise-shaped methods. The typical commands to use for dithering to 16 bits with SoX will be:
    Code:
    TPDF:
    SoX.exe "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - TPDF.flac" dither
    
    Noise-shaped:
    SoX.exe -S "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - gesemann.flac" dither -f gesemann
    SoX.exe -S "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - m-e-w.flac" dither -f modified-e-weighted
    SoX.exe -S "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - lipshitz.flac" dither -f lipshitz
    SoX.exe -S "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - f-weighted.flac" dither -f f-weighted
    SoX.exe" "11 - Krakow (2444).flac" -b 16 "11 - Krakow (1644) - shibata.flac" dither -f shibata
    ...
    
    Here are the spectral graphs (window size 32768) of the 24-to-16 bit quantization error at 44.1 kHz using various SoX noise-shaped dithers:

    [​IMG]

    Gesemann & Modified E-Weighted methods are the "lightest" in terms of resulting noise amplitudes (both produce below -75dBFS noise peaks). High-Shibata is the "highest" noise-peak-wise (above -60dBFS).
     
    Last edited: Jan 3, 2015
    jfeldt likes this.
  7. Apesbrain

    Apesbrain Forum Resident

    Location:
    East Coast, USA
    It is not mandatory but it costs you nothing in terms of sound quality. All RG does is add tags to your files that tell a RG-compliant playback device how to amplify the files to maintain volume should you enable it. RG does NOT change the audio data in any way.

    The SoX Resampler you are using with foobar2000 is fine. Note that all of the noise in those SoX options illustrated in the graph is at least -90dB down and for most of the audible range is -120dB down; this will not be audible.

    It is not necessary and does not make any difference in terms of sound quality. foobar2000 handles this internally.
     
  8. testikoff

    testikoff Seasoned n00b

    Your numbers are not quite correct. Like I said, the peak levels of all noise-shaped dithers are above -90dBFS (-80...-75dBFS for lighter dithers & around -60dBFS for heavier ones). They also are audible (if one pumps the volume), but generally ~6dB (or better) percievedly quieter than non-dithered 24-to-16 bit quantization error noise.
     
    Last edited: Jan 3, 2015
  9. bbanderic

    bbanderic Forum Resident Thread Starter

    I have Foobar2000 set up and operating and the resample/convert function seems to be working very well thanks to the help from Apesbrain, much appreciated!

    On the advice of testikoff I will give Audacity a try as well, it seems as though it has a version of SoX resampler already incorporated into the software. After playing around with it I'm still not confident I'm doing it properly. Testikoff, can you please give me some tips on setting up and using Audacity properly for resampling similar to what Apesbrain did for Foobar above? Thanks!
     
  10. testikoff

    testikoff Seasoned n00b

  11. bbanderic

    bbanderic Forum Resident Thread Starter

    I saw that, that's the way it's setup by default so the settings are good. Basically what I'm doing is FILE > Open (add audio track(s)) > Tracks > Resample, then it gives me the option to change sample rate and then it converts it doesn't give me option to change bit rate.
     
  12. head_unit

    head_unit Senior Member

    Location:
    Los Angeles CA USA
    Why do you want to do this? I don't know much about answering your question, but your purpose for doing this may color the answers of the knowledgeable among us.
     
  13. Antares

    Antares Forum Resident

    Location:
    Flanders
    The selected (High-quality Conversion) dither scheme will be applied only when exporting the track to a 16-bit file. Also set your project sample rate at the bottom left of the screen to the desired value (44100) before exporting.
     
    Last edited: Jan 5, 2015
  14. bbanderic

    bbanderic Forum Resident Thread Starter

    I have a few hi-res downloads where that master isn't available on CD that I want to listen to on my ipod (apple lossless).
     
    HAmmer likes this.
  15. Apesbrain

    Apesbrain Forum Resident

    Location:
    East Coast, USA
    Just curious, how are you converting FLAC to ALAC?
     
  16. bbanderic

    bbanderic Forum Resident Thread Starter

    I'm converting the hi-res Flac's to 16/44.1 WAV, then converting the WAV to ALAC in iTunes. I suppose I can save myself a step and convert the Flac's straight to ALAC with Foobar2000 but I'm just so used to doing it the other way.
     
  17. bbanderic

    bbanderic Forum Resident Thread Starter

    I'm fairly certain that I have Audacity figured out now for converting/downsampling multiple tracks:
    Import (audio) > Set Project Rate (Hz) > Export Multiple > WAV
    I kept the quality settings at default...32-bit Float, Sample Rate Converter best quality, shaped dither
    Everything sounds great, can't really tell the difference between the Foobar conversion and the Audacity conversion but I haven't fully put them to the test by pumping up the volume yet.

    I like the fact that I can choose the type of dither in Audacity, although I haven't tested the triangle or rectangle, from what I'm reading it may be worth my while to experiment with triangle but rectangle not so much. I don't think Foobar has that option, at least from what I can tell, dither is basically on or off, someone correct me if I'm wrong, I'm curious as to what type of dither Foobar uses.
    Since both Audacity and Foobar both use SoX I'm curious why someone would choose one over the other for conversions from a quality standpoint. I know Testikoff mentioned that he prefers Audacity over Foobar because Foobar's dither is a bit "noisy" but why is it noisy if they both use SoX?

    Question about Audacity, is it possible to embed artwork into the flacs like you can in Foobar?

    Thanks to Apesbrain, Testikoff and Antares for your advice and tips, it's been very helpful, I very much appreciate it.
     
  18. testikoff

    testikoff Seasoned n00b

    ^^^ Click on the word noisy in my earlier post & see the quantization error spectral comparison for fb2k (both native & MDA dither VST plug-in, which I prefer BTW) & Audacity. By "noisy" I meant rather high dither signal amplitude (to me, -60dBFS is a tad too much)... Oh, Audacity's noise-shaped dither looks a lot like SoX' Lipshitz one ;).
     
    Last edited: Jan 6, 2015
  19. head_unit

    head_unit Senior Member

    Location:
    Los Angeles CA USA
    Ah I see. Someone jump in and comment if you can/can't play 48 kHz and/or 24 bit yet on an iOS device.
     
  20. music and movies

    music and movies Forum Resident

    Is there a recommended method to ensure the least amount of quality loss/artifacts as possible? I'd like to downsample some of my HDTracks audio to 16-bit 44.1 khz in order to play on my CD player, but I want as little quality loss as possible.

    Also, will there be any audible difference (on a hi-fi system) between the source and the downsampled version?
     
  21. Apesbrain

    Apesbrain Forum Resident

    Location:
    East Coast, USA
    Did you read the thread? You've been given two ways -- Audacity and foobar2000 -- and there are others as well. Or just use CDBurnerXP to burn your CD and it will automatically downsample.

    The answer to this question is different for every listener. You tell us.
     
  22. testikoff

    testikoff Seasoned n00b

    SoX command-line utility can too be used for both down-sampling & down-rezzing (with optional dither of your choice: TPDF + 8 noise-shaped dithers provided)... ;)
     
  23. music and movies

    music and movies Forum Resident

    If I use the SoX command-line utility, which dithering method do you recommend? Do you believe this would be a better option than using foobar2000's SoX resampler? Thanks.
     
  24. gloomrider

    gloomrider Well-Known Member

    Location:
    Hollywood, CA, USA
    Code:
    dither [-S|-s|-f filter] [-a] [-p precision]
      (none)  Use TPDF
      -S  Use sloped TPDF (without noise shaping)
      -s  Shape noise (with shibata filter)
      -f name  Set shaping filter to one of: lipshitz, f-weighted,
      modified-e-weighted, improved-e-weighted, gesemann,
      shibata, low-shibata, high-shibata.
      -a  Automatically turn on & off dithering as needed (use with caution!)
      -p bits  Override the target sample precision
    
     
  25. testikoff

    testikoff Seasoned n00b

    I'd use one of the following moderate noise-shaped SoX dithers: modified-e-weighted or gesemann. To me, lipshitz dither looks a lot like Audacity's built-in noise-shaped one & shibata - like foobar2000's built-in dither...
     
Thread Status:
Not open for further replies.

Share This Page

molar-endocrine