DSD (WavPack) to PCM flac

Tutorials, tips and tricks.

Moderator: moderators

DSD (WavPack) to PCM flac

Postby jeffgt14 » Tue Feb 05, 2019 7:13 pm

I think I finally got this working well. I wanted a way to keep DSD rips SACD’s for archival purposes but obviously it’s a bit more difficult with to stream to my phone via DSub on the go. I’m sure there’s some way to do this if you have .dsf or .dts files but I highly recommend using the new Wavpack to contain .dsf audio. Compresses great and is much more efficient on the CPU. Plus, the more people using it should force more apps to support it.

Enough of the plugging, you’ll need to download both SoX and WVUNPACK and create symlinks to those programs in your transcodes directory. I’m sure ffmpeg will work too but I prefer SoX.

Convert From: wv
Convert To: flac

Step 1: wvunpack -t --wav %s -o -
Step 2: sox -t wav -v 1.413 - -b 16 -r 44100 -t flac -

Step 1 Breakdown
“wvunpack --wav” – converts wv to 32bit 352800 Hz WAV by 8x decimation

“-t” – copies the input file's time stamp to output file. This is needed to show the percent complete when transcoding

“-o” – specifies the output filename which is stdout in this case

Step 2 Breakdown
“-t wav” – specifies the wav header for stdin

“-v 1.413” – increase volume by 1.413 amplitude = +3dB. I think this is a fairly number to avoid any potential clipping as most DSD to PCM conversion will need anywhere from a 3.5 to 6 decibel increase. Only a 1999 SACD of Thriller appears to actually need a negative decibel gain. For some reason I could never get the gain or vol option to work but using -v on the input works great

“-b 16 -r 44100 -t flac” – should be self explanatory but transcodes the 32bit 352.8 kHz WAV to 16/44.1 flac. You can adjust these numbers if you want 24/88.2 files as well but redbook is enough for my streaming purposes. SoX will automatically apply TPDF dither when changing bitrate so if you are against dithering or want to specify a different dither function, you’ll need to add the appropriate options there

For my purposes, I only use wavpack for files containing .dsf DSD audio so if you use wavpack for both PCM and DSD files it’s probably a bit more difficult to mess with. You’ll need to make sure you remove the “wv” from any other conversions you may have too.
jeffgt14
 
Posts: 34
Joined: Tue Nov 18, 2014 9:35 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest