Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HDCD CDs and transcoding
09-07-2019, 22:06
Post: #11
RE: HDCD CDs and transcoding
Hi Simon, wow, that is great information and sounds very encouraging, thanks! I just acquired a 3-CD set that is HDCD-encoded and the HDCD "Peak Extension" flag is enabled, meaning that proper HDCD decoding is necessary for maximum sound quality. I will rip it to 16/44.1k FLAC and follow your very clear and precise instructions to set up the HDCD decoding. Thanks again!

Melco HA-N1ZH60 Mk. 1 -> USB -> Matrix X-SPDIF 2 -> I2S -> PS Audio DirectStream Sr. -> XLR -> Mark Levinson No. 326S -> RCA -> JL Audio E-Sub e110 (active crossover @ 100 Hz) -> RCA -> Bryston 4B3 -> Magnepan .7
Find all posts by this user
Quote this message in a reply
10-07-2019, 18:40
Post: #12
RE: HDCD CDs and transcoding
Interesting discussion. Couple of thoughts.

Transcoding all 16-bit FLAC to WAV24 with the HDCD filter via ffmpeg is good for the HDCD-encoded files, but it may or may not be good for regular 16-bit sources, depending on what the DAC does with the stream? I've never been convinced that packing a 16-bit source into a 24-bit stream actually sounds better with my Linn streamers, in fact I think it sounds worse. But that might depend on my hearing or on how the 16 bits are upsampled by the DAC?

For the very small number of HDCD-encoded titles in my collection, I have previously decoded at the ripping stage with the dbpoweramp utility, I'm curious to compare with in-play conversion via ffmpeg. Anyway, just an observation: I notice that the pre-decoded FLAC files that put the decoded HDCD in a 24-bit container are much smaller than their ALAC equivalents. You can flip back and forth between FLAC and ALAC and see this. Could the FLAC compression algorithm be spotting that the true bit depth is not 24 bit, and able to apply much greater degree of lossless compression than ALAC does? Not knowing any of the technical detail of FLAC vs ALAC, I have always just noticed this as a curiosity. It's a moot point if the file is not pre-decoded.
Find all posts by this user
Quote this message in a reply
11-07-2019, 09:14 (This post was last modified: 16-07-2019 20:17 by simoncn.)
Post: #13
RE: HDCD CDs and transcoding
On your first point, the HDCD decoding process looks for HDCD markers in the audio data and makes gain adjustments when it sees these markers. If these markers are not present, no gain adjustments are made and the output audio data sent to the DAC should be identical to the input audio data.

Edit: The above is incorrect. See this post.

I don't have sufficently detailed knowledge of the FLAC and ALAC encoding algorithms to comment on your second point.
Find all posts by this user
Quote this message in a reply
12-07-2019, 02:11
Post: #14
RE: HDCD CDs and transcoding
I am back to ripping HDCDs to 24-bit FLAC files with dBpoweramp. In my system, the ffmpeg HDCD decoder seems to decrease the volume of even non-HDCD FLAC rips, and rather dramatically so.

Melco HA-N1ZH60 Mk. 1 -> USB -> Matrix X-SPDIF 2 -> I2S -> PS Audio DirectStream Sr. -> XLR -> Mark Levinson No. 326S -> RCA -> JL Audio E-Sub e110 (active crossover @ 100 Hz) -> RCA -> Bryston 4B3 -> Magnepan .7
Find all posts by this user
Quote this message in a reply
12-07-2019, 09:10
Post: #15
RE: HDCD CDs and transcoding
Do you see this volume reduction for all non-HDCD FLAC files or only some of them? I will try this myself on a few test tracks.
Find all posts by this user
Quote this message in a reply
12-07-2019, 10:33
Post: #16
RE: HDCD CDs and transcoding
I tried this on a couple of non-HDCD files and there is a volume reduction of approximately -6dB when using -af hdcd. From a bit of web searching, it seems this volume reduction is expected. I presume the FFmpeg hdcd filter does this to allow for a +6dB boost if/when this is signalled by an HDCD marker in the audio data (if any such markers are found). With a non-HDCD file, no markers are found and the whole file plays with a reduced volume level.

When you apply HDCD decoding as part of the ripping process, do you activate this selectively for albums that you know to be HDCD-encoded?
Find all posts by this user
Quote this message in a reply
13-07-2019, 17:48 (This post was last modified: 13-07-2019 18:06 by GreenMtnGringo.)
Post: #17
RE: HDCD CDs and transcoding
Hi Simon and thanks for testing and reporting back. It seems your findings match mine, that is, the FFmpeg HDCD filter chops all file playback by 6 dB regardless of whether the file is HDCD-encoded. To me, that is a major flaw in the filter. I believe the Foobar2000 HDCD plug-in I linked above only kicks in when it encounters an HDCD-encoded file.

As far as HDCD ripping is concerned, I only use dBpoweramp when ripping HDCDs to 24-bit, 44.1k FLAC files, so I leave the ripper's HDCD DSP Effect on at all times. It is my understanding that there is no harm in ripping a non-HDCD disc with the HDCD DSP Effect on, as the Effect supposedly only kicks in when it encounters an HDCD disc. As explained in this dBpoweramp link (my emphasis):

"Depending upon which audio player is used, if the player can handle 24 bit audio files, then adding the DSP effect HDCD is useful, in that any HDCD audio CDs (a special encoded audio CD with 20 bits of encoded audio information) will be detected and encoded to a 24 bit audio file, non HDCDs are left at 16 bit."

Melco HA-N1ZH60 Mk. 1 -> USB -> Matrix X-SPDIF 2 -> I2S -> PS Audio DirectStream Sr. -> XLR -> Mark Levinson No. 326S -> RCA -> JL Audio E-Sub e110 (active crossover @ 100 Hz) -> RCA -> Bryston 4B3 -> Magnepan .7
Find all posts by this user
Quote this message in a reply
14-07-2019, 08:17
Post: #18
RE: HDCD CDs and transcoding
I don't see how the FFmpeg filter could know in advance whether or not HDCD information is present at some point in the audio that the filter hasn't read yet (so that it can only apply the -6dB reduction if HDCD information is present). In contrast, processing performed at the ripping stage can scan the whole file and identify whether the file is HDCD or not.

Forum discussions that I have seen suggest that the user can compensate for this -6dB reduction by adding album gain or track gain tags to non-HDCD files. This isn't ideal but is probably the best that can be achieved with the filtering approach.
Find all posts by this user
Quote this message in a reply
14-07-2019, 13:54 (This post was last modified: 14-07-2019 13:55 by GreenMtnGringo.)
Post: #19
RE: HDCD CDs and transcoding
Hi Simon. FWIW, the author of the HDCD plugin for Foobar2000 claims his plugin does not reduce the volume on non-HDCD files. See Reply #29 of this thread:

https://hydrogenaud.io/index.php/topic,7...#msg699511

Melco HA-N1ZH60 Mk. 1 -> USB -> Matrix X-SPDIF 2 -> I2S -> PS Audio DirectStream Sr. -> XLR -> Mark Levinson No. 326S -> RCA -> JL Audio E-Sub e110 (active crossover @ 100 Hz) -> RCA -> Bryston 4B3 -> Magnepan .7
Find all posts by this user
Quote this message in a reply
14-07-2019, 15:04
Post: #20
RE: HDCD CDs and transcoding
The claim is that this "fixes CD ripping", not playback of a file that was already ripped as 16-bit.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)