8.24.0.28158 - Transcode to AC3 broken (optical)

Transcode for multichannel audio (EAC3, TrueHD etc) are transcoded to 2 ch Opus instead of 5.1 AC3 when using optical.

In settings pass through is set to optical.
AC3 set as supported, DTS set to not supported.

AC3 movies AC3 is passed through.
All other audio (multichannel) are converted to opus. Plex server say it transcode to opus.

I have no problem when reverting to 8.23.1.28030. Then everything is transcoded to AC3 or passed through as AC3. Plex server say it transcodes to AC3.
Later version it’s broken.

2 Likes

Can confirm. Same issue for me, running Plex App on an Sony Android TV. 28030 and older play E-AC3 just fine, on later builds it gets transcoded to Opus 2ch due to E-AC3 not being supported.

Again, same issue here. Hope it resolved quickly!

1 Like

8.24.0.28372 is still exhibiting the same issue:

PlexServer.log (66.2 KB)

androidTV.log (53.5 KB)

@ManuelPG I believe this is related to your change in 8.24.0.28158-beta. Please have a look.

This change in transcoding has now hit the stable Android release.

From my conversation with one Plex employee, it’s unlikely that this will be fixed. I was told that they aren’t many people using passthrough and that Plex needs to do what’s best for the greatest number of users (so not us)

This will be fixed, I’m not sure where you’ve got that impression from. Passthrough support is important to us, for most cases when EAC3 is not supported, then OPUS would be a preferred target over AC3 as it allows the quality to remain. However in this case we have neglected to take into account that OPUS with Optical passthrough would only provide 2 channels which is obviously a regression.

3 Likes

Thank you, I’m glad to hear it.

As I said early, I asked how to get AC3 transcoding to work over optical passthrough following this latest update. I got a lot of talk about how Opus is better, and why would I even want to use AC3, and Opus can be sent to my receiver instead of AC3. I was never once told the issue will be passed on to the developers, or that this would be fixed. It wasn’t until I reposted the problem here in the forum citing that earlier conversation, that a Plex employee finally responded with a luke warm ā€˜we can look into that’.

I have seen Plex retire plenty of features. I’m happy to hear this will not be one.

Were not retiring optical passthrough, this was a regression that was overlooked due to the inclusion of Opus and other codecs as transcode targets - which as I mentioned above does improve things except when using optical.

Will be fixed in the new beta, should be available later today.

4 Likes

Thank you, just adding my voice to this, I also use optical.

1 Like

Great new. Guessed it had something to do with the implementation of Opus.

Will test the new beta with as soon as it’s out!

Thanks!

I know you’re fixing the regression, and I’m not affected by this issue. So please don’t take this as ā€œpiling onā€ or criticizing.

I’m confused by this, and I’m quite curious. I’d like to understand better, if you’ll indulge me.

In what situations is Opus the best transcoding target? I agree that it’s a great codec. I don’t understand when it’s the best transcoding option.

I assume the logic is something like …

  1. identify output method (hdmi, hdmi_earc, hdmi_arc, spdif, speakers)
    1b. identify output channels
  2. identify available codecs
  3. modify rankings based on compatibility concerns
    3a. ARC and S/PDIF only support DD 5.1, DTS 5.1, and LPCM 2.0
    3b. Don’t send multichannel AAC to some TVs, they eat it.
    3c. Device-specific quirks, ad nauseum
  4. identify best common denominator
    4a. most channels →
    4b. no further conversions required →
    4c. best conversion method →
    4d. match original codec family →
    4e. best codec quality
  5. profit

I assume it’s something like that, but exponentially more complicated. :slight_smile:


Is EasyAudioEncoder capable of converting E-AC3 to AC3 without performing a full decode and re-encode? That’s one of the slickest features of E-AC3. If it’s supported by the Plex tools, it could make E-AC3 → AC3 a preferred path compared to other options.

EAC3 isn’t backwards compatible with AC3 - though an EAC3 decoder can play AC3. For playing back EAC3 it requires a full decode and encode to go from EAC3 to AC3 - the only codecs with ā€œsimpleā€ backwards compatible is DTS HD formats, they can be stripped back to just DTS Core without needing a full decode and encode run - we can do this on the client on Plex for Android. As far as I’m aware this is because DTS HD formats are extensions to DTS Core, so we can skip the extensions and just pull down the core, EAC3 however has a different way of wrapping the packets so we need to decode in order to be able to rebuild the packets as AC3.

Opus is preferred mostly because of the bitrate performance, simply put it can hold higher qualities with less bitrate, it’s also very fast to encode compared to other formats.

It’s pretty much decided how you pointed out, in the case of the issue above I didn’t take into account that some setups (like optical) can still play Opus but the channels would be restricted to stereo when it’s passed over PCM (optical supports 2 channels over PCM at the most). So even though Opus would usually be a better target, if your stuck with stereo output it’s not the right target when playing surround sound.

2 Likes

Player 28473 is now showing an error when trying to play an EAC3 file, so this issue does not seem to be fixed. Switching to HDMI instead of optical results in 2ch audio.

PlexPlayer.log (108.2 KB)

PlexServer.log (41.0 KB)

It doesn’t!

EAC3 from Blu-ray is a funky hybrid. It’s a 5.1 AC3 legacy stream, plus 4 channels of dependent stream EAC3 giving the rear and side upgrades. The EAC3 can be discarded and the AC3 can be used as-is.

And (Or?) pure EAC3 was also designed to be easily converted to AC3 without a full decode & encode. I’m referring to section 6, here:

https://professional.dolby.com/globalassets/dolby-digital-plus/aes-convention-paper-intro-to-dolby-digital-plus.pdf

Unlike standard transcoding processes for converting between incompatible formats, the E-AC-3 to AC-3 conversion process does not require a full decode to PCM samples followed by a full encode to AC-3. Because E-AC-3 and AC-3 use the same filterbank, bit-allocation process and framing structure, the conversion device needs only to perform a partial decode followed by a partial encode.

That should preserve quite a bit of quality, compared to switching codec families entirely.

But I’m only guessing at which libraries Plex uses for EAC3 conversion - and maybe I’m assuming they can do things that they can’t.

I’m not aware of any open source tools that can do such conversion. Being technically possible doesn’t mean that it’s practical with the tools available. :slight_smile:

2 Likes

Huh, TIL will have to run this by someone to see why we can’t play EAC3 as AC3 on the client side, it might be due to the patent restrictions (even though AC3 is now patent free). On Plex Media Server (which is licensed), when converting EAC3 to AC3 we should be using the process you’ve highlighted via easy audio encoder. This would mean EAC3 to AC3 is lighter on transcoding, though this is quite trivial for audio decoder / encoding in terms of server resources and since Opus provides better bitrate quality selection it’s not worth the benefit of EAC3 to AC3.

3 Likes

Thanks for the logs, will have a look at these next week to see what’s going wrong.

1 Like

Last Beta was marked as fixed. It is not.

1 Like

You’re not referring to 8.25.0.28514, right?

8.25.0.28473-beta