MinimServer Forum
HDCD CDs and transcoding - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: MinimStreamer (/forumdisplay.php?fid=11)
+--- Thread: HDCD CDs and transcoding (/showthread.php?tid=1502)

Pages: 1 2 3 4 5 6


RE: HDCD CDs and transcoding - Alandbush - 22-02-2021 22:53

(22-02-2021 22:23)simoncn Wrote:  The OP has said that his renderer cannot handle WAV streams.

True, but once decoded the file can be transcoded by MinimStreamer as per other wav files.


RE: HDCD CDs and transcoding - simoncn - 22-02-2021 23:05

Transcoded to what? Apparently the only format the renderer can handle is 24-bit linear PCM.


RE: HDCD CDs and transcoding - Alandbush - 23-02-2021 00:14

(22-02-2021 23:05)simoncn Wrote:  Transcoded to what? Apparently the only format the renderer can handle is 24-bit linear PCM.

Oops, sorry. I don't think I appreciated the difference at the time.

I have read that PCM is little endian and LPCM is big endian.
If true could the OP use
Code:
-af hdcd -c:a pcm_s24be
or is this ignored/superceded/replaced by the wav:L24; option?


RE: HDCD CDs and transcoding - simoncn - 23-02-2021 00:21

L24 is similar to 24-bit linear PCM expect that the bytes for each sample are in a different order. This order is very strange and is neither big nor little endian (really!)

L24 is indicated by the MIME type audio/L24. There might be a MIME type for 24-bit linear PCM but I don't know what it is. Having a MIME type is essential for UPnP streaming (but not for local playback, such as via USB) because the MIME type is what tells the renderer how to decode the bits that it receives.


RE: HDCD CDs and transcoding - Alandbush - 23-02-2021 00:32

(23-02-2021 00:21)simoncn Wrote:  L24 is similar to 24-bit linear PCM expect that the bytes for each sample are in a different order. This order is very strange and is neither big nor little endian (really!)

L24 is indicated by the MIME type audio/L24. There might be a MIME type for 24-bit linear PCM but I don't know what it is. Having a MIME type is essential for UPnP streaming (but not for local playback, such as via USB) because the MIME type is what tells the renderer how to decode the bits that it receives.

Thanks for the explanation Simon.

Is that peculiar to 24bit, i.e. is the order of 16bit PCM the same as 16bit LPCM?


RE: HDCD CDs and transcoding - vkshankar - 23-02-2021 01:05

From the logs I attached earlier it is clear that FB2K UPnP server is sending audio/L16 and not audio/L24 !!!

Yet I think the renderer knows that it is getting a HDCD encoded lpcm/L16 stream.

Is it possible that the foobar2000 UPnP server is sending L16, but is setting an HDCD flag on the stream, which the renderer is reading and applying HDCD decoding on the 16bit lpcm stream?

The reason I ask is from the fb2k log file I have attached, I see only L16 being sent to the renderer. The fb2k UPnP server inserts a HDCD tag on the stream url.

If I disable/delete the fb2k hdcd plugin, the url does not contain the HDCD tag. Also I hear a 4 to 6 db volume reduction at the renderer playback if I stream with vs. without HDCD tag.

Relevant sections in log highlighted in yellow in the attached log.


RE: HDCD CDs and transcoding - simoncn - 23-02-2021 10:40

Thanks for this log. I don't see any HDCD tag on the stream URL. The only reference to HDCD is in a log message from foo_upnp.

An HDCD-encoded file has an HDCD flag within the 16-bit audio data. Streaming this 16-bit data "as is" makes this HDCD flag available to the renderer. This enables the renderer to perform HDCD decoding if it has the ability to do this. This post says that the BDP-83 does have this capability and that it is enabled by a setting on the BDP-83. Enabling this setting makes the average playback level 6dB quieter.

What happens if you use MinimStreamer to stream the file as L16;44 without -af hdcd and with the BDP-83 HDCD setting enabled? From the above, I would expect the BDP-83 to receive and decode the HDCD data in the 16-bit audio stream, making the playback level 6dB quieter. Does it do this?


RE: HDCD CDs and transcoding - vkshankar - 23-02-2021 18:28

Yes you are right, my bad, HDCD flag is in foo_upnp section log and not in the URL.

On minimserver2/minimstreamer with L16 out without -af hdcd flag, it works but output volume is not attenuated. In fact this is the only setting in which I am able to get anything (redbook CDs) to the renderer and played back.

f2bk L16 stream plays back without the volume attenuation if I delete the HDCD decode plugin in f2bk. In this respect, it behaves the same as the minimserver2/streamer.

In addition to the LSB on every 16bit sample sent to the renderer (LSB of every sample is supposed to hold the HDCD encoding), I am thinking there may be something else in the stream that indicates to the renderer that the incoming L16 stream is HDCD encoded. The renderer's HDCD decode is based on that indication.


RE: HDCD CDs and transcoding - simoncn - 23-02-2021 20:31

Is there a setting on the BDP-83 to enable or disable HDCD? If so, how do you have this set?

It could be that the HDCD decode plugin in foobar2000 (when constrained by 16-bit output) is adjusting the average level down as part of making a best effort to reproduce the original waveform with some compromise because the full 20-bit range is not available.

Edit: see this page.


RE: HDCD CDs and transcoding - vkshankar - 23-02-2021 23:28

(23-02-2021 20:31)simoncn Wrote:  Is there a setting on the BDP-83 to enable or disable HDCD? If so, how do you have this set?

It could be that the HDCD decode plugin in foobar2000 (when constrained by 16-bit output) is adjusting the average level down as part of making a best effort to reproduce the original waveform with some compromise because the full 20-bit range is not available.

Edit: see this page.

Yes. there is a setting to enable HDCD in the Oppo menu and I set it to enabled all through these experimentations. I will disable it and see if I still see the reduced output levels for a stream from fb2k server w/ HDCD plugin. This should confirm if f2bk HDCD plugin is doing a best effort or if indeed Oppo decoding the incoming stream. Will report on this soon.