A lot of people believe DSD to be the format of choice when it comes to real high quality audio. If the provenance is right (e.g. if it has been recorded directly to DSD) DSD will deliver an amazing sound experience (see the differences between digital audio formats) . If you are a Linux user, you can use a modified MPD sound server to play DSD data. 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).
Believe 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.
That’s all folks. Have fun.