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: WavPack and DSD 128+ (Read 955 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WavPack and DSD 128+

Applications that understand WavPack but not DSD will see a WavPack-encoded DSD song as 8bit and DSD rate / 8 kHz PCM, e.g. DSD 64 is seen as 8 bit / 352.8kHz.  Above DSD 64, the PCM rates go beyond what a lot of software and hardware can handle:

DSD 128 = 705.6kHz -- limit of my DAC and software
DSD 256 = 1411.2kHz -- files are viewed as invalid
DSD 512 (maximum practical limit for real content) =  2822.4kHz

To allow higher DSD rates to be more compatibly presented as PCM, would it be possible / practical to encode DSD as 16 or 32bit chunks instead?  If 32bit chunks were possible, DSD 64 would be 32bit / 88.2kHz which should be very interoperable, and DSD 512 would fit within the limits of my DAC and software.

Best wishes,

Evan

Re: WavPack and DSD 128+

Reply #1
The first thing is that you should actually see decimated DSD files appear as 24-bit PCM, not 8-bit PCM. Not sure what’s going on there.

That 8x decimation is provided in the libwavpack library for applications that can’t handle DSD. However, that audio still has a high level of HF noise from the DSD (like 75-100 kHz) and really shouldn’t be sent to a DAC like that unless it’s specifically designed to handle DXD data. If that HF energy got through to your amp it would waste a lot of power and could cause other issues.

The intent is that the application should be able to downsample that DXD audio to a reasonable sample rate (like 88.2 kHz) and send that to your DAC. That would eliminate the HF noise. This is what Foobar2000 and JRiver Media Center do (or can be configured to do so).

Baring that, an alternative would be to convert the WavPack DSD files to PCM WavPack (or FLAC) files and include the downsample step there. The above programs will do that too, and I have even been thinking about adding this to the WavPack command-line programs since I already have written a high-quality resampler.

Re: WavPack and DSD 128+

Reply #2
The first thing is that you should actually see decimated DSD files appear as 24-bit PCM, not 8-bit PCM. Not sure what’s going on there.
This is how ffmpeg treat WavPack-DSD.

Re: WavPack and DSD 128+

Reply #3
what sample triggers 8-bit PCM ?

Re: WavPack and DSD 128+

Reply #4
Maybe it is just ffmpeg that is the problem then -- the apps I use that struggle with the higher frequency encodings must use ffmpeg as the backend and not WavPack library directly (e.g. Plex, and then of course I used ffprobe to check...).  Thank you!

Re: WavPack and DSD 128+

Reply #5
You're right, FFprobe reports the format as fltp (8 bit). Not sure what that means exactly because it's certainly not 8-bit floating point.

But the actual output of FFmpeg is correctly decimated 8x and it can also do the properly filtered downsampling to reasonable rates. Perhaps just telling Plex to downsample to a lower rate would do it?
 

Re: WavPack and DSD 128+

Reply #6
from where it picks up 8-bit part?

Re: WavPack and DSD 128+

Reply #7
from where it picks up 8-bit part?
I don't know. Here's what FFprobe displays for the DSD file in the WavPack test suite:
Code: [Select]
david@pop-os-hp15:~/Projects/FFmpeg$ ./ffprobe ~/Downloads/test_suite/bit_depths/1bit_dsd.wv 
ffprobe version N-114844-g376b3d53c5 Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --disable-sndio --enable-static --enable-nonfree --enable-gpl --enable-openssl
  libavutil      59. 15.100 / 59. 15.100
  libavcodec     61.  5.103 / 61.  5.103
  libavformat    61.  3.100 / 61.  3.100
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.101 / 10.  2.101
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
Input #0, wv, from '/home/david/Downloads/test_suite/bit_depths/1bit_dsd.wv':
  Metadata:
    Artist          : Lorna Hunt
    Title           : Long Hard Road (excerpt)
    Album           : All in One Day
    Track           : 1
    Year            : 1999
  Duration: 00:00:30.00, start: 0.000000, bitrate: 2553 kb/s
  Stream #0:0: Audio: wavpack, 352800 Hz, stereo, fltp (8 bit)
But if you use FFmpeg to convert to WAV you get 16-bit PCM and if you convert to WavPack you get 32-bit float PCM (which both seem reasonable).
 

Re: WavPack and DSD 128+

Reply #8
Yes, actual decoding is done correctly, but ffprobe reports bitdepth as 8 bit.

BTW, it also reports bits_per_sample=8 for DSD in dff and dsf containers, when using -show_streams.
Spoiler (click to show/hide)

 

Re: WavPack and DSD 128+

Reply #9
Spek and Sek-X (Acoustic spectrum analysers) show 2,8MHz DSF files as 352,8kHz/8bit (352,8*8=2822,4).