Michaela Merz's personal blog site

Playing DSD files without MPD

Playing DSD files without MPD

MPD is a cool server that is able to play DSD files for a while now. But it’s a bit of overkill for those of us who don’t want a complex sound server just to send a DSD /DSF files to an USB DAC. Here’s how you can play those files with ffmpeg and some glue 🙂

To be honest: I don’t like to move files around, refresh servers or create playlists. I am old fashioned. I just type play this or play that and I expect sound to come from my speakers. So far – this works great with FLACs, MP3s or WAVs. Not so good for DSD or DSF files. Quit frankly – I didn’t find anything to work -out of the box- on my little Linux laptop. While ffmpeg is able to decode dsd, it is still missing the crucial part to convert the audio into DOP (dsd over pcm).

dsdx600Believe me – i tried almost everything. I even sent a “mayday” over the ffmpeg mailing list – but .. to no avail (yet). So – if everything else fails – one has to sit down and find the solution herself.

Here’s what we want:

A converter that converts a DSD file into a DOP file and pushes this DOP data over alsa to a USB dac. Well – there’s DSF2FLAC and this little tools has a neat feature: It allows to pack DOP files into the Flac-Container.

dsf2flac -d -r 176400 -i thedsdaudio.dsf -o thedsdaudio.flac

Cool. Took about another hour or so to be able to play that flac via ffmpeg.

ffmpeg -i thedsdaudio.flac -r 176400 -c pcm_s32le  -f alsa hw:1

Voila. The DSD light on my DAC turns on and I am happy. But not happy enough. It takes time to convert a DSD into a flac. And I don’t wont to wait. So – I went ahead and patched dsf2flac to be able to dump the DOP data to stdout.

So, it looks like that now:

dsf2flac -d -r 176400 -i thedsdaudio.dsf -o - 2>/dev/null  | ffmpeg -i - -r 176400 -c pcm_s32le  -f alsa hw:1

Now we’re talking. No more MPD. Knit yourself a little shell script around it and you are ready to go.

Here’s the replacement main.cpp that you should copy over the original before compiling.

Update: I’ve been told that the original dsf2flac seems not be available anymore. So – here’s the original complete dsf2flac already patched for piping.

That’s all folks. Have fun.

2 thoughts on “Playing DSD files without MPD

  1. Unfortunately DSF2FLAC project is no longer available. There is fork on GitHub (https://github.com/hank/dsf2flac) but this fork was created before DoP option has been added. Could you publish (or send me) full source code of this DSF2FLAC with DoP option?

Leave a Reply to Edmunt Pienkowsky Cancel reply

Your email address will not be published. Required fields are marked *