Plex Defaulting To Worst Audio =(

In the XML, “selected=1” always shows up on my system. Of course, I never manually select an audio track, so that’s expected because the web app on my equipment only plays stereo. However, if I do select an audio track (and again, no matter what device) the XML will now reflect that. So if I manually select the DTS track on the Roku, Plex will show that as the selected track in the XML and will transcode the DTS to stereo.

I don’t know why your system would work so drastically different than mine, but the behaviour I see has been that way for years, and I never have to choose an audio track or subtitle. It just works. :slight_smile:

@leelynds - Thanks For All You Done - Very Freaking Detailed <3

Your Results Match Mine With All Players Except The Roku 3… I Say Except In Term Of Execution Because Everything Says It Should Be Playing The AC3 5.1 But That New ‘Audio Configuration’ Menu.

When There Are 2 Options, I’ve Never Ever Had To Select The Audio It Has Always Selected The Correct Audio. I Used To Use 3 Options With BluRays [AC3 2.0 5.1 DTS] But That Was Hit Or Miss.

Question - What BitRate Are You Using ???
I Usually Use 2.0 =448, 5.1 =640, DTS =1510

I kinda doubt that bitrates affect anything, unless the stereo track has an unusually high bitrate that is higher than the surround track. Truth is, I have a couple of formulas for bitrate for audio and video… movies I care about get the higher bitrates, others don’t. I use Plex primarily for convenience, and streaming to friends and family, so there is no original, untouched content. If someone doesn’t like the quality, “buy the disc yourself,” is my official stance

Generally I use AAC for the stereo track at 160, but if I decide on AC3, I use 192. I think that’s what Dolby recommended years ago, and until blurays came along, that was about the best you got on a DVD. I use AAC for the stereo track because almost every player (if not all) play stereo AAC without any transcoding.

The surround track is usually 384, but I do have stuff at 448 (from DVD’s) and 640 (from Blurays) To be honest, the 64 year old ears I’m using probably can’t tell the difference as well as they could a few years ago, so I hardly ever include the original DTS track (usually 1510 I think). If I want the real 7.1 sound my system will output, I throw in the BluRay and get the bonus of better video that even my eyes can see.

@GoRichard said:
When There Are 2 Options, I’ve Never Ever Had To Select The Audio It Has Always Selected The Correct Audio. I Used To Use 3 Options With BluRays [AC3 2.0 5.1 DTS] But That Was Hit Or Miss.

If you want to have both an AC3 track and DTS track, I would try adding the DTS track as the second track. That is, the audio tracks should be Stereo (AAC or AC3) as audio track one, DTS as audio track 2, and AC3 as the third track. My little experiment to reproduce your problem seems to imply the Roku stops looking after it finds the first surround audio. I think your original post showed the surround AC3 track before the DTS track. I would think one stereo and one surround track is enough, you’ll probably never use that third audio option anyway (unless it’s a different language). :slight_smile:

Most of the apps seem to stop looking after they find a track in the right language. I often see responses here that you MUST select the correct audio for your system. The Roku may be the only one that actually looks for a second (better) choice, even if it won’t look for the even better third choice.

So After All The Information Everyone Provided I Decided To Try And Figure Out How Is PMS Making Its Selection…

First, It Prefers MP4 over MKV. (not completely tested)
*** Edit - Thanks To @cayars For Suggesting A Test Scenerio -
Assuming Your Device Can Play Both - MP4 Is Preferred Remotely & MKV Locally (I’m Using Various Roku’s).

Second, If Your Playback Quality Is Lower Than The Highest Quality Video Then The Highest Resolution Is Chosen - 1080p Will Take Preference Over 720p - So When There Are Multiple Files Available It Isn’t Choosing The Resolution Similar To What You Want; It Takes The Highest And Trans-codes To Meet The Goal. example: If You Are Setup For 720p 4Mbps AC3, It Will Take A 1080p 20 Mbps BluRay DTS And Convert It To 720p 3Mbps AC3.

This Will Happen Even If There Is A File That Meets Those Exacts Specs Is Available. PMS Will Want To Tran-code Everything With Remote Users Getting AAC (Usually 2.0) Audio.

So Having 2 Or 3 Versions So Plex Can Choose, Is Not Working As Expected.
(at least for me at this time)

This In Itself Explains Some Of The Weird Behavior Of Always Trans-coding For Remote Users, Who Should All Be Getting Direct Play.

Third, The Audio, If Only One Is Available, Is Preferred In The Following Order: DTS 5.1 - AC3 5.1 - DTS 2.0 - AC3 2.0 - AAC 2.0 - AAC 5.1… Totally makes Sense And Works As Expected.This Is UNTIL Your Bandwidth Setting Are Lower Then The Highest Available Video, Then It Takes The Best File Based On Video And Then Trans-codes Both Video & Audio.

If AAC Is The Only Audio, PMS With Tran-code To AC3 Properly .

Then There Is Adding A Secondary Audio… Anything With AAC 2.0 Takes Priority & Anything With AAC 5.1 Is Given The Least Importance. So The Following 3 Files Wit AC3 5.1 Would Be Chosen In The Following Order
[AAC 2.0 AC3 5.1] - [AC3 5.1] - [AAC 5.1 AC3 5.1]. Perhaps Because I’m Not Setup For AAC That Audio Option Is Hidden, The Play Back Acts Like It Isn’t Even There, So In The Case Of AAC 2.0. I’m Not Sure Why It Takes Precedence Over A Similar Single Audio File.

Files With Equal Audio Are Chosen Based On The First Audio,
So [DTS 5.1 AC3 5.1] Is Chosen Over [AC3 5.1 DTS 5.1]

One Weird Behavior Is [DTS 5.1 AAC 2.0] Being Chosen Over [AC3 5.1 AAC 5.1], PMS Will Then Transcode The DTS To AC3.

PMS Prefers The First Track To Always Be AAC [2.0 Over 5.1].

When You Have 3 Audio Tracks. If 1 Is AAC, Then It Is Ignored And The Rest Is Evaluated The Same Way As When There Are 2. With 3 That None Are AAC Then It Gets Quirky And Changes Depending On Similar Files.

So After All This The Bottle Neck Maybe Between Bit Rate And Max Setting… When Plex Has To Choose It Says “F” It And Chooses To Trans-code At All Cost Of Throwing Away Logic That It Used To Select The Best File.

I don’t think your testing is valid or universal.

Some apps don’t rely on the server MDE and will manage the file being used at the app layer.
Secondly your determination of MP4 over MKV may be flawed. Not saying it is flawed but might be. Plex might have changed this but previously it would rely on the “original file” to use for transcoding.

The original file is the first one added. So if the MP4 was added first that is the original file and vice versa assuming it has the bitrate needed.

If you want to test this set up two test libraries. Get yourself two sets of files for example use a back to the future in lib1 and a terminator in lib2. Create MP4 and MKV of both sets of files. This will guarantee all 4 files have a different hash. Now add the MP4 to lib1 and the MKV to lib2 and scan both libs to seed them. Now add the other two files and scan again.

Now test as you did before. One will have an original file of type MP4 and the other an original type of MKV.

You can/should also test a similar setup where you add a 720p as the original file then a 1080p to test to see which is used when transcoding is needed.

Carlo

@cayars

That Actually Makes A Lot Of Sense… Never Thought It May Be Based On Which Was Added First. I Was Really More Focused On The Audio Aspect And Was Only Testing MKV With The Same Video On Roku Players.

I Actually Tested In The Format That You Suggested And All Things Being Equal The Results Are:

  1. Locally It Chooses MKV, No Matter Which Was Added First.
  2. Remotely It Chooses MP4, No Matter Which Was Added First.

In Both Cases If AAC Is The Only Audio It Trans-codes To AC3 Properly.

I’m too lazy to look back a page, but, I think Roku was mentioned as a playback device at one time.
I’d like to throw a wrench in the works, at least according to the Roku ‘usb direct media player’ compatibility, DTS at one time was only ‘legal’ in MKV files, where as AC3 is the only supported format in MP4, and, as 2 or 3 of us have said previously, AAC 5.1 is not a standard format for just about any player, where as AAC 2.0 is.
That being said, that article has apparently been updated due recent firmwares, but, it may be what Plex profiles are set to do for different models of Roku.
Plex has at least 3 different Roku profiles, perhaps more, but I think a few point back to the original 3.

@JamminR
You are probably right

After all of this what I’m noticing is that if there is only 1 audio, no matter the format, resolution or container, PMS does a perfect job of selecting the best file and applying what ever trans-code needed.

If there are 2 audio files, it selects the best file, even if the reason is the second audio… the problem is that in then just plays the first audio. In my case the first audio is AC3 2.0 so it say okay and plays it.

i started my library years ago (at least 9) when popcorn hour first came out… after using many other applications, I moved over to PMS permanently about 7 years ago. The number 1 reason was that it made the best choices without me having to make any changes.

Perhaps I’ll go back to PopCorn Hour or Kodi for a minute and see if things run smoother… I’ll keep Plex to organize and search for things.

@JamminR
is there a way to tweak or edit those profiles ???

@GoRichard said:
@cayars

That Actually Makes A Lot Of Sense… Never Thought It May Be Based On Which Was Added First. I Was Really More Focused On The Audio Aspect And Was Only Testing MKV With The Same Video On Roku Players.

I Actually Tested In The Format That You Suggested And All Things Being Equal The Results Are:

  1. Locally It Chooses MKV, No Matter Which Was Added First.
  2. Remotely It Chooses MP4, No Matter Which Was Added First.

In Both Cases If AAC Is The Only Audio It Trans-codes To AC3 Properly.

Did you use the browser for testing which forces the server to make the choice or did you use a device such as a Roku that has it’s own logic to choose which file to play?

If you have available, try different clients such as ios, android, samsung, etc to which file is used. It’s not clear cut which is why there is always a “cloud” over this issue.

@cayars

The Browser Test Behaved Exactly As You Stated Earlier,
The First Video File Added Was The Default Container File Selected.

In Both Browsers, Fire Fox & Explorer, The File Played In MP4 With AAC 2.0 (converting where necessary)… BUT (as always a monkey wrench) Explorer Did Direct Play For AAC 5.1, If And Only If, The Container Was Initially MP4. With Multiple Audio It Would Choose The First Audio And Convert It To AAC 2.0 If Necessary.

On My Android Phone & iPad Mini, The First File Added Was The One Selected And Did Direct Play Across The Board, No Trans-coding Of Container, Video Or Audio. If There Are Multiple Audio It Just Direct Streams The First Audio.

Locally, Roku Selected MKV And Just Uses The First Audio. If Only 1 Audio And It Is AAC It Trans-codes To AC3… Multiple Audio Just Plays First Audio.

Remotely, Roku 2&3 Selected MP4 Sometimes Doing Direct Play Other Times Converting To MPEGTS… If It Selects MKV It Always Trans-codes To MPEGTS. The Audio Was All Over The Place, It Converts AAC 5.1 To AC3 5.1 ( a good thing) But If Multiple Audios It Would Convert AC3 5.1 To AAC 2.0.

PS4 Selected MP4 Sometimes Doing Direct Play Other Times Converting To MPEGTS… If It Selects MKV It Always Trans-codes To MPEGTS. For The PS4 The Audio Would Trans-code To AAC 90% Of The Time (even if already in AAC).

All This Goes To Show Why Everyone Is Experiencing So Many Differences In Results. Because Every Player Is Managing The Same File In A Different Way. Tweaking Things For One Player May Cause Issues For Another.

@GoRichard

Thanks for testing and writing that! That shows exactly what I was getting at that 99% of people here don’t understand that I’ve had to learn the “hard way”. :slight_smile:

It can make trying to diagnose issue very complex unless you use the same type of device/app as the user as well as ask about the formats (and if multiple) are present. Even when you can reproduce it you may not understand why it chooses what it does. Even the apps themselves choose things differently when many of them can support the same codecs or have made “better” choices, especially when it can avoid transcoding the video.

It can seem there is no rhyme or reason at times as to why the apps choose what they do. They each have some logic to determine what they think is best and can come up with different “answers” even for media that should play the same on different devices with like codec support. Then there is the server MDE as well.

Now imagine doing the same type of testing with a mixture of 4K and 1080 and it gets really interesting (or not) depending on your point of view in the decisions it makes when transcoding. :slight_smile:

Plex really should get a handle on this and come up with a decision tree that is followed for all apps and takes into consideration the codecs each supports.

The Files I Was Using Were All 1080p ~2Mbps

To Do All The Testing Remotely I Had To Change The Remote Stream Bitrate On The Server
From 720p 4Mbps To 1080p 8Mbps Also On All Of The Devices. If Not Everything Was Being Trans-coded.

Also The “Transcoder Quality” Would Cause Network Hiccups Locally/Remotely If It Was Set To ‘Automatic’. Locally It Would Say Server Could Not Play The File. Remote Users Stated They Could See A Significant Difference In The Video Quality. It Was Watchable But Not As Clear.