Default audio to AC3 5.1 ?

@MovieFan.Plex said:

selected=“1” default=“1” codec=“aac”
You have the default flag set in the file. I’m not sure why the Roku is selecting the AC3 track.

Edit - You’ve also got the aac manually selected so the Roku shouldn’t be selecting that either.

I have not manually selected anything. That is how all of my movies are by default because the first audio track is AAC 2.0. I would have to manually select 5.1 AC3 to change it. If I convert a movie in Handbrake and put the 5.1 AC3 track before the AAC 2.0 then it becomes the “default” in Plex. Plex is deciding which one “selected” and default=“1”, because it reads the file and selects the first track. Roku picks the 5.1 correctly.

What I am saying is that in the sample movie/xml I provided, i never played the movie, only the (2) times to show the pictures above. And I did not change the audio track while playing them to demonstarte what is going on. If I add any movie to my library that has AAC 2.0 listed first in Handbrake (which has to be done for iTunes/Iphone compatibility/syncing) and 5.1AC3 listed second. All Plex clients choose the first track, with the exception of Roku. This can be a newly added movie that has never been played/viewed before.

@MovieFan.Plex - I appreciate you trying to help me, but if you search the forums you’ll see that many have the same problem and it’s b/c of the same format I use (let’s blame Apple/iTunes for this!)

Here are just a few of the many threads about the same topic (I did not hyperlink just copy/pasted):

https://forums.plex.tv/discussion/244179/samsumg-defaulting-to-1-audio-channel-not-playing-ac3

https://forums.plex.tv/discussion/136298/movies-in-5-1

https://forums.plex.tv/discussion/224511/apple-tv-4-not-defaulting-to-surround-track

https://forums.plex.tv/discussion/53283/default-audio-to-5-1

I’m sure there are more, I just searched “default 5.1”. Obviously the Roku Plex developers were aware of the behavior and coded that version to “fix” this. Maybe there can be open communication?

Thanks
BP

@MovieFan.Plex said:

selected=“1” default=“1” codec=“aac”
You have the default flag set in the file. I’m not sure why the Roku is selecting the AC3 track.

Edit - You’ve also got the aac manually selected so the Roku shouldn’t be selecting that either.

Edit 2 - Hmm. The “default” flag might not do anything. But the “selected” should so it shouldn’t be possible for your Roku to select that track automatically anymore.

Let me do some testing and get back to you.

Thanks again for your help! Let me know if there’s anything I can provide or answer.

Just for clarification. The “selected” is set by Plex, I did not actually select either the 2.0 or 5.1. 2.0 is selected b/c that is what Plex defaults to (first track). I feel there is some confusion there. It’s not like neither was “selected” when I added the movie and I “selected” or decided one or the other…

@wdpaynter said:

@“MovieFan.Plex” said:
selected=“1” default=“1” codec=“aac”
You have the default flag set in the file. I’m not sure why the Roku is selecting the AC3 track.

Edit - You’ve also got the aac manually selected so the Roku shouldn’t be selecting that either.

Edit 2 - Hmm. The “default” flag might not do anything. But the “selected” should so it shouldn’t be possible for your Roku to select that track automatically anymore.

Just for clarification. The “selected” is set by Plex, I did not actually select either the 2.0 or 5.1. 2.0 is selected b/c that is what Plex defaults to (first track). I feel there is some confusion there. It’s not like neither was “selected” when I added the movie and I “selected” or decided one or the other…

Of the dozen or so I checked, all of my movies with multiple audio tracks have a default and selected flag. I never select the track, the correct one is chosen by the Roku. On a stereo system it selects the AAC track, on a surround system the AC3 track. I don’t think it’s even possible for an mp4 or m4v file to have a default track set in the embedded metadata the way that mkv can. The flags must be generated by Plex.

Surely that piece of information can’t be relevant in the auto selection of the player. If it was, then once a track was chosen manually, it would affect the XML for all instances, even other users, and I’m pretty sure that doesn’t happen. For example, I have several videos with English and Chinese audio… defaults to English for me, but my daughter-in-law manually selects Chinese, and that selection is honored from that point on for every client she uses. Maybe the XML we see here is generated for this instance only… that is, a stereo client (the web browser) and the user at the moment.

Like the Shield, the Plex Media Player can’t (or couldn’t) auto-select the better audio track. I don’t use that app because I was forced to select a track, making that selection the default for all clients, resulting in either a transcode or no audio or incorrect audio in other apps.

as @wdpaynter said, the Roku developers have it right, and the same logic should be able to be applied to other apps if they are capable of playing multi-channel audio. Easier said than done, perhaps, but still doable.

Thank you @leelynds !

You guys are right about the selected value in the xml. And the default flag is ignored so that doesn’t matter. I was able to reproduce the issue. Let me see if I can find out more.

@MovieFan.Plex said:
You guys are right about the selected value in the xml. And the default flag is ignored so that doesn’t matter. I was able to reproduce the issue. Let me see if I can find out more.

Thanks again for your help! I feel like confirmation of the behavior (by Plex) is a big step forward. Let me know what I can do to help.

And a reminder, this behavior is present in every client I’ve tried, except Roku. These clients include:
Plex for Shield TV/Android
Plex Web (Firefox)
Amazon FireTV
Amazon Fire Stick
Sony Android TV
Plex for Sony (Opera)
Plex for Vizio
Plex add-on for Kodi (on Shield)

