Support for realtime transcoding from AAC 5.1 to AC-3 5.1?

Hi,

Any chance of Plex Media Server gaining support for realtime transcoding of AAC 5.1 to AC-3 5.1?

There are an increasing number of videos using this format (HE-AAC typically with HEVC video) and most AV receivers (mine included) do not support this audio format. Downmixing to stereo sounds awful compared to a proper transcode and at the moment I am using the following command to get around this problem:

ffmpeg -i input_file -c:v copy -c:a ac3 output_file

It would be great if Plex Media Server could do this on demand while playing the video.

Regards,
Michal

If the Plex client supports multi-channel AAC, then the server won’t transcode it. If it doesn’t, then we will.

Which client are you using?

I’m using the current Plex Media Player on OSX via the HDMI output. I have enabled DD and DTS in the advanced audio passyhtough settings but not AAC (as that is not an option and even if it were my AV receiver does not support it).

Plex Media Player (and every other player I have tried) is incapable of playing AAC 5.1 audio without down mixing. And it sounds SIGNIFICANTLY worse down mixed to stereo.

Is there a way to force AC3 transcoding for multichannel AAC?

You may want to talk to the PMP guys about your scenario, tbh.

Moving to the PMP section.

I think if you set device type to Optical and the channels to two it will work.

Even though it’s outputting via HDMI and I am trying to get 6 discreet channels out of the receiver?

Yes, Optical forces the transcoder to kick in (since optical does not support decoded LPCM), channels are only used when decoding the stream so it should not matter to you here, setting them to two again forces PMP to transcode the audio. You need to enable passthrough for at least AC3 as well.

By default PMP tries to decode and send the streams over with LPCM if you have it set to HDMI.

I’ve just tried it, and although the channel selection menu item disappears when you select optical, it DID work! Thank you. That’s very unintuitive but much more importantly it does work :slight_smile:

It’s hard to design the settings UI. We want it to be powerful but also not intimidating for people that doesn’t know about passthrough and similar things. We chose to call it optical because most people that have the problem of wanting transcode to AC3 is on a SPDIF/Optical connection.

What is going on behind the scenes when you choose the device type? Is there some sort of decision tree for how it handles audio based on which output type is chosen?

Does the actual device chosen not report the capabilities of the device? Actually scratch that, I know that can be unreliable as is the case in OSX when using USB optical outputs which do not report multichannel capabilities even though they will accept passthrough.

Currently, the device type enforces some settings:

  • “basic” disables compressed passthrough (but allows multichannel PCM)
  • “spdif” forces stereo PCM (but also allows ac3 and dts)
  • “hdmi” allows everything (including dts-hd and truehd passthrough)

Transcoding to AC3 is enabled if AC3 passthrough is enabled and PCM is forced to stereo (either “spdif” device type, or stereo channels selected ion UI).

These are based on what we thought would be common user requirements.

That’s very helpful information. But WOW! So much hidden nuance behind those options. I can see why it’s such a challenge to create a meaningful UI in this instance.

In my situation I want HDMI unless it’s multichannel AAC. That’s not a covered scenario. Maybe an option under advanced settings? Or even just manual editing of the configuration file which would allow for bespoke customisation of the nature "always ‘hdmi’ unless ‘aac’.

I’m pretty sure that when I have HDMI selected it doesn’t do multichannel PCM (beyond stereo). It certainly doesn’t SOUND like it.

How about tooltips of some nature when options are selected that show this additional information? Whether as a popup or in a discrete area of the GUI. The more I think about it the harder it is to conceive of a clean and consistent UI which can convey all this :stuck_out_tongue:

I am not sure how to handle your specific case. @vlang can it be done with mpv.conf?

It seems you don’t want multichannel PCM (just stereo), so select either the spdif device type, or hdmi with channels set to stereo. Then enable at least ac3 passthrough.

This might be a bit confusing, but channels set to stereo still lets through multichannel ac3, and encodes multichannel aac to multichannel ac3.

If none of this works, post a playback log of the failure case.

Just wanted to say thank you for this thread. I have just bought a Fire TV stick to use with Sonos (Since it is the only streaming stick that can convert Netflix DD+ to DD) and I have some Plex movies with AAC 5.1 sound. These were being decoded to DD 2.0 since I set HDMI passthrough on the Fire TV stick to HDMI. Switching it to optical passthrough now transcodes AAC 5.1 to AC3 5.1. Would have never thought of this.

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