MinimServer Forum

Full Version: HDCD CDs and transcoding
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
(21-08-2021 11:58)simoncn Wrote: [ -> ]I believe your assumptions are all correct. It isn't a problem if your HDCD files contain ReplayGain tags. Any such value should be combined with what the HDCD filter does, as you said in your post.

Thanks Simon
When I change to convOut=-af "hdcd, volume=replaygain=track" I'm getting 'option incorrect for converter'.
It will accept -af hdcd on it's own.

I've got latest version of MServer and MStreamer. I've also updated Raspian Buster lite which I believe has ffmpeg pre-installed
I have tried a few combinations and it seems the hdcd filter cannot be combined with any other filter. I don't know why.
After further investigation, the hdcd filter forces automatic resampling to be disabled and this is the cause of the error. To work around this, you need to add manual resampling of the filter outputs by doing this:

convOut=-af "hdcd, aresample, volume=replaygain=track, aresample"
(22-08-2021 16:00)simoncn Wrote: [ -> ]After further investigation, the hdcd filter forces automatic resampling to be disabled and this is the cause of the error. To work around this, you need to add manual resampling of the filter outputs by doing this:

convOut=-af "hdcd, aresample, volume=replaygain=track, aresample"

Thanks for taking time to carry out further investigations and for providing the convOut command, especially as this is probably a minority use case!

The handful of albums I have with HDCD logo have album Replaygain values between -3dB and -6bB. As the HDCD filter is applying 6dB reduction I was thinking of removing Replaygain tags from the HDCD files as a further reduction shouldn’t be needed.
Yes, this makes sense.
It's been on my 'to do' list for some time to address my HDCD discs so I've just spent the last day trying to understand the basics, and the best way to handle it, and I thought I'd write it down just in case it's of any use to anyone.

Firstly, most discs (at least in my collection) that were flagged as HDCD shouldn't have any special decoding applied, they should be left and played as standard Red Book. It appears that any disc that was mastered using Pacific Microsonics A/D converter will light up as HDCD, even if they don't use Peak Extend or Low Level Range Extension (the features that need special handling during the decode stage) e.g. Audio Fidelity HDCD discs only implemented the transient filters feature (used during the mastering stage).

So, the first thing is to identify which need decoding. For that I used FFmpeg, and modified a script I found here.
CUETools can also be used, and to verify the findings of ffmpeg I ran this in batch across my collection, which resulted in certain discs being flagegd as HDCD, but it was only when you scanned the disc individually that you get the detail of which features were active:
Code:
HDCD: peak extend: yes, transient filter: none, gain: -4.0dB..0.0dB.

This left me with 7 discs from 35 that needed decoding.
I did a quick test, and DBPowerAmp (without gain enabled) and CUETools produced the same results (the audio md5) with FFmpeg differing slightly (which is to be expected) so I settled with CUETools as I use it in my workflow anyway.
I then applied ReplayGain tags to the resulting files for use in foobar and MinimServer. This is safer than applying a static +6dB increase during the decode process which you can apply in DBPowerAmp, as whilst not all discs have LLE applied, most do and it could result in clipping.

Finally I renamed the 16bit source HDCD files to .hdcd.flac so I could exclude them from foobar (only accepts excluding based on file extension) whilst also working for the MinimServer excludePattern, as I didn't want to have both visible.

So now I've decoded them manually, my MinimServer config doesn't have any HDCD processing active, just ReplayGain which I use anyway.

Hope this is of some use, even if just for the tool selection.
Thanks for sharing this. Although more work than using a stream.options convOut setting, it will produce better results.
Unless something has changed my understanding is that using '-af hdcd' would adversely affect the remaining 99.6% of my music collection (at least with my testing of ffmpeg directly it does)? I know I can turn the volume up, but not sure I'd trust myself to turn it back down once I've finished listening, so it doesn't blow the speakers when I listen to other sources (or hdcd tracks).

I know there has been some talk of introducing/increasing the replaygain values on the rest of the collection, but that feels like a real hack.

I only ran the ffmpeg code against the first track of each disc (01*.flac) and it gave me consistent results to CUETools, so it wouldn't take long to know what work has to be done, and it's less than a minute for the conversion itself so you'd probably be sorted in a few hours (I know there were some artists that made extensive use of HDCD so that estimate will vary dramatically!).
Pages: 1 2 3 4 5 6 7
Reference URL's