Jump to content

DSD 2.8Mhz sent as PCM 352 Mhz


Veggav

Recommended Posts

Veggav

Hey, I'm testing emby as a streamer for my music collection with *.dsf files (DSD) and I'm trying to play it using USB Audio Player Pro using a usb external DAC that supports native DSD. 

The problem is that while looking at the metadata it shows dsf but when it starts playing it will send it as PCM 352Mhz. 

 

I have enabled DLNA debug logging and debug loggin on logs tab but I don't see a specific log for DLNA service. 

 

@Luke can you take a look and let me know if you see something wrong? 

As far as I can see the player repports DSD, dsf, dff capabilities and still ffmpeg tries to transcode and fails. 

Not sure what's going on. 

 

Any other info would be appreciated.

 

log dsd.txt

Link to comment
Share on other sites

Veggav

So, I fixed this for MiniDLNA that has the same problem:

https://github.com/fandangos/minidlna/commit/0f402a51120ca19d15d70291ae3d9cd629d76062

and it was also fixed for Gerbera DLNA 

https://github.com/gerbera/gerbera/issues/2401

 

now, only if Emby would allow for mime type manipulation, Emby could be an option to stream DSD over DLNA without converting to PCM.

 

 

Link to comment
Share on other sites

Veggav

I have yet to find a device that supports DSD bitstream that doesn't behave this very same way. 

There are 2 possible ways to use DLNA, as you might already know, from the player accessing the server and using another application to access the server and play the content on another renderer. 

This problem happens in both scenarios. 

 

I have tested this with Jriver Renderer on Windows using ASIO drivers and a USB DAC that supports DSD up to DSD512.

Sending the access command from the android phone using BubbleUPnP or accessing the server from Jriver.

 

Tested with USB Audio Player Pro on Android phone or Nvidia Shield using a USB DAC that supports DSD.

Acessing the DLNA server from the phone or sending the access command from BubbleUPnP using another phone. 

Using SMB it will not down convert to PCM 352 Mhz.

 

Tested with Neutron Music Player app on android phone using the USB DAC, acessing the server using the DLNA.

Using SMB will not down convert either.

 

Using a Denon 4300X receiver that supports DSD and sending the content using BubbleUPnP,  Denon will show 2.8Mhz but you can clearly see on BubbleUPnP that it is sending PCM 352 Mhz. I believe Denon doesn't have any other info to display while playing DSD content, basically because the lowest sample rate that DSD has is DSD64, meaning 2.8Mhz.

 

I can further test this with OPPO 203 and Foobar2000 using SACD plugin but I think it's pretty clear that this is a problem experienced with all renderers. 

 

The good news, @Luke, is that you don't have to break anything on Emby to allow for proper DSD playback using MIME type manipulation. 

Emby could do the same as Gerbera DLNA server does:

 

<extension-mimetype >
    <map from="dsd" to="audio/x-dsd"/>
    <map from="dff" to="audio/x-dsf"/>
    <map from="dsf" to="audio/x-dsf"/>
</extension-mimetype>
<mimetype-contenttype>
    <treat mimetype="audio/x-dsd" as="dsd"/>
    <treat mimetype="audio/x-dsf" as="dsf"/>
</mimetype-contenttype>
<contenttype-dlnaprofile>
    <map from="dsd" to="DSD"/>
    <map from="dsf" to="DSF"/>
</contenttype-dlnaprofile>

 

Let the user decide, you can still leave x-dsd for *.dsf and *.dff the same way it is today but have a tab with the mime type exposed in dlna advanced settings to the end user to change.

DSD isn't part of DLNA specifications, so each manufacturer and developer chooses how it's suppose to render and many systems, including SACD capable ones like the Playstation 3, that can actually play SACD, over HDMI, down converts to PCM. 

 

It's a niche use case, I know, but very much appreciated for audiophiles and a change that will not break any emby functionality. 

I'm asking this, even that I can use MiniDLNA and Gerbera for now because Emby has the best interface, by far, when browsing media. 

 

Please, considere this change that I believe will benefit others and thanks for reading this lenght message. :) 

Edited by Veggav
Link to comment
Share on other sites

So it looks like we just need to change the content-type on the http responses for these:

<map from="dsd" to="audio/x-dsd"/>
    <map from="dff" to="audio/x-dsf"/>
    <map from="dsf" to="audio/x-dsf"/>

Is that correct?

Link to comment
Share on other sites

Veggav

Nice.

Let me know if it goes into the beta releases so I can test it and give a proper feedback to help.

