Plex, Sonos, and Hi Res music content (24bit/32bit 48kHz/88.2kHz/176.4kHz/192kHz)

Sonos has released the S2 app and firmware and the marketing has indicated there will be support for hi res content. I’m told that this is currently enabled for the Sonos local files library only, but I imagine we will see support extended to hi res services like Tidal and Qobuz soon.

Is this something that the current Plex Sonos implementation will be able to detect as soon as it’s available and direct play our hi res files automatically? Or will work need to be done on the Plex side to allow this?

I believe that currently anything above 16bit 48kHz is transcoded to AAC by Plex. I’d love to see a solution where the server transcodes files outside the limits to 16/48 lossless for devices on the S1 app/firmware and direct plays for S2 devices.

8 Likes

I agree on this one. Just installed Plex and realized my lossless 24-bit files are being converted to lossy AAC files when playing from Plex on my Sonos Beam. Sonos S2 systems now support 24-bit (44.1kHz/48kHz, FLAC/ALAC) per https://support.sonos.com/s/article/79?language=en_US.

1 Like

Thanks for chiming in @chrisgonyea! Then the ideal would be

If S1 hardware/software detected > Plex passthrough of 16bit, 44.1kHz, and 48kHz streams. Transcode to max quality supported without upsampling everything outside those limits.

If S2 hardware/software detected > Plex passthrough of 16bit, 24bit, 44.1kHz, and 48kHz streams. Transcode to max quality supported without upsampling everything outside those limits.

Examples:
A 24bit 192kHz stream would be transcoded to 16/48 for S1, 24/48 for S2.
A 24bit 44.1kHz stream would be transcoded to 16/44 for S1, direct played for S2.

There is a possible current workaround for this functionality - if you have Plex for iOS it does direct play all media up to 24/192 and you can then AirPlay to some Sonos devices. AirPlay 2 supports lossless up to 48kHz and “various bit depths” according to the Apple launch presentation at WWDC. What this means exactly has never been nailed down but presumably it downsamples anything outside the limits on the fly meaning you could be getting up to 24/48 once Sonos supports it for AirPlay.

5 Likes

Hear hear! I have a very big music library containing many files of 24/192 or higher. For playing in my secondary system, which is Sonos-based and in a different location, I converted all these files to either 16/44.1 or 16/48 flac, depending on the source. But I started running into the library limitation inherent in Sonos, so I installed Plex to get around this. But it appears that when Plex plays my flac files it transcodes them to 320kbs. It’d be great if Plex implemented Kid_Amnesiac’s above suggestion.

3 Likes

Chiming in, also want to see FLAC direct play on Sonos S2!

3 Likes

On the road to a possible solution here if your home is all on S2 - I think this can be configured with a custom profile.

The default profiles are stored at your install path Plex\Plex Media Server\Resources\Profiles. The default Sonos profile already seems to have upper limits set for 16/48. According to this guide, if you create a profile at Users\[username]\AppData\Local\Plex Media Server\Profiles it will override the default.

I copied the Sonos profile to the user profiles folder. I then upped the bit depth limit to 24, commented out the upper limit for bitrate, and changed the transcode target from aac to flac. Restarted Plex, but it’s still transcoding 24/48 files that should be direct played.

Does anyone know how to configure the Sonos profile xml so that it functions as in the S2 example in my most recent reply to this post?

EDIT
On further research, it would seem that custom profiles are only “officially” supported for DLNA devices. Does this mean there’s no way for users to override the default profile for Sonos?

Any updates, Plex?

…Anyone? Can we get some help with this custom profile? I copied the Sonos profile from

\Program Files (x86)\Plex\Plex Media Server\Resources\Profiles

to

\Users[Me]\AppData\Local\Plex Media Server\Profiles

and updated the bit depth upper bound to 24. Restarted Plex and it’s still transcoding anything above 16/48 to aac. How can we accomplish the following?

  1. Direct play all lossless codecs <= 24/48
  2. Transcode all lossless codecs > 24/48 to the most efficient lossless codec at 24/48
  3. Retain other lower bounds in the standard profile and transcode these to aac like the default profile
