I have converted one of my old SACD's to 352kHz FLAC, but due to the nature of DSD, a lot of noise is added to the higher frequencies, which are outside the audible range, but consume quite some disk space.
So I thought I'd use the simple lowpass filter to get rid of it, like this:
ffmpeg -i input.dsf -af "lowpass=26000" output.flac
However, the result is that the noise is still there, but only lowered in volume:
Is there a way to increase the roll-off of the filter or another way to get up to -140 dB at ~48 kHz?
Use sox instead:
ffmpeg -i input.dsf -f wav -acodec pcm_s24le pipe:1 | sox -S -t wav --ignore-length - --compression 8 output.flac sinc -32k -t 16k
...will get rid of all the high frequency distortion and reduce file size dramatically (bringing it back close to DSD):
OK, I found out, that one can simple chain the filters and by using slightly different roll-off frequencies. For the following, I simply converted the DSD files without any filter to FLAC (hence, in the following commands we have input.flac
instead of input.dsf
).
Using the following command:
ffmpeg -i input.flac -af "lowpass=24000,lowpass=28000,lowpass=30000,lowpass=32000" output.flac
Which looked really nice.
I then checked how close it still was to the original in the lower (audible) frequencies:
sox -S -m -v 1 input.flac -v -1 output.flac -n spectrogram -x 640 -y 200 -Z -30 -o "lowpass.ffmpeg.diff.png"
So, no way I can keep that in my library. As I was searching for alternatives, I came across this nice informative read:
So, based on that new information, I fired up sox instead:
sox -S input.flac --compression 8 output.flac sinc -32k -t 16k
...and confirmed via diff, that audible frequencies remain untouched: