Dynamic Video, Audio, and Subtitle Selection by PMS/Plex Client, and "Use with Foreign Audio" tweak

I’ve been considering how one might be able to reduce the number of transcodes necessary for users, outside of telling the user to get a different device, or relying on the “Optimize” Function, for each individual device. What would be ideal for me, is preparing stream based content outside of containers, or it could be done in a single Matroska container. Once you have the files prepared in the folder or container, then there would be the ability for Plex to dynamically choose which video track, audio track, and subtitle track it sends, based on the clients chosen playback device, bandwidth, and what it supports. What I’m suggesting would look something like this:

All in Single Folder/Matroska Container:

 Video Tracks:
  -2160p (HDR)
  -2160p (Non-HDR)
  -1080p
  -720p

 Audio Tracks:
  -Atmos
  -DTS:X
  -DTS
  -5.1AC3
  -Stereo MP3

 Subtitle Tracks:
  -.srt
  -.ass
  -.pgs
  -.vob

Matroska isn’t supported on all devices as far as I know, though I think this is becoming less and less as time goes on. So imo it’s still viable if Plex would choose to handle Matroska with Multiple Video Streams.

Plex already has some of this type of functionality built in, for instance, we can place audio and subtitle files in the folder, and as long as they’re named properly, they will become part of the video w/ selections within Plex, and Plex will just multiplex them together. Currently this option causes random transcodes, and I have no idea why, it still does it though. We also have the ability to make an optimized version, which allows for this type of functionality partially if I understand how it works correctly.

There are a few things I don’t know about in Plex to make that assumption though. For instance: If you have 2 of the same file, one that is optimized and one that is not, will PMS ALWAYS select the Optimized version? Or, if the users client/hardware allows, will it allow the full version to be sent instead? If I put in a 4K movie and a 1080p movie, and allow them to be “duplicates”, will it choose the 4K file automatically for the devices capable of this, and choose the 1080 file for ones that don’t? I have no real way of testing this as I have all 4K TV’s/monitors/devices in my home, and when I asked in a different forum before posting here, I was told that Plex will always choose the highest resolution possible from client side and that that’s what PMS prefers, but that would mean that no matter what, if you wanted to have a 4K copy of a video, you’re stuck transcoding that down to 1080p for anyone else who doesn’t have a 4K player, which is a pain and seems quite odd that it functions this way.

Also, the current handling of multiple video files and how to select them is in the “More” Menu, rather than in the same location as the audio selection and the subtitle selection, why? The only workaround I have for this currently is to have a 4K Videos section, but for me, that just creates more clutter than is necessary, I also think it makes the database larger than necessary. I’d also like this to possibly work for H-SBS and H-OU 3D content as well. User selectable 3D would be pretty nice, and a GUI that shows the 3D Logo, 4K Logo, HDR logo as possible viewing options, rather than placing them in their own section or having someone go through the “More” menu, placing them in the same spot you select audio and subtitles would be ideal. Same for “Extended” and “Theatrical” versions. The possibilities are really endless here. (though I think for Extended vs Theatrical or something where the movies length differs from some of the available audio tracks would necessitate multiple containers, which is fine as long as the selection is integrated on the main page rather than the “More” menu)

Why on earth would someone wanna go through all this trouble? Well, this would ensure maximum compatibility across devices with minimal effort. Essentially you put in the effort ahead of time, and then you don’t have to worry about it going forward. It would also reduce the number of transcodes the machine had to do, thereby saving power, increasing efficiency, etc. It creates an environment that is more seamless for the end user. It offers similar functionality to something like Youtube or Netflix (both having multiple copies of the same movie, and sweeping up in quality as user bandwidth increases), which is always a plus for the end user.

Now, I understand this isn’t an ideal solution for someone with a 1-2TB server that uses it in their home one to two players at a time, but for those of us who have many TB’s to spare, and have many users, it would be quite nice, I have at times seen a bunch of transcodes simultaneously on my machine, and while it can handle it, the amount of power my computer is sucking down just irks me. Honestly I am surprised that there isn’t an easier solution to this already, Jellyfin already does a “decent” job at doing something similar to this. But I stick with Plex because I like other things about it.

While I’m at it, I think the handling of “Use with Foreign Language” for subtitles really should be based on the chosen system language, rather than the chosen “Preferred Audio Language”. I prefer to watch movies in their native languages, though, specifically for Anime, when it gets dubbed, and you create a Dual Audio copy the English audio track is usually the first track in the playlist and typically set as the default. So, by allowing me to select my “Preferred Audio Language” as Japanese, and setting the “Use with Foreign Language” option that checks against the system language, I would almost never have to fiddle with my audio. As it sits right now, I have to go in and manually select Japanese Audio for every single Episode that I have that is Dual Audio, and with Hundreds, possibly thousands, of Dual Audio episodes, this task is tedious…

If you’ve made it this far, thanks for reading. I hope it at the very least sparks conversation, I always love learning more.

I’ve edited so the message is clearer, and added something about Subtitles with Foreign Audio that I also feel is kind of relevant to the overall experience.

1 Like