Naming conventions

Server Version#: service ver. 1.51

Hi,
I wonder if anyone (ideally one of the admins) can shed some light on the origins/necessity of the strict file naming conventions? I recently ran into an issue where Plex wasn’t picking up a movie that didn’t adhere to the guidelines (eg, Dark.Waters.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv) but did once I renamed it per recommended conventions (eg, Dark Waters (2019)); the same wasn’t true for a different file, which WAS picked up by Plex despite not adhering to conventions (eg, Ford.v.Ferrari.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv).

I appreciate that determining name of the film from a label isn’t a slam dunk, but provided title is present in some form, it shouldn’t be that difficult using either regex or fuzzy match, assuming spelling errors, what have you.

How hasn’t Plex resolved something like this that seems like low hanging fruit and provides some serious potential headaches for users?

Here’s the thing: if you follow the naming rules every time, Plex will do the right thing 99% of the time.

If you don’t follow the rules, all bets are off but sometimes you just get lucky.

Plex has to work with various online databases and these databases have a preferred name and structure - if one expects Plex and the database in question to come to an agreement on a match.

You are welcome to pour whatever you think might work into the system to see what happens. Most of us find a proper name and structure hits pay dirt more often. Lately around 100%.

When it all goes South for you - there is Fix Match.

Note:

Plex on Scene Names:

rtcobb2

Plex on Filebot:

plexkitty1

However! From the ‘Breaking News Department’:

Apparently the ‘Brain’ that does all the negotiating, like Skynet, is a learning machine. On it’s quest to take over - it learns - so the more you Fix Match, the better it’ll get at it.

Knock yourself out.

That doesn’t really address the ‘why’. Like I said, it’s fairly straightforward to deal with the majority of cases (outside of common words, etc) via some search/filter.

Is Plex opensource? I’m happy to take a look to see if I can help provided code base is in either C, C++ or Python.

Why? Simple, it’s a computer. It has no idea what any of this stuff is. Sure, Plex could put in code to explicitly ignore some of these phrases, but then what happens if these phrases are actually part of the name. This happened before with the term “d.c.” or “dc” which is used sometimes for “director’s cut”, but then you have movies from “DC” comics, which end up not matching. Or if the title has “Washington DC”.

The “why” is to eliminate the extraneous information not useful for a match. We can infer from the information in the filename what the movie because we know what bits of it can be safely ignored, and how to interpret what remains. Plex cannot. It has to consider every piece of information in the filename because it is present. And it needs those certain bits of information presented in a particular way so it knows how to treat them.

For your failed example in particular, there are no fewer than 8 exact title matches on IMDB (the default movie agent used by Plex), when not considering the year. And in this example Plex cannot consider 2019 as the release year since it’s not in parentheses; it has to treat it as part of the actual movie name because there are movies named as such (2001: A Space Odyssey, 2012, many others).

So, with the extraneous information, which Plex can’t throw away, and the year not being properly presented, no results with high enough confidence to be considered are returned. So no match. Plex is, against all odds, able to make a match under these conditions sometimes, as your second example confirms.

It’s best to conform to the guidelines. If you need to keep the extraneous information in the filename for some reason, you can. Just place it in square brackets, which tells Plex to ignore it:

Dark.Waters (2019) [720p.AMZN.WEB-DL.DDP5.1.H.264-NTG].mkv

And place the year in parentheses so that Plex knows it’s not part of the movie name and treats it as the release year. This helps disambiguate results when there are multiple exact name matches.

Right now Filebot is providing names and structures that have, for a month, at least, been providing 100% matches.

Let’s not do anything to mess that up - like it’s been for the last 3 years:

The overhaul at TVDB and the subsequent actions at Plex have returned us to something wonderful. Let’s keep it this way.

Users with file naming issues - can Fix Match.

Right, that’s what I’m saying. It’d be fairly straight forward to incorporate a mechanism to do the following:
1 - remove non-title keywords (eg, AMZN, WEB, ‘DDP5’, ‘720p’, NTG, WEB, etc)
2 - remove extraneous characters (eg, -, %, $) and file designation (eg, .mkv)
3 - in this case, having done that you’re left with ‘Dark.Waters.2019’…it’s trivial to strip, or simply replace periods for spaces and you’re left with some version of whatever is currently being searched on (‘Dark Waters 2019’).

In short, I would imagine it’d be fairly simple to use regex (or NLP if it requires it) to do this.

I have to imagine, at some point, everyone has found the current requirements burdensome. This would be a nice step to making Plex server more user-friendly.

This is helpful info, thanks.

See my other response re ignoring extraneous info.

I appreciate it will never be perfect (like, ever), but better seems obviously within reach. I’m not clear on why Plex hasn’t attempted to improve the matching mechanism. For instance, to add to my previous comment, words at the beginning of the string are more important (ie, more likely the title). How can the first three words not be used iteratively to arrive at a match (ie, Dark, then Waters, then 2019…just 1 100% match on IMDB within ‘Movies’).

