Append language code to video filenames

Hello,

Please add a feature to read language codes from movie video filenames (for videos with “unknown language” tracks) similar to how subtitle files work. It could be deployed as, for example:

Movie (2023).en.mp4

which would label the all audio and subtitle tracks (if present) in the video as English, or:

Movie (2023).en.forced.mp4

which would label all streams as English and set the subtitles as forced. For more complex streams:

Movie (2023).a1.en.a2.en.comm.s1.spa.forced.s2.en.sdh.mp4

which would set audio stream 1 as English, audio stream 2 as English commentary, subtitle 1 as Spanish forced, and subtitle 2 as English for the deaf and hard-of-hearing.

Such a setup, although a bit convoluted, is infinitely easier than remuxing large movie collections, which is not always an option, is highly intensive on the disks (especially for RAID arrays), and can potentially induce synchronization errors into the resulting container.

Thank you!

Setting the language of individual tracks doesn’t require remuxing. This can e.g. easily be done using the MKVToolNix header editor. That seems significantly less cumbersome than introducing hacks to incorporate language information for different audio/subtitle tracks in the file name…

Thank you for the info; I was not aware of this. All info regarding “Plex” and “audio language” led to info suggesting (and lamenting) remuxing the files.

Setting the language of individual tracks doesn’t require remuxing. This can e.g. easily be done using the MKVToolNix header editor.

That of course requires that it’s an MKV file. MP4 files are a lot more bothersome, when it comes to changing details like this.

There’s tools to do the same for mp4 files as well. I’ve been using Subler to do that on macOS. From what I’ve heard you should be able to use mp3tag on Windows to do the same (despite the name)

I don’t think so. mp3tag can attach general metadata like title, description etc for the whole container. But it cannot edit data of a select data stream, like a subtitle or audio stream.

1 Like

In that case I stand corrected… although I’m sure there’s similar editors like Subler for Windows that allow tagging the tracks

Please add a feature that allows for the Plex Library scanner to detect custom language tags in media filenames to manually assign language tags to media, so that we don’t have to remux or modify file headers for incorrectly tagged media:

Imagined usage cases:

  • Incorrectly tagged media e.g. ‘Unknown’ language audio tracks
  • Media with multiple audio tracks, where you wish to force one track over another track, but for which the existing auto preference settings remain inadequate, e.g. 2 or more of the same language tracks but you want to force one over the other

Imagined Example filename formatting:

  • Movie_name (YYYY) {lang-eng}
  • Movie_name (YYYY) {lang-jap}{lang-eng}
  • Movie_name (YYYY) {lang-jap,eng} alternative for multiple tracks
  • TV_Show - S00E00 - Episode_name {lang-jap,eng.for}
    (Forced english track #2)
  • TV_Show - S00E00 - Episode_name {lang-jap,eng(Funimation Dub),eng(Ocean Dub)}
    (3 Audio tracks with manually specified descriptions for tracks 2 & 3)
  • Movie_name (YYYY) {lang-03-eng(Commentary)}
    Track #3 to be force tagged as ‘English’ and titled ‘Commentary’
  • Movie_name (YYYY) {imdb-xxxxxx}{edition-label}{lang-eng}
    example of fully tagged filename

These same rules can and ideally should be extrapolated for allowing for manual tagging of embedded subtitle tracks! e.g.

  • Movie_name (YYYY) {lang-eng}{subs-eng,fre,ger}
  • TV_Show - S00E00 - Episode_name {lang-jap,eng}{subs-eng.for(Signs & Songs),eng(Dialogue)}

If implemented these rules should allow for broad cross-compatibility and cut down on wasteful operations

Would that imply the sequence of audio/subtitle language tags reflect the order of the corresponding tracks in your files?
It feels like managing the track header will be so much easier to keep track of / not to mess things up.

Yes it does imply that the sequence corresponds to the order of the tracks in the files, and the array of examples provided also indicates the possible versatility of pinpointing selected tracks without affecting others.

I disagree about managing the track header being easier because the main use case purpose of this is for media with just one incorrectly tagged track, it’s much more efficient and non-intrusive to not remux mp4s or modify mkv headers, and most people don’t know how to do that anyway (nor should they have to learn if we can just type a few letters into a filename, and bulk file renaming tools are also much easier for people to figure out than custom ffmpeg scripts)

Imagine there was some reason you really did not want to have to modify an original file… having a system based on filename based modifiers cuts down on waste


As others have tried to explain mp4 track stream metadata can’t be modified without remuxing or transcoding (Mp3tag is not able to edit this data) - only mkv’s can have their headers easily modified but these operations are still tedious and slower than filename tagging especially for bulk tagging

Me not knowing a Windows app and Otto pointing out that mp3tag can’t do it, doesn’t establish that changing track headers requires a full remux. I acknowledge that having a working, non-remuxing application on macOS won’t help with your non-macOS setup.
I’ll let you know if I find a corresponding Windows app (I can’t imagine there’s only 1 app doing this… though, kudos to that dev)