Edited by Veggav
  • Thanks 2
Link to comment
Share on other sites

  • 3 months later...
On 7/23/2022 at 4:44 AM, Veggav said:

The good news, @Luke, is that you don't have to break anything on Emby to allow for proper DSD playback using MIME type manipulation. 

Emby could do the same as Gerbera DLNA server does:

 

<extension-mimetype >
    <map from="dsd" to="audio/x-dsd"/>
    <map from="dff" to="audio/x-dsf"/>
    <map from="dsf" to="audio/x-dsf"/>
</extension-mimetype>
<mimetype-contenttype>
    <treat mimetype="audio/x-dsd" as="dsd"/>
    <treat mimetype="audio/x-dsf" as="dsf"/>
</mimetype-contenttype>
<contenttype-dlnaprofile>
    <map from="dsd" to="DSD"/>
    <map from="dsf" to="DSF"/>
</contenttype-dlnaprofile>

 

 

Is there anyway to edit a user config file myself on macOS to get this to work? doesn't look like this change has been made available yet.

Link to comment
Share on other sites

On 7/24/2022 at 3:25 PM, Luke said:

OK we'll get this into the next release of the server. Thanks.

Hi Luke, would be nice if DLNA worked with DSF files. This is the main reason I'm trying to run DLNA. Is there a beta version that has these changes enabled? 

Link to comment
Share on other sites

1 hour ago, mmc227 said:

Hi Luke, would be nice if DLNA worked with DSF files. This is the main reason I'm trying to run DLNA. Is there a beta version that has these changes enabled? 

Everything discussed in this topic is already in the release version of the server. Let's start from the beginning.

Thanks !

Link to comment
Share on other sites

I had no idea this was merged. That's why I didn't reply with testing, just noticed this today with people commenting. 

Ok, so... tested this today and I can report a partial success. 

 

Version 4.7.8.0

Tested with Jriver -> USB DAC Topping D10. I can send the command from my android phone using Bubble UPnP to Jriver DLNA renderer. 

While it still shows as PCM 352KHz:

https://i.ibb.co/0hqqCCy/Screenshot-20221104-084515-Bubble-UPn-P.jpg

 

You can see here that it's actually sending DSD 2.8Mhz

https://i.ibb.co/7pRGmXQ/20221104-084529.jpg

 

But as you can see here:

https://i.ibb.co/TR0fdGh/Screenshot-20221104-085442-Bubble-UPn-P.jpg

While it's correctly reporting as DSF and this fix the problem the bitrate is still incorrect.

 

I'm running a self compiled docker version of MiniDLNA with this changes:

https://github.com/janforman/minidlna/commit/0f402a51120ca19d15d70291ae3d9cd629d76062

It's now reporting correctly .dsf and 2.8Mhz.

While MiniDLNA had the bitrate part correct it needed the correct mime so I fixed it.

 

Probably Emby needs the same changes made to Gerbera DLNA server here:

https://github.com/gerbera/gerbera/pull/2407/commits/29c23d42d4c44926b7e1783a68dc72c029dee5ec

Gerbera let the user change de mime type and the extension of the stream but had the bitrate part wrong. 

Now it's fixed.

 

If you need same sample file for testing, let me know but since Emby uses FFMpeg the same as Gerbera, it's very comprehensive to look at the commit and add it. 

 

EDIT: I guess no BBCode img posting allowed so only links to the images are provided.

Edited by Veggav
Link to comment
Share on other sites

On 11/4/2022 at 8:14 AM, Veggav said:

Probably Emby needs the same changes made to Gerbera DLNA server here:

https://github.com/gerbera/gerbera/pull/2407/commits/29c23d42d4c44926b7e1783a68dc72c029dee5ec

Gerbera let the user change de mime type and the extension of the stream but had the bitrate part wrong. 

Now it's fixed.

 

If you need same sample file for testing, let me know but since Emby uses FFMpeg the same as Gerbera, it's very comprehensive to look at the commit and add it. 

 

EDIT: I guess no BBCode img posting allowed so only links to the images are provided.

Is that when they're pulling media info from the file, or transcoding it for playback?

Link to comment
Share on other sites

On 11/6/2022 at 12:11 AM, Luke said:

Is that when they're pulling media info from the file, or transcoding it for playback?

 

Sorry for the late reply again, I'm not getting the e-mails for some odd reason.

It's Pulling media info, before playback starts. 

The reason is, DSD is 1bit audio file that's why bitrate needs to be multiplied. 

Edited by Veggav
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...