Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Need some advice on resampling 192Khz/32bit float. (Read 893 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Need some advice on resampling 192Khz/32bit float.

Hello, I'm seeking advice on the optimal method to convert 192kHz/32-bit Float WavPack files to 44.1kHz/16-bit FLAC. After researching forums for several days, I've found two potential approaches:

1.Using sox:
Code: [Select]
sox -S 192khz_32bit_Float.wv -b 16 out.flac rate -v -L 44100 dither

2.Using  ffmpeg:
Code: [Select]
aresample=44100:resampler=soxr:precision=33:osf=s16:dither_method=shibata

Which method would produce the best results with minimal artifacts when both resampling and reducing bit depth? also I have seen many conflicting opinions like some suggests always using noise shaping while others say never to use it which makes deciding quite hard. also sox doesn't support 32 bit float internally.

Re: Need some advice on resampling 192Khz/32bit float.

Reply #1
The SoX line looks fine.  I think -v is overkill because -h already calculates values beyond flat 16bit dither 125dB down. You also may add -a behind dither to prevent unnecessary dither on silence.
I am not familar what ffmpeg spits out exacty.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: Need some advice on resampling 192Khz/32bit float.

Reply #2
The SoX line looks fine.  I think -v is overkill because -h already calculates values beyond flat 16bit dither 125dB down. You also may add -a behind dither to prevent unnecessary dither on silence.
I am not familar what ffmpeg spits out exacty.
Thank you, should I worry about sox not supporting 32 bit float internally?

Re: Need some advice on resampling 192Khz/32bit float.

Reply #3
Sure. When i see clipping i reduce gain before resampling. SoX does 32bit integer. A completely automatic solution may be suggested by others, sorry.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: Need some advice on resampling 192Khz/32bit float.

Reply #4
Sure. When i see clipping i reduce gain before resampling. SoX does 32bit integer. A completely automatic solution may be suggested by others, sorry.

I appreciate your help, Thank you for replying!

Re: Need some advice on resampling 192Khz/32bit float.

Reply #5
Just to ease your mind, I've NEVER heard any difference with re-sampling as long as I stayed above "CD quality"'.   (I don't claim to have golden ears.)

If the floating point goes over 0dB, of course you need to lower the volume (or normalize) before conversion.

The "rule" is dither when down-sampling the bit depth.    But, it's not a big deal because you can't normally hear dither or the lack of dither) at 16-bits anyway.  (You CAN hear quantization noise at 8-bits and dither noise is supposed to sound better.    I've heard 8-bit quantization but I've never tried dither...  I don't care about 8-bit audio.)

Quote
You also may add -a behind dither to prevent unnecessary dither on silence.
I didn't know about that...    That's a cool feature!   It's best not to add dither noise to digital silence.

Re: Need some advice on resampling 192Khz/32bit float.

Reply #6
Just to ease your mind, I've NEVER heard any difference with re-sampling as long as I stayed above "CD quality"'.   (I don't claim to have golden ears.)

If the floating point goes over 0dB, of course you need to lower the volume (or normalize) before conversion.

The "rule" is dither when down-sampling the bit depth.    But, it's not a big deal because you can't normally hear dither or the lack of dither) at 16-bits anyway.  (You CAN hear quantization noise at 8-bits and dither noise is supposed to sound better.    I've heard 8-bit quantization but I've never tried dither...  I don't care about 8-bit audio.)

Quote
You also may add -a behind dither to prevent unnecessary dither on silence.
I didn't know about that...    That's a cool feature!   It's best not to add dither noise to digital silence.
Thanks! Any opinion on noise shaping?

Re: Need some advice on resampling 192Khz/32bit float.

Reply #7
If you will convert each track individually and will lower volume to prevent clipping individually for each track, this can change volume difference between tracks in album.

If source tracks in album have seamless transition between them which is not silence and you are converting each track individually, resampling can cause audible click on this transition.

Re: Need some advice on resampling 192Khz/32bit float.

Reply #8
Yes, in that case you would need to concat all files, resamples and split back again.

Re: Need some advice on resampling 192Khz/32bit float.

Reply #9
If you will convert each track individually and will lower volume to prevent clipping individually for each track, this can change volume difference between tracks in album.

If source tracks in album have seamless transition between them which is not silence and you are converting each track individually, resampling can cause audible click on this transition.
Yes, in that case you would need to concat all files, resamples and split back again.
I will make sure concatenate and create a cue file if I have to resample seprated files, Thanks!

Re: Need some advice on resampling 192Khz/32bit float.

Reply #10
...and if you source  files have unwhole quantity of frames (cue counts time in frames - 75 frames per second, so for 192 kHz, 1 whole rame contains 2560 samples) then merging them to image+cue will change duration of tracks slightly. Problems are everywhere :D Some software can even pad unwhole frames with silence, making situation much worse than possible clicks from resampling.

To avoid possible clicks between tracks, while keeping exact duration of tracks, you can use for conversion foobar2000 audio player converter with SoX resampler component and option "Don't reset DSP between tracks".

Re: Need some advice on resampling 192Khz/32bit float.

Reply #11
To avoid possible clicks between tracks, while keeping exact duration of tracks, you can use for conversion foobar2000 audio player converter with SoX resampler component and option "Don't reset DSP between tracks".
Sadly due to the massive size of the files (compared to my bandwidth) I use Google Colab as intermediate to process my files before downloading them so I can't use foobar, maybe I should keep them whole without splitting them (flac +cue)

Edit: sorry my bad I will just split the flac files after downloading, I need some sleep.

Re: Need some advice on resampling 192Khz/32bit float.

Reply #12

[Thanks! Any opinion on noise shaping?
Some years back i played around with noise shaping and found the shibata shapes indeed sounding very pleasant to my ears when amplified. There must be some samples in the upload section.
I checked many years on many recordings if it is worth to apply but all the music i seem to listen never needs full 16 bits leave alone needing it noise shaped.
For the sake of doing at least something to lower the possibility of perceived noise i now use the sloped dither inside SoX with dither -S -a.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

 

Re: Need some advice on resampling 192Khz/32bit float.

Reply #13

[Thanks! Any opinion on noise shaping?
Some years back i played around with noise shaping and found the shibata shapes indeed sounding very pleasant to my ears when amplified. There must be some samples in the upload section.
I checked many years on many recordings if it is worth to apply but all the music i seem to listen never needs full 16 bits leave alone needing it noise shaped.
For the sake of doing at least something to lower the possibility of perceived noise i now use the sloped dither inside SoX with dither -S -a.
I think I have enough information now to start redoing my collection, thank you!