Add a filename tag/label to specify audio/subtitle tracks to play to enable symlinked commentaries

Hello,

I would love the ability to specify which audio and subtitle track to play via the filename.

The use case is the following:

1 mkv with several audio tracks (main feature, audio commentary, etc.) and subs for the same. Currently, we have to rely on the descriptions (and rememebering to check them) in the drop downs on plex web, which is a bit inconsistent with the presentation of other “extras” in the gui.

I would propose instead a case where I could instead create an “edition” of the same video file (using existing edition functionality) with specified track parameters. By allowing me to do this via filename, I could leverage symlinks, so I only have to have 1 actual copy of the file taking up server space, instead of duplicate ones for each “edition”, while also leveraging the wonderful UX of “editions” (as opposed to the track dropdowns to remember what you have commentaries/extra features for)

filenames could look something like this:

  • my_file_name.mkv (this would use the default track specifications)
  • my_file_name {edition-Director's Commentary} {audio_track-2}{subtitle_track-2}.mkv (where 2 is the associated track number for both the audio and subs for the commentary)

With the second file (the director’s commentary flagged one) being a symlink of the first file.

Admittedly, this is definitely more of a power user feature but so are the filename tags in general, and nobody is forced to interact with them.

I also acknowledge that I can already do this (symlinks and another edition), but it would just play the default tracks, instead of the ones for the specific commentary (flagged by the filename) by default, which is what I’m hoping to enable.

There’s an existing suggestion discussing an option to present available audio tracks with the term „Commentary“ in their track title as extras. If I your suggestion correctly, you’d like to achieve the same but based on creating a symlink file in a video’s direction that contains a reference which tracks it should play.

Example:

File

Movies
  Movie 1 (year)
    Movie 1 (year).ext

with audio tracks

  • a1: English
  • a2: French
  • a3: Director’s Commentary
  • a4: Commentary by Actor 1 & Actor 2

Their suggestion:

Plex should list the file in your library with 2 automatically created „extras“ labeled

  • Director‘s Commentary
  • Commentary by Actor 1 & Actor 2

Each playing the movie with that particular audio track selected (without switching the audio selection of the movie itself).

Your suggestion:

Have a dedicated symlink to the file, that’s pointing to the commentaries you’d like to see represented in the library itself.
I’m just a bit confused if you’re aiming to use those as actual separate editions or extras… so it could be either

Separate edition entry with pre-configured audio/subtitle selection, e.g.

Movies
    Movie 1 (year)  <- main file, regular library item
      Movie 1 (year).ext
    Movie 1 (year) {edition-Director‘s Commentary}{audio-3}{subtitle-…}
      Movie 1 (year) {edition-Director‘s Commentary}{audio-3}{subtitle-…}.ext  <- symlink
    Movie 1 (year) {edition-Commentary by Actor 1 & Actor 2}{audio-4}{subtitle-…}
      Movie 1 (year) {edition-Commentary by Actor 1 & Actor 2}{audio-4}{subtitle-…}.ext  <- symlink

→ listing 3 editions

  • main movie
  • Director’s Commentary
  • Commentary by Actor 1 & Actor 2

Main movie and per-commentary extras with pre-configured audio/subtitle selection, e.g.

Movies
  Movie 1 (year)
    Movie 1 (year).ext
    Director’s Commentary {audio-3}{subtitle-…}-commentary.ext  <- symlink
    Commentary by Actor 1 & Actor 2 {audio-4}{subtitle-…}-commentary.ext  <- symlink

→ listing the main movie with 2 extras

  • Director’s Commentary
  • Commentary by Actor 1 & Actor 2

Yes, this could be a viable option as well, though I prefer the more open/configurable nature of my approach (it’s also probably lighter weight to implement, as it just piggybacks on the existing “edition” functionality and really is just adding a “play this track” parser)

My concern with the linked approach would be if there were use cases that didn’t fit in the automatic detection like “commentary” etc., but if it was similarly open/configurable that could avoid the issue of creating symlinks to make it work with less storage, it would just possibly be more work to implement.

Either approach works for me though, as long as the end result is "I can view commentaries as alternate editions (preferred) or extras with no additional file space devoted to slightly different versions of the same file.

Hmmm, I like the idea of using symlinks for this, especially if the filename of the symlink can specify which subtitle tracks go with that particular commentary. That was a major challenge we ran into while brain storming on my feature suggestion thread, with the possibility of multiple subtitle tracks per commentary for example.

It’s completely container-agnostic too, which is nice.

The only problem I see is that if you have to move your library to another storage medium, there is a lot of potential to break things with the symlinks. You could end up with multiple copies of each film on the destination, or the symlinks being copied but not directing to the also copied movie file…
For Windows Server Admins, do symlinks even exist on NTFS?

But now you’ve got me thinking again…
Maybe we’re both thinking too technical about this? Perhaps a sort of combination of both our suggestions. What if instead of a symlink, a plain text file? Name it whatever you want the commentary extra to be, like “Movie 1 (year).Director’s Commentary.conf” or “Movie 1 (year).Commentary by Actor 1 & Actor 2.conf”… or simpler like “Movie 1 (year).commentary 1.conf
Then in the text file, have a few key/value pairs… something like:

Name: Director’s Commentary
Source: Movie 1 (year).ext
Audio track: 3
Subtitle tracks:
    [track name]:[track number]
    [track name]:[track number]
    …

Where the name is what you want Plex to display it as, source is the source file (specifying it in the file would also allow for this to work for TV Shows), which audio track is the commentary, and which subtitles are relevant. Track name would be what to display in the track chooser, like “English” or “English Audio Descriptions”, and track number would be which number subtitle track in the source it is.

I think I’ve laid it out in a yaml-like style above but anything that is easy to type out in a text editor would work.
Could probably refactor even to allow a single file per source file that then describes multiple commentaries.
Wouldn’t have to be .conf files, could be .commentary for all it matters as long as they are plaintext.

That would allow this to work in completely filesystem agnostic way too, completely removing the risk for if a user needs to migrate to new storage, and is probably easier to customise than putting it all in a filename, no?
And leave open for supporting more advanced features in the future in a backwards compatible way, for example referencing a Picture in Picture video steam to add in for commentaries that come with one would be possible, if the Plex player supported it in the future.

Anyway, food for thought :grinning:

yeah, symlinks were just an idea I had for “how do I make this file twice without space” but a text file could be a great alternative and probably worth the extra engineering in light of the reasons you mentioned.