Automatically Set Preferred/Default Audio For Videos (audio format/codec) // mod: option to override

This request is really two interrelated items regarding audio codec/quality selection for movies and TV shows.

1. Enable all clients to be able to automagically select the correct audio track based on the type of hardware and codec support reported by the device, like what the Roku and PMP do.

2. For users who would like the option to control the codec used, allow us to set a default audio codec/quality for movies/shows based on both user-level as well as, the client-level . If no default is selected, then Plex would default to option 1, listed above.

a) It would be good to have an option under User Settings > Audio & Subtitle Settings to set a default audio format if that format exists for a movie or show. i.e. DTS, or AC3, or AAC, etc. Or preferably a list like is seen in the Agents menu where we could reorder the various formats. This might be useful for people that have multiple audio formats, but don’t want to use Handbrake to strip out the unwanted ones, for example.

b) Have the option in each client’s settings to set a default audio codec. As mentioned above, have a list which can be reordered, or a drop-down. This per device option could be used for when the user-level is set to ā€œUse Client Settingsā€ , or something like that.

An additional benefit to having the manual settings in addition to point 1, is that if Plex incorrectly chooses a default codec, this could be overridden.

In my specific case, I add both 2 channel AAC and 5.1 channel AC3 to all my movie files. It would be amazing to be able to tell my Android TV to always default to the 5.1 audio, and my phone to AAC. As it stands, since I have the AAC channel first, every time I watch a show or movie on my TV I have to select the 5.1 audio… it would be AMAZING to have it default.

Thanks!

This is the reason I primarily use my Roku. It automatically selects the best audio - Surround when I use the one connected to my A/V receiver, stereo when I use the one connected directly to a TV. I think the only other ā€œappā€ that works in a similar manner is the Plex Media Player (PMP)

I have Plex installed on a PS4 and an Android box. The requirement to select an audio track each time makes me crazy.

The worst part is that from the moment you select an audio track manually, Plex will remember that forever and a day. So no matter what app you use after an audio track has been selected (even if it’s the Roku or PMP) you have to manually select an audio track, or it defaults to the last one that was used on any other device.

With the two apps that will do this seemingly obvious selection automatically, no information is saved by the Plex server, so switching between devices is easy, and the audio is always the best for the system.

I don’t know, but if even the cheapest Roku can do this, one would think it should be possible with almost any device

I’m desparate to understand why auto selection of the ā€œbestā€ audio track is possible in some devices but not all.

Continuing a conversation from this thread:

So my question are:

If the Roku and PMP apps are capable of making an intelligent decision based on the capabilities of the device and the equipment it is connected to, when the options for pass-through, codecs, etc have been made, why can’t the Android device do the same thing?

Apparently, auto-bitrate adjustment, hardware acceleration, or incorrectly choosing an alternate audio such as ā€œDirector’s Commentsā€ are important decisions that the Android would have to consider, but it doesn’t seem to be a problem with the Roku or PMP.

Why would those factors have a higher priority on some devices, but not others?

The following is a snippet from the XML from a typical file on my server.
That is, a video with a stereo AAC track, a Surround AC3 track and an external SRT subtitle.

Part accessible="1" exists="1" id="1375532"
  Stream id="2811384" streamType="1" default="1" codec="h264" index="0" bitrate="1662"
  Stream id="2811385" streamType="2" selected="1" codec="aac" index="1" channels="2" language="English"
  Stream id="2811386" streamType="2" default="1" codec="ac3" index="2" channels="6" language="English"
  Stream id="2811387" streamType="3" default="1" codec="srt" index="3" language="English"

When I use PMP or the Roku, the server logs show the following information, with my interpretation of what they mean. I acknowledge the fact that my understanding of the server logs is minimal. However, there seems to an obvious decision made between the server and app working together from the lines I’ve included here.

The server and the app have communicated, and determined that the following decisions need to be made for item ID 1375532

Select an audio track. The user hasn’t made a choice, so autoselect is invoked, using the preferred language, English. As noted above, the XML shows two audio streams available, the first is a stereo AAC track (ID 2811385) , the second is a surround AC3 track (ID 2811386).

DEBUG - We're going to try to auto-select an audio stream for account 1.
DEBUG - Selecting best audio stream for part ID 1375532 (autoselect: 1 language: en)

Select a Subtitle Again, the server and app communicate, and because the user did not select a subtitle, auto-select is again invoked.

DEBUG - We're going to try to auto-select a subtitle.

Decision made. The server and the app have agreed that the best decision is to play the video with the English AC3 audio track and no subtitle because the user’s preferences are for subtitles with foreign audio.

DEBUG - Audio Stream: 2811386, Subtitle Stream: -1

The video is played using the AC3 surround audio stream with no subtitles.

When you use the Android TV device, with the same file, the logs show the identical process and decisions, except that it chooses the stereo AAC track

DEBUG - Audio Stream: 2811385, Subtitle Stream: -1

On all three devices, I have pass-through enabled. All of the devices are connected to the same A/V receiver with HDMI. All three devices will direct play the AC3 track (but I do have to manually select it
for the Android TV)

I realize it’s akin to comparing apples and oranges. I suspect that it’s not the capabilities of the device, because all of them can play the audio, whether it’s an automatic selection or manual selection. The problem is some devices do not have the necessary code to make a better decision, and simply default to the first audio track in the users preferred language.

This is a no brainier for me. My new iPad Pro can direct play or direct stream AC3 5.1 but not Dolby TrueHD. My HEVC 4K films have both audio tracks. If I leave it to play the default TrueHD track it will then transcode to AAC which I don’t want.