<?xml version="1.0" encoding="utf-8"?>
<Client name="Sonos">
  <!-- Author: Plex Inc. -->
  <TranscodeTargets>
    <MusicProfile protocol="hls" container="mpegts" codec="aac" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <MusicProfile container="mp4" codec="aac,mp3" />
    <MusicProfile container="mp3" codec="mp3,mp2" />
    <MusicProfile container="flac" codec="flac" />
    <MusicProfile container="ogg" codec="vorbis" />
    <MusicProfile container="asf,wma" codec="wmav2" />
  </DirectPlayProfiles>
  <ContainerProfiles>
    <MusicContainer name="mp4">
      <Limitations>
        <Match name="part.optimizedForStreaming" value="1" isRequired="true" />
      </Limitations>
    </MusicContainer>
  </ContainerProfiles>
  <CodecProfiles>
    <MusicCodec name="*">
      <Limitations>
        <UpperBound name="audio.samplingRate" value="48000" />
        <LowerBound name="audio.samplingRate" value="8000" />
        <Match name="audio.samplingRate" list="8000|11025|16000|22050|24000|32000|44100|48000" />
        <UpperBound name="audio.channels" value="2" />
        <UpperBound name="audio.bitDepth" value="24" />
        <UpperBound name="audio.bitrate" value="1411" />
      </Limitations>
    </MusicCodec>
    <MusicCodec name="wmav2">
      <Limitations>
        <UpperBound name="audio.bitrate" value="355" />
      </Limitations>
    </MusicCodec>
    <MusicCodec name="vorbis">
      <Limitations>
        <UpperBound name="audio.bitrate" value="320" />
      </Limitations>
    </MusicCodec>
    <MusicCodec name="mp3">
      <Limitations>
        <LowerBound name="audio.samplingRate" value="16000" />
      </Limitations>
    </MusicCodec>
  </CodecProfiles>
</Client>

Is that supported by Sonos? I was under the impression they only support extended formats in a local Sonos library (or on an Android).

I think Plex counts as an “Internet radio station”, for a few reasons. But I’m not positive.

Only one way to find out and that’s to send a Sonos device the signal and see what happens. For that we need help with the profile since Plex is forcing transcodes for anything above 16/48.

Come on @elan can you just give us some comment on what’s going on here? If this is outside your control due to the way Sonos integrates with Plex, please just say so.

The S2 controller may enable playback of higher than 16-bit FLAC, but as far as an integrated service can tell there is nothing distinguishing between an S1 or S2 controller. Neither the older music API or the newer cloud services we use for casting expose the version of the controller. To further complicate things neither receives any sort of feedback if playback fails, so we’re not able to try high res and fall back.

As a result we need to support the least common denominator, which is 16-bit FLAC.

2 Likes

Even switching to transcode everything to 16-bit FLAC is an improvement over lossy AAC. So if that is possible, it would be great to see it happen.

As far as Sonos exposing info on controller versions, is there a way to get a request to Sonos to add that to their API? Seems like something they should have.

2 Likes

@johnclayton can we get some clarity on if custom profiles are supported outside of DLNA devices and possibly some help with a custom profile to accomplish hi res playback for those of us who exclusively use Sonos devices that support it? I see some information that suggests custom profiles only work for DLNA, but also plenty of recent threads where people indicate they are using custom profiles for things like iOS and tvOS. My own recent attempts at creating a custom profile for Sonos seem to have no effect at all.

@chrisgonyea agreed. If it’s just not feasible to support hi res in any way yet, it would be great if the default profile would transcode anything outside the 16bit 48kHz limit to lossless within the limits without upsampling instead of lossy AAC while retaining lossy AAC transcoding for files on the lower limit side of things. If that is too complicated to implement, even forcing all transcodes to 16/48 lossless would be better than what it is now. I believe AirPlay 2 transcodes everything to 24/48 lossless in this fashion.

1 Like

I would also like to get a working solution for this.
Just got the new Sonos Amp and love the Plex integration into the Sonos app. Could not find any other amps that had this feature along with the other features that Sonos Amp has.

I am disappointed in Plex transcoding down to ACC at 258 as it sounds horrible. Even a S1 sonos speaker can do 48/16 so why don’t transcode to that format? I am basically not going to use the Plex integration for now as I have many higher res music and it dropping to ACC is just plane wrong.

Just listening to one now to check on the ACC Kbps value and going to have to turn it off!

If the Plex wizards can get this sorted it would be a great Christmas Present :slight_smile:

1 Like

Don’t know if this is helpful at all or maybe it’s already been discussed, but I found that if I play a song/album from plex from within the sonos app it transcodes down. If I play the same song/album on plexamp and then cast it to a sonos speaker it direct plays just fine. I can then go back to the sonos app and add more rooms or skip to the next song in the album and it continues as a direct play.
This is the work around I’ve gone with for now.

1 Like

@Burning_Beard we had discussed that we can AirPlay hi res (probably forcibly sampled at 24/48) from Plex for iOS but yours is another interesting workaround. Thank you!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.