EAC3 Direct Play on ExoPlayer v2

This is a very popular codec which is always transcoded when using the Android Plex client. What makes this worse is when combined with subtitles, both video and audio streams are transcoded due to an untracked ExoPlayer bug with HLS and subtitles (I couldn’t find anything in their github repository to suggest the existence of such a bug).
Is there any plan to support on-device decoding of additional codecs such as EAC3, TrueHD, etc? Would that be something that ExoPlayer needs to add or Plex? Are there currently any licensing restrictions preventing from implementing it? How is Kodi able to decode these?

Thanks in advance and sorry for all the questions :slight_smile:

@blahblah1239 said:
This is a very popular codec which is always transcoded when using the Android Plex client.

EAC3 is not always trancoded by ExoPlayer 2. It depends on the capabilities of the client & attached devices.

PMS transcodes EAC3 to AC3 for my Android phone, as the phone (Nexus 5X) does not support EAC3 audio.

EAC3 direct plays on my Nvidia Shield (Android TV), since my receiver supports EAC3 audio. The Shield bitstreams the audio to my receiver, which then decodes & plays the audio.

Not disagreeing with you WRT on-device decoding. Just a data point that EAC3 is not always transcoded.

I have nothing that will deal with it - and Plex’s Transcoder gives me the oozing hives - so I just convert everything to AC3 in the standard and rigorous pre-vetting process.

I do know - because it’s been said many, many times. Plexweb ain’t how you wanna watch your stuff.

If you have some kind of super-duper-docked-up environment on your Server Machine that will let you play EAC3 while in your browser (on Plexweb) - well, good on ya. For everybody else - it’s gonna transcode.

That’s about all the anecdotal info I have. I am now merely a casual observer, to what may be an interesting thread.

My statement still holds true. ExoPlayer either transcodes or has to passthrough the EAC3 audio stream. This implies that ExoPlayer will never decode EAC3. It’s either transcoded or decoded by another device., but never by ExoPlayer.

Keep in mind that Exoplayer will decode codecs client side, but it will not downmix. So if you have multi-channel EAC3, it can decode to multi-channel PCM, but your system still needs to support multi-channel PCM. If PMS is transcoding the audio, that would indicate your system does not support multi-channel PCM. If you can provide you app log after reproducing this, I can check what the app is reporting as being supported.

1 Like

@“MovieFan.Plex” Thanks for clarifying that! I don’t have any audio equipment connected to my TV so I’ll assume that my TV does not support multi-channel PCM then. When you say downmix, I’m assuming that means the system needs to support the same number of channels as in the audio stream?
Also, any chance we can file a bug with ExoPlayer for the HLS subtitle issue that is causing both video and audio to transcode?

As FYI, I’ve noticed that Plex on my Shield recently started transcoding EAC3, where in the past it would directplay fine.

E.g. from the transcode log:

<Variants>
<Variant id="16a22470-5499-49e7-84eb-1d68619b0205" targetBitrate="9400" context="streaming" sourceVideoCodec="h264" sourceAudioCodec="eac3" videoDecision="copy" audioDecision="transcode" protocol="hls" container="mpegts" videoCodec="h264" audioCodec="aac" audioChannels="6" transcodeHwRequested="1" transcodeHwFullPipeline="0">
<Media audioProfile="lc" id="246364" videoProfile="high" audioChannels="6" audioCodec="aac" bitrate="7559" container="mpegts" duration="1295040" height="1080" protocol="hls" videoCodec="h264" videoFrameRate="24p" videoResolution="1080p" width="1920" selected="1">
<Part audioProfile="lc" deepAnalysisVersion="2" id="251807" indexes="sd" requiredBandwidths="14075,12974,10711,8766,8766,8766,8766,8766" videoProfile="high" bitrate="7559" container="mpegts" duration="1295040" height="1080" protocol="hls" width="1920" decision="transcode" selected="1">
<Stream bitrate="6791" chromaLocation="left" codec="h264" colorPrimaries="bt709" colorTrc="bt709" default="1" displayTitle="English (H.264 High)" frameRate="23.975999999999999" height="1080" id="533167" language="English" languageCode="eng" requiredBandwidths="13435,12334,10071,8184,8184,8184,8184,8184" streamType="1" width="1920" decision="copy" location="segments-av" />
<Stream bitrate="768" bitrateMode="cbr" channels="6" codec="aac" default="1" displayTitle="English (EAC3 5.1(side))" id="533168" language="English" languageCode="eng" requiredBandwidths="638,638,638,638,638,638,638,638" selected="1" streamType="2" decision="transcode" location="segments-av" />
</Part>
</Media>
</Variant>
</Variants>
1 Like

Same here, I thought I was just the way I started encoding my movie rips but glad to see it’s not only me. EDIT: SHIELD PMS and Shield client.

I have the same problem and it is very annoying. I saw somewhere else that it could have something to do with subs also, but that isn´t the case for me, PMS transcodes the video as soon as I am playing a video with EAC3.

The thing is that my TV are supposed to be able to decode EAC3 so I should be able to use Direct Play for that reason, but I can´t.

I do have a workaround that is not optimal but it helps me. I am using the official “Plex for Kodi” in Kodi for all videos with EAC3. For me it will be all Direct Play with EAC3, regardless of it is with or without subs.

For those of you that don´t know Kodi, it is rather simple to get it to work with “Plex for Kodi”. And if your are not using Kodi for anything else you can go in to settings in “Plex for Kodi” (Advanced) and set it to automatically start Plex for Kodi when you start Kodi.

The best thing would be if they could fix this problem though…

2 Likes

I also have to use Plex for Kodi to play EAC3 files as Plex will not transcode it to AC3 over my optical to my receiver as my receiver only does AC3 over optical as it has no HDMI. I really do not want to buy a new receiver at this point. If Kodi can do it why can’t Plex?

Plex uses a different inferior player to Kodi unfortunately. I’ve had to revert back to PlexForKodi as the AFTV Plex app just isn’t up to it.

Any idea what player Kodi is using and is there a way to cause Plex to use that instead? I tried the Kodi plex setup but that didnt fly with the other users :frowning:

Kodi IS the player. It used ffmpeg to decode the codecs.

Ok interesting then its really strange that Plex can’t also support that directly as it appears the ExoPlayer can also use ffmpeg… https://google.github.io/ExoPlayer/supported-formats.html

I am able to DP content with EAC3. Your audio device needs to support the codec otherwise a transcodes will occur.

EAC3 is easy the hard one seems to be things like TrueHD :slight_smile:

I agree! @reddwarfcrew