MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.16k stars 346 forks source link

How to configure Wavpacked DSD files? #54

Closed harbinbeer closed 7 years ago

harbinbeer commented 7 years ago

`May 25 21:33 : exception: Failed to decode http://10.0.2.100:56923/content/d09ecfcc2ec5e8cc26748a8f5a20b465.wv May 25 21:33 : exception: nested: failed to open WavPack stream: not configured to handle DSD WavPack files!

May 25 21:33 : player: played "http://10.0.2.100:56923/content/d09ecfcc2ec5e8cc26748a8f5a20b465.wv" `

Thank you.

harbinbeer commented 7 years ago

My mpd -V

Music Player Daemon 0.20.6

Copyright (C) 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright 2008-2017 Max Kellermann max.kellermann@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins: simple proxy upnp

Storage plugins: local smbclient nfs curl

Neighbor plugins: smbclient upnp

Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [dsdiff] dff [dsf] dsf [faad] aac [mpcdec] mpc [wavpack] wv [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [adplug] amd d00 hsc laa rad raw sa2 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz [pcm]

Filters: libsamplerate soxr

Tag plugins: id3tag

Output plugins: shout null fifo sndio pipe alsa roar ao oss openal pulse jack httpd recorder

Encoder plugins: null vorbis opus lame wave flac

Archive plugins: [bz2] bz2 [zzip] zip [iso] iso

Input plugins: file alsa archive curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols: file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// cdda:// alsa://

Other features: avahi epoll icu inotify ipv6 systemd tcp un

harbinbeer commented 7 years ago

ls /usr/lib/arm-linux-gnueabihf/libwavpack.so.1 lrwxrwxrwx 1 root root 28 May 25 21:32 /usr/lib/arm-linux-gnueabihf/libwavpack.so.1 -> /usr/local/lib/libwavpack.so*

ls /usr/local/lib/libwavpack.so lrwxrwxrwx 1 root staff 19 May 24 22:21 /usr/local/lib/libwavpack.so -> libwavpack.so.1.2.0*

MPconta commented 7 years ago

Make sure your wavpack-decoder is version 5.0 minimum.

harbinbeer commented 7 years ago

libwavpack.so.1.2.0 is the new lib of Wavpack v5.1.0

mistepien commented 7 years ago

Are you sure that mpd was compiled with proper headers of wavpack? This is not enough to symlink libwavpack to new version of library.

MaxKellermann commented 7 years ago

Closing, because this looks like a libwavpack configuration problem, and not related to MPD.

harbinbeer commented 7 years ago

Anyone ever played DSD@Wavpack? http://www.wavpack.com/WavPack5PortingGuide.pdf

From an application point of view under WavPack, DSD audio “samples” are actually a byte of 8 consecutive 1-bit samples. That means, for example, that seeking can only be performed to an 8-sample boundary, and that functions to obtain the sample count in a file will actually be querying the number of sample “bytes” in the file. This was chosen to eliminate the strange situation where a seek would be performed to a “mid-byte” position and all samples retrieved after that would be shuffled around, and also because WavPack is actually storing DSD samples as bytes. This also means that the sample rate returned by WavpackGetSampleRate() is the number of bytes per second, not bits per second (however there is a new function WavpackGetNativeSampleRate() that avoids this but should only be used for reporting the sample rate to the user). An application has three options for dealing with WavPack files containing DSD audio. The first is to do nothing, in which case WavPack will report an error when attempting to open such a file (the error is “not configured to handle DSD WavPack files!”). This is what unmodified applications will see. The second option is to include the flag OPEN_AS_PCM when opening the WavPack file. In this case, the DSD file will be appear as 24-bit PCM, and will automatically be decimated 8X during decoding. This allows applications that cannot natively handle DSD audio to do so. Note that this will still result in a very high sampling rate (352.8 kHz for DSD64) with lots of remaining quantization noise and should therefore be further down-sampled before use. This is how the WavPack Cool Edit and Audition filters and the winamp plugin handle DSD audio (the winamp plugin downsamples another 4x for playback while the Audition filters assume that the user will do this as they see fit). In this mode WavpackGetBitsPerSample() returns 24 and WavpackGetBytesPerSample() returns 3 when a DSD file is opened. The third option is to include the flag OPEN_DSD_NATIVE when opening the WavPack file. In this case, the DSD file will be appear as 8-bit PCM, but each 8-bit PCM sample returned will actually be 8 consecutive 1-bit DSD samples, with the MSB being first temporally (same as DSDIFF). The channels are interleaved at the sample level (just like PCM) and these 8-bit DSD bytes are returned in the lower 8 bits of 32-bit integers (just like 8-bit PCM is returned). In this mode WavpackGetBitsPerSample() returns 8 and WavpackGetBytesPerSample() returns 1 when a DSD file is opened.

mistepien commented 7 years ago

On 06/06/17 05:17, harbinbeer wrote:

Anyone ever played DSD@Wavpack?

Yes, I play DSD wavpack files all the time. It is supported since 0.20 and works very fine. Support of DSD wavpack was my feature ticket

Michał

MPconta commented 7 years ago

I can confirm that DSD wavpack play back perfectly. Maybe you have a problem when creating the wavpacks?