Jump to content

[Sonos] FLAC transcoding


Recommended Posts

Posted

Great job on Emby. I plan to move in from Plex.

 

I have a Sonos player : bit depth: 16 bits, 24 bits;  sample rate: 16khz, 22.05khz, 24khz,32khz,44.1khz,48khz.

I have FLAC music library with files in the sample rates : 44.1khz, 88khz, 96khz, 192khz.

I would like :

- Direct play all files with sample rate below or equals 48khz.

- Down sample (and keep FLAC format) all files with samples rate greater than 48khz down to 48khz : Best quality Sonos can play.

 

In Emby, I have 2 options:

1) Sonos Plugin seems to send FLAC stream directly to the player without transcoding.

Only my FLAC 44.1khz can be played.
Is there a way to configure transcoding rules (such as profile in DLNA) or is it possible to implement transcoding to Sonos supported format (described here https://support.sonos.com/s/article/79?language=en_US).

Typically, in my use case, it would consist in down sample all sample rate greater than 48khz down to 48khz.

 

2) Currently, a better alternative is using DLNA with the profile :
 

  <DirectPlayProfiles>
	<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
  </DirectPlayProfiles>
  <TranscodingProfiles>
    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />
  </TranscodingProfiles>	
  <ContainerProfiles />
  <CodecProfiles>
    <CodecProfile type="Audio" container="flac">
      <Conditions>
        <ProfileCondition condition="LessThanEqual" property="AudioSampleRate" value="48000" isRequired="true" />
      </Conditions>
      <ApplyConditions />
    </CodecProfile>	
  </CodecProfiles> 

It permits to direct play all FLAC format with sample rate below 48khz, and transcode to MP3 for sample rate greater than 48khz.

But, all my Hi Res FLAC are degraded to MP3 ☹️.

Would it be possible to set the output audio sample rate (during transcoding) according to the ProfileCondition rule (here 48khz).

In that case, the following profile will down sample my Hi Res FLAC to the best sample rate supported by Sonos :

  <DirectPlayProfiles>
	<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
  </DirectPlayProfiles>
  <TranscodingProfiles>
    <TranscodingProfile container="flac" type="Audio" audioCodec="flac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />
  </TranscodingProfiles>	
  <ContainerProfiles />
  <CodecProfiles>
    <CodecProfile type="Audio" codec="flac">
      <Conditions>
        <ProfileCondition condition="LessThanEqual" property="AudioSampleRate" value="48000" isRequired="true" />		
      </Conditions>
      <ApplyConditions />
    </CodecProfile>	
  </CodecProfiles>

Same question for AudioBitrate : perhaps it is already done (I did not test it).

I know DLNA change is feasible in Jellyfin. I even suggested a pull request (https://github.com/jellyfin/jellyfin/pull/4361) to integrate that feature.

It would be great having the same feature in Emby.

Thanks a lot for your work,

Stephane

Posted

HI there, yes this is something that we can look at in a future update. Thanks for reporting.

  • 7 months later...
Posted

I happen the same all my audio in flac transcoding them to mp3 😭 on my appletv 

 

vdatanet
Posted
10 hours ago, embyeros said:

I happen the same all my audio in flac transcoding them to mp3 😭 on my appletv 

 

Please, send your transcoding log in your thread on the Apple TV forum, because I direct play my FLAC files. Apple TV supports FLAC audio.

  • 1 year later...
Posted

Is there any update on this? Also, is there a link where I can find what formats/bitrates are supported by current emby Sonos controller?

Posted
50 minutes ago, embixer1 said:

Is there any update on this? Also, is there a link where I can find what formats/bitrates are supported by current emby Sonos controller?

HI, what exactly are you asking for? You can send any Emby-supported content to Sonos for playback. If it's not supported by the Sonos then the server will transcode it to a compatible format.

Posted (edited)
On 1/3/2023 at 11:30 PM, Luke said:

HI, what exactly are you asking for? You can send any Emby-supported content to Sonos for playback. If it's not supported by the Sonos then the server will transcode it to a compatible format.

Looks like my transcoding is broken then. Going in the server setting, I see transcoding is enabled. Yet, I can only play pure mp3. Anything else, if I connect to a Sonos speaker, the play button just does not work. Clicking it does not even respond. I am on 4.7.11.0 server version on a Synology DS 920+ NAS with DSM 7.0 OS. All my Sonos speakers are Sonos One V2.

Edited by embixer1
  • 4 months later...
  • 1 year later...
vdatanet
Posted

Hello,

When I play music above 48 khz it is not transcoded. Sonos only supports music up to 24 bit/48 Khz. The same happens in Sonos One and Sonos Port. What should I do for it to be transcoded?

I use the SONOS plugin not the DLNA server.

greetings

embyserver.txt

vdatanet
Posted

Please, does the SONOS plugin support transcoding?

Posted

Hi @vdatanet please see if the latest update to the Sonos plugin resolves the issue. Thanks.

vdatanet
Posted
2 hours ago, Luke said:

Hi @vdatanet please see if the latest update to the Sonos plugin resolves the issue. Thanks.

No, It's still trying direct play above 48 Khz

  • 2 weeks later...
Posted
On 4/13/2025 at 1:18 AM, vdatanet said:

No, It's still trying direct play above 48 Khz

What version of the sonos plugin do you have?

vdatanet
Posted
26 minutes ago, Luke said:

What version of the sonos plugin do you have?

1.0.28.0

Posted

If you view the song detail screen in the web app, does it show the correct sample rate?

vdatanet
Posted
24 minutes ago, Luke said:

If you view the song detail screen in the web app, does it show the correct sample rate?

Yes, Using web app SFN shows the correct sample rate:

Capturadepantalla2025-05-01alas19_27_56.png.c5a8f56f433c9e1d10946bf7b4dc52ca.png

BTW The same thing happens while using DLNA plugin

  • 2 months later...
Posted

OK please try the 1.0.29 update to the Sonos plugin and let's see if that resolves it for you. Thanks.

  • 5 weeks later...
  • 5 months later...
vdatanet
Posted

No, unsupported sample rate flacs are not transcoded. 24 bit 48 khz play fine.

  • 3 weeks later...
Posted
On 1/18/2026 at 9:46 AM, vdatanet said:

No, unsupported sample rate flacs are not transcoded. 24 bit 48 khz play fine.

What version number of the plugin are you on now? Can you please provide a new log example? Thanks !

vdatanet
Posted
On 2/5/2026 at 8:07 AM, Luke said:

What version number of the plugin are you on now? Can you please provide a new log example? Thanks !

1.0.30.0

 

embyserver.txt

  • 2 weeks later...

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...