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: libHDCD, an HDCD decoder library (Read 4226 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

libHDCD, an HDCD decoder library

I've put together a stand-alone library for HDCD decoding, called libhdcd.
It is the decoder from originally from foo_hdcd, with the enhancements from ffmpeg's af_hdcd, wrapped up with a simple API so that it can be used by other applications.

The idea is that it should be very easy to use in media player software and whatnot, but be developed in one place sharing any improvements and fixes.
I've made a simple plugin for deadbeef using this library. The source code is at deadbeef-hdcd. I've started work on an MPD plugin as well.

Attached is a Windows binary package that includes the dynamic library, a static library, and a command line utility to detect and decode HDCD from WAV.
Also included is a drop-in replacement for Key's original hdcd.exe from 2008 with the recent improvements, that otherwise attempts to be compatible with that utility. It defaults to reading samples from stdin, and writing decoded samples to stdout, and has command line switches that cause the same behavior as the original. It *should* be possible to use it with dbPoweramp by replacing the hdcd.exe that it provides, but I can't test that.

The hdcd-detect utility provides much more detailed information about the HDCD-encoded audio (try -d for example), and includes the analyze mode of the ffmpeg filter. See HDCD § Analyze mode.

Testing and comments are welcome.


Re: libHDCD, an HDCD decoder library

Reply #1
An update that fixes WAV input via pipe: libhdcd v1.1

This kind of thing works as expected now:
flac -dc something.flac | hdcd-detect -
or (Windows):
flac -dc something.flac | hdcd.exe -a

Re: libHDCD, an HDCD decoder library

Reply #2
Thank you so much for this!

 

Re: libHDCD, an HDCD decoder library

Reply #3
This is great. I wasn't aware of the analyze mode. I'll try it on the discs I have, and the ones I'm hunting down. Thank you.