@MovieFan.Plex said:
You guys are right about the selected value in the xml. And the default flag is ignored so that doesn’t matter. I was able to reproduce the issue. Let me see if I can find out more.

@MovieFan.Plex any new information on this?

Thanks
BP

Also curious if there is any movement on this. Have several 4k videos with both TrueHD 7.1 and AC3 5.1. Plex decides to transcod the TrueHD to AAC 5.1 instead of playing the AC3 natively…

This is on a 2017 Shield TV

I went through this a year ago with Apple TV. I just re-checked thread and they fixed it on that . I just tested it and it does indeed select it correctly.

FYI to make 5.1 happen by default in native Kodi (v17.0 estuary skin) you must set this option off:-
settings:player:language: PrefDefStreams=off
It then chooses best track, a 5.1 will always beat a 2.0. This is the flag Plex addon for Kosi could key off to mimic Kodi functionality.

You are correct that an apple compatible file has the aac 2.0 track first + set as default and the ac3 5.1 one is second. My amp supports pass through of ac3 but not aac hence I also followed this diktat.

Poor guy’s been waiting for 4 months for a fix! I had a quick look at the code and hacked in a fix for this specific case. Tested on FireTV4K.

Edit .kodi/addons/script.plex/lib/_included_packages/plexnet/video.py and change the function below at line 55 to this. You can use Kodi file manager to copy file to local do the edit and copy back. This link will help find the kodi base folder if you get stuck.

    def selectedAudioStream(self):
        if self.audioStreams:
			return self.audioStreams[-1]
        return None

It will then always select the last audio track.

@convertapple said:
Poor Guy’s been waiting for 4 months for a fix. I had a quick look at the code and hacked in a fix for this specific case. Tested on FireTV4K.

Edit .kodi/addons/script.plex/lib/_included_packages/plexnet/video.py and change the function below at line 55 to this. You can use Kodi file manager to copy file to local do the edit and copy back. This link will help find the kodi base folder folder if you get stuck.
Location of Kodi (XBMC) UserData Folder

    def selectedAudioStream(self):
        if self.audioStreams:
			return self.audioStreams[-1]
        return None

It will then always select the last audio track.

I’ve kind of given up on getting help through the Plex forums. Especially from employees. I was really excited that I actually got a response from a Plex employee, and was making some progress. Then the communication abruptly ended. I even tried PM’ing, but it was ignored. Love Plex, but support is extremely weak. Oh well

I think everything you’re talking about above is for Kodi, I’m talking about native Plex player (especially for Android).

Thanks though!
Bill

oops, re-read OP.

That said, if you are running Kodi anyway you could just use a clean Kodi install + the Plex addon set to run on Kodi startup so Kodi wouldn’t really figure. By using the Kodi playback engine you can avoid transcoding too (I hope)

@MovieFan.Plex said:
You guys are right about the selected value in the xml. And the default flag is ignored so that doesn’t matter. I was able to reproduce the issue. Let me see if I can find out more.

Any update on this?

This has been going on since 2009 and the forum has dozens of threads regarding this.

Thanks
BP

Hi, no change. The Roku app can have a preferred audio because it grabs the Roku’s global audio setting. Unfortunately, other clients don’t have a global setting to grab, so a feature needs to be added within the Plex clients to support this.

@MovieFan.Plex said:
Hi, no change. The Roku app can have a preferred audio because it grabs the Roku’s global audio setting. Unfortunately, other clients don’t have a global setting to grab, so a feature needs to be added within the Plex clients to support this.

Thanks for the reply. Hoping this is on the “to do list”

Is there any news here when such a function is to be expected in the clients? in the meantime another year has already passed.

1 Like

Thanks but this is not working? I get error… Using latest Plex add-on

I can confirm that the same behaviour is in the xbox client. I have having to fiddle at the start of each movie/episode to select the dolby digital.

I could simply remove the lower quality sound track, but a major PITA for all my mkvs, plus the fact I want to keep them in case finances force me back down to standard crappy TV sound.

When my generation starts landing in nursing homes they aren’t gonna know what’s hit them - Xboxes, media players, disk stacks LOL

1 Like

Yeah, this really needs to be implemented in Plex. There are a bunch of posts in the forums for this type of feature.

I would love to be able to tell my Shield to default to the 5.1 track in “x” language. That way my AC3 and DTS tracks (depending on the file) would get played and I wouldn’t have to manually change.

Why this isn’t already a feature, blows me away. Plex obviously can recognize EVERYTHING about the file… all the codecs, etc. on my stereo systems I want it to default to stereo, on surround, surround. All they need is a setting with some check boxes and a language drop down that looks at the data in the XML and tells the server to playback accordingly.

Something along the lines of:

“If available, default audio:” :ballot_box_with_check: stereo
:ballot_box_with_check: 5.1 :ballot_box_with_check: 7.1

“If available, default language:” drop-down picker

I don’t want to abuse pinging, but @elan … Could this please get prioritized? :smiling_face_with_three_hearts: Thanks in advance!!

Edit: I know this seems like a small thing, but for those of us that use Plex a lot, it’s huge! Like for TV shows… What a nightmare to have to constantly switch audio episode to episode. And, I know… I know, … These are first world problems … But it would be nice!

3 Likes