Roku and Chromecast transcoding AC3 5.1 to MP3

Server Version#: 1.21.1.3795
Player Version#: 6.7.4.6764 Roku

I just noticed that AC3 5.1 content is transcoded to MP3 on Roku and Chromecast. I have never seen content transcoded to MP3 before. I didn’t even think it was possible.
Any help would be appreciated.

Thanks in advance.

image
image

1 Like

I am having the same issue with my Roku with the same server update. However, all my AAC 5.1 media transcodes fine to AC3. What I’m having issues with is every file I have that is AAC 7.1 it does the same thing, transcodes to MP3. Almost my entire 4k HDR collection is effected.

The issues I’m having are on version 6764.

My bedroom Roku TV is on version 6715 and it transcodes everything to AC3 perfectly.

Hope the find a solution. I made a thread as well.

1 Like

I have the same problem with HE-AAC 5.1 and AAC 5.1.

Am I the only one with this problem?

How are your audio settings configured in the Roku device’s settings? On my Roku Premiere (4620X) have them set as Audio Mode: Auto and HDMI: Auto Detect (it autodetects Dolby Digital). The Premiere is connected via HDMI to an old Vizio TV which is itself connected via optical to a Vizio sound bar. This is the result:

Screen Shot 2020-12-17 at 12.20.31 PM

I’m on the same app and server versions as you show.

Thank you for your reply.

However, there is a difference in your test. You play the audio directly. My TV does not support this type of audio coding, which requires transcoding. The problem is that when I transcode, the audio coding shouldn’t be mp3. To test it, you’ll need to force your TV to take stereo, for example, which will force the plex to transcode.

If I remember correctly it should be transcode to AAC. If you can test it in an audio transcoding situation that would be great.

Ah, I see. In my case, if I force stereo, it transcodes to AAC. However, both MP3 and AAC are transcode targets in the Roku device profiles. From Roku-7.x.xml:

  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,mp3" context="streaming">
      <Setting name="BreakNonKeyframes" value="true" />
      <Setting name="HlsElideExtXStart" value="true" />
    </VideoProfile>
    <VideoProfile protocol="http" container="mkv" codec="h264" audioCodec="aac,mp3,mp2,pcm,flac,alac" subtitleCodec="srt" context="streaming" />

Debug logs showing the start of playback may show the reason why MP3 is being chosen over AAC. Just ensure you have debug logging enabled, and verbose logging disabled in your general server settings.

[Edited to clarify the transcode targets]

It actually chooses the mp3 codec on the roku and chromecast.

      <Variant id="1f534fa2-3b8e-4688-b249-46a965695255" targetBitrate="5988" context="streaming" sourceVideoCodec="h264" sourceAudioCodec="ac3" videoDecision="copy" audioDecision="transcode" protocol="hls" container="mpegts" videoCodec="h264" audioCodec="mp3" audioChannels="2" transcodeHwRequested="0" transcodeHwFullPipeline="0">
         <Media id="29901" videoProfile="high" audioChannels="2" audioCodec="mp3" bitrate="2980" container="mpegts" duration="8765262" height="800" protocol="hls" videoCodec="h264" videoFrameRate="24p" videoResolution="1080p" width="1920" selected="1">
            <Part id="56862" videoProfile="high" bitrate="2980" container="mpegts" duration="8765262" height="800" protocol="hls" width="1920" decision="transcode" selected="1">
               <Stream bitrate="2722" codec="h264" colorPrimaries="bt709" colorTrc="bt709" default="1" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)" frameRate="23.975999999999999" height="800" id="153996" streamType="1" width="1920" decision="copy" location="segments-av" />
               <Stream bitrate="258" bitrateMode="vbr" channels="2" codec="mp3" displayTitle="Français (AC3 5.1)" extendedDisplayTitle="VFQ AC3 5.1 @448kbps (Français)" id="153998" language="Français" languageCode="fre" selected="1" streamType="2" decision="transcode" location="segments-av" />
            </Part>
         </Media>
      </Variant>

Also, by testing it on a browser it transcodes in AAC.

<Variant id="8d70963e-1a1b-461b-b8d9-4f1842043d9b" targetBitrate="5985" context="streaming" sourceVideoCodec="h264" sourceAudioCodec="ac3" videoDecision="copy" audioDecision="transcode" protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" audioChannels="2" transcodeHwRequested="0" transcodeHwFullPipeline="0">
   <Media id="29901" videoProfile="high" audioChannels="2" audioCodec="aac" bitrate="2978" container="mp4" duration="8765262" height="800" optimizedForStreaming="1" protocol="dash" videoCodec="h264" videoFrameRate="24p" videoResolution="1080p" width="1920" selected="1">
      <Part id="56862" videoProfile="high" bitrate="2978" container="mp4" duration="8765262" height="800" optimizedForStreaming="1" protocol="dash" width="1920" decision="transcode" selected="1">
         <Stream bitrate="2722" codec="h264" colorPrimaries="bt709" colorTrc="bt709" default="1" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)" frameRate="23.975999999999999" height="800" id="153996" streamType="1" width="1920" decision="copy" location="segments-video" />
         <Stream bitrate="256" bitrateMode="cbr" channels="2" codec="aac" displayTitle="Français (AC3 5.1)" extendedDisplayTitle="VFQ AC3 5.1 @448kbps (Français)" id="153998" language="Français" languageCode="fre" selected="1" streamType="2" decision="transcode" location="segments-audio" />
      </Part>
   </Media>
</Variant>

This is clearly a problem with the Plex Server.
I played the same content on two different Plex Server versions.

Here are the results:

Plex Server version : 1.18.4.2171

image

Plex Server version : 1.21.1.3795

image

Have a look at your Plex Media Server logs, with debug enabled. Start a playback and look for lines containing “MDE:”; these are output from the media decision engine and may provide some insight as to why MP3 is being chosen above AAC. If you do the same on both of your servers you may be able to see where they differ in their decision-making process, if they do.

As for it being a server problem, that may be the case. However, it’s not a universal issue as I’m also running 1.21.1.3795; there must also be some other environmental factor at play. As I mentioned above, when I force my environment to only support stereo, my server transcodes to AAC.

1 Like

Does your server run on Linux or Windows?

Neither actually; I run my primary server on macOS 10.15.7. I have Windows and Linux test servers, though. Would you like me to test with one or the other?

Yes, that would be nice.

Because here is the line that I find interesting:

Plex Server version : 1.18.4.2171 (Windows)

Dec 17, 2020 17:16:26.135 [17668] INFO - [FFMPEG] - MFT name: 'Microsoft AAC Audio Encoder MFT'
Dec 17, 2020 17:16:26.215 [17668] DEBUG - MDE: Cannot direct stream audio stream due to codec ac3 when profile only allows aac

Plex Server version : 1.21.1.3795 (Linux)

Dec 17, 2020 21:30:49.545 [0x7f20117fa700] DEBUG - [Transcode] MDE: Cannot direct stream audio stream due to codec ac3 when profile only allows mp3

Thanks :slight_smile:

I just tested on my Linux server. I had to update as it was running an earlier release; the new version is 1.21.1.3830. It transcodes to AAC as well:

Dec 17, 2020 18:02:01.904 [0x7f943ffff640] DEBUG - [Transcode] MDE: Cannot direct stream audio stream due to codec ac3 when profile only allows aac

OK, thanks.

It’s really weird that I seem to be the only one with this problem.
I can’t update right away since I am using docker and the new version has just been released.

Looks like a problem with the docker image???

Ok I just created a new plex server on another linux machine with the docker image https://hub.docker.com/r/linuxserver/plex and the problem is still there.

Ok I don’t understand how it can works on your side with linux. I just created a new server with linux without docker and the problem still occurs. I don’t understand.

Which Linux distribution you tested with @pshanew?

I’m using Pop!_OS. Stupid name, great refinement of Ubuntu. I was testing the native package previously. I just tested under my Docker (plexinc/pms-docker:plexpass) server and saw the same results: It transcoded the audio to AAC.

It’s pretty funny, because I tested it on pop os as well haha.

1 Like