But that won’t always work. A movie could have these words or characters in them, which would them screw up the matching for these other movies.

My “DC” comment above was an example. Plex implemented ignoring “DC”, and it resulted in some movies not getting matched.

From your list “Web”, a movie like Charlotte’s Web wouldn’t match. Additionally, most files with these types of naming are of questionable origin, and Plex is not going to assist. if you are ripping discs, these things wouldn’t be an issue.

Right, I don’t expect 100% perfect (it almost wouldn’t be worth the effort to get there, honestly). But cases like this seem within reach. By rough estimate in my current library I’m missing ~20% of titles, a lot of them like this.

Your Charlotte’s Web example, for instance, I imagine the ‘Web’ in the title would be capitalized while the other would be all caps, and at a minimum it would almost certainly be presented first in the string and before the release year. In short, it seems like there are obvious way to improve the current mechanism.

If I may add here, having gotten a much deeper understanding of how the matching software works tonight from the dev himself,

I am using the example given. I’ve not tested in it in this form. I am writing here only to explain how it works and this was the first-available example.

During automatic matching,

  1. Everything found is used. Dark.Waters.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv)
    is broken into words Dark+Water+2019+720p+AMZN+WEB-DL+1+H+264+NTG and used as the search criteria.
  2. The number of items (tokens) in that list is 10.
  3. The best match it can get would Dark+Waters (year-hint=2019) = 2 items.
  4. 2 of 10 = 20% match score.
  5. 20% does not meet the minimum match score required for automatic.

When the name is freed of the extra information, either by enclosing in [ & ] (anything between brackets is ignored), or removing from the name entirely, the resultant searcn becomes Dark+Waters+2019 (now only 3 items).

Based on heuristic match data (everyone else who has used fix match) the match engine knows 2019 is the year and not part of the name.

It now can search using Dark+Waters+(year-hint=2019) (2 items)

The simple percentage / probability of match is 2 versus 2 yields a match score of 100.

The software sees this value is greater than the required minimum and returned “Matched” status.

Per the references to FileBot,

What it does is

  1. Take the file name as given
  2. Start the same brute force search using everything (after having parsed it)
  3. Iterates down , removing words until it finds the best match
  4. It displays that match candidate in the right-hand pane.
  5. That match candidate is the pristine name inclusive of other directory & year (if included) in the final file name.
  6. When you click “Rename”, it movies & renames (copying then deleting after if necessary) to put the file in pristine form.

The naming template I use for movies is very simple:

/nas/movies/{n} ({y})/{n} ({y})

{n} = name
{y} = year

I can choose to add extra information if I wish. Here is how I would add resolution.
If I were to do that, I would likely have something of the form below which conveys the info and is compliant with Plex naming standards.

/nas/movies/{n} ({y}) [{resolution}]/{n} ({y}) [{resolution}]

This would produce:

/nas/movies/Star Trek Nemesis (2002) [2160p]/Star Trek Nemesis (2002) [2160p].mkv

caveat: I haven’t used resolution in a while so the output might now be different than what I show here.

I hope this helps take some of the mystery out of all this. I will also add; using a regex, in isolation, can only address some of the elements found. . They either include or exclude characters found. There will be failures on the pro and con side. It will include what it should have skipped and the reverse, all because of the serial LR-parse nature of the expression. Anything out of sequence from what the regex is expecting will result in a fail.

My best advice is:

  1. Get FileBot. It’s more than worth its cost many times over
  2. Take the time to workout the perfect renaming expression for your needs.
  3. When you have that, drop the existing files in and let FileBot rename everything.
    a. It will rename my entire library in less than 5 minutes.
5 Likes

If we’re advertising FileBot (24/7):

I just received the Family Guy DVDs for Seasons 1 thru 5.
They’re all nicely listed with the Episode Name - I have no idea what the SXXEXX is, but FileBot does.

I pre-name my MakeMKV names to:
family guy - petarded
Filebot finds the episode and names it perfectly.

No muss, no fuss and for the last month - 100% matches.

1 Like

I’m not passing any judgement, but people who rip files from their physical movie collection would never use such naming conventions.

While I totally get what you’re saying, I don’t think it’s Plex’s responsibility to account for the naming conventions of torrented files.

2 Likes

Absolutely

Not by any stretch of the imagination.

What’s more: IF Plex messes up ‘Perfect File Naming’ to cater to those who WILL NOT rename their files - it is Plex that’s messin’ up - and they’ll make a lot more of us mad, than happy. That much is certain.

1 Like

Seems even more restricted for handling ‘TV Shows’ - there is no ‘Fix Match’ menu option like there is for ‘Movies’
I recently added a TV season [one subdir containing a file for each episode] and I had to fiddle with the subdir name for it to be recognised [grey icon and episodes just called ‘Episode 1’ etc] - then (when I hit the magic subdir name) ‘bam’ …the season icon was correct and so was the info for each episode

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.