The Android Plex app lets you tell the app what audio codecs are supported by the device. If we could do that and allow the client to tell PMS what it can play it would be automated. For instance PMS would know my iPad Pro can’t play TrueHD and automatically send the AC3 track instead. It would know my Shield TV can pass through TrueHD to my receiver and send the TrueHD track to my Shield.

I just finally upgraded my home theater system to include surround, and now I’m discovering that in order to get the right surround channel, I have to remember to choose the right audio channel every time I watch something.

I’d really like to see some way (any way!) to make this work with an android player (Fire TV for me) even if I need to do some config ahead of time.

This has been an irritant since forever. If a dumb old roku can select the surround track, why can’t an Android TV?

Even more annoying, the pre-play screen on both android TV devices I have properly show the Surround track as the preferred, even when no selection is made, but default to the stereo. What logic isn’t passed from the pre-play to the actual playing of the video?

Maybe @sixones (I think he’s one of the android devs) has some insight.

1 Like

I would love this too, don’t understand why it’s not implemented yet.

1 Like

+1 - This is kinda ridic given how simple it’d be.

1 Like

+1. Especially since I’m currently experiencing a bug where audio transcode is triggering a video transcode for some files. I typically don’t even notice an audio-only transcode.

Ideas:

  • Auto select best available audio that will direct play. Make it an option like ā€œauto adjust qualityā€. When set, it will always override manual selection of audio. Maybe also allow user defined priority since you may have multiple surround tracks with the same number of channels.

  • Develop (or integrate) a player that plays all audio / downmixes when necessary. I’d even pay an extra one time fee if it’s just a matter of licensing the codecs. I feel like bandwidth limitations should be the only reason to ever transcode if you have good enough hardware and software.

1 Like

Pretty sure you configure Rokus with your supported audio formats: surround, stereo etc. That’s how it knows. Plex for Roku just uses that information.
Computer-based clients may default to stereo, or have easily acquired information about ā€œhardwareā€ because it’s a computer.
AppleTV has no setting to specify stereo vs. surround globally.

Plenty of issues all arround the web regaring transcoding with SmartTV Plex clients. My suggestion is simple:

Create an option in the server settings - Authorized Devices to override the default audio , video codec settings and support for a specific device. This way a plex admin can influence if a stream get transcoded or not. Plex can collect the information and use this to improve the defaults in plex profiles for future released of plex media server based on client/brand/model/app.

If the plex server doesn’t know specifics for a client Plex assumes it. People complaining about transcoding in SmartTV Native plex apps always get the solution buy to buy a shield, Roku, AppleTv or another Tv.

The SmartTV Plex client uses the built-in player of the SmartTV but doesn’t always know the specifics for every model. Some information from the Plex server.log

Jun 16, 2020 17:21:16.881 [0x7fe29a2b3700] DEBUG - [Now] Device is webOS (LG OLED65CX6LA).

Jun 16, 2020 17:21:16.934 [0x7fe29a2b3700] DEBUG - [Now] Profile is webOs

In this example we know that not all webOs tv’s are identical when it comes to supported codecs. Sony, Panasonic and LG models can change yearly in the codecs they support. In this case the Plex server assumes because it is webOs is should support DTS. LG stopped supporting DTS in the 2020 models. Sony on the other hand didn’t support DTS in the Android smart TVs but recently added it. In other words the codec supports changes from model to model.

When one codec fails the Plex server switches to a ā€˜failsafe’ profile but that will not use the true potention of the TV (and the potential Plex and the server Plex is running on) and will start transcoding in most cases.

You can do this with DLNA profiles. (link : Writing profiles for DLNA devices ) but who uses DLNA when you can run a Plex client on the TV?

Wouldn’t it ben ice if you can tick the boxes for a specific device to overrule the default settings?

Or

Do you have another solution and am I missing something? But don’t tell me to get a shield, Roku, AppleTv or another Tv. :slight_smile:

+1 - absolutely mad that plex doesn’t do this automatically…

2 Likes

I’m currently using the Xplay app on my LG 65B9 since I had issues with the normal Plex app buffering non stop. After reading and learning a lot about it, I learned what the issues were. Right now I’m settled with Xplay on my LG, but my brother recently got a new Samsung tv (SAMSUNG QE75Q70T 2020) with Tizen. When he tries to play 4k movies with decent audio (TrueHD 7.1), it forces transcode and buffers non stop.
I would love to see an option to (try to) completely disable this. It baffles me that a third-party app is able to do this correctly. Sadly, there is no Xplay for Samsung with Tizen..

I couldn’t agree more on this. Some files can be played while transcoding the audio and direct streaming the video but for others Plex just decides to transcode both stupidly!

Please just add this already…

2 Likes

any update on this? Have aac stereo and aac 5.1 on most movies and tv shows. Would like to set default to aac 5.1 instead of having to change everytime.

Waiting for this…

1 Like

Yep this should be a thing…
Won’t hold my breath though, this suggestion is already 1 year and a half old with nothing to show for it.

I echo what everyone says here. I wish I could select which codecs to AVOID on a per client basis. This way I can tell my android TV client to avoid True HD, so this way it just selects the best codec while avoiding that.

For example some of my remuxes have DTS HD and True HD, for some reason True HD is always the default so I wish it would go in this order: See that True HD is a codec I don’t want, check if there’s a DTS HD track, then check if there’s an AC 3 track, then lastly transcode if it has to. Why does it transcode to AC 3 even when there’s an AC 3 track? Why don’t we check if what we want to transcode to already exists?