Open PHT Can't find a subtitle file

Hi,

This behaviour is very strange and it occurs since the time I was Using PHT, and still happens under OpenPHT. My movie files are under a MOVIES folder and every movie has it’s won subfolder. Inside the MOVIE NAME folder, usually i keep just 2 files. The MKV file + the MOVIE.NAME.pt.srt file (As I’m a native Portuguese speaker).

The expected behaviour for OpenPHT is to automatically identify the SRT file and display the “portuguese (external srt)” selection. But most of the time it does not. No subtitle file is shown. As if Plex was not able to find it.
If I choose to manually browse for the subtitle file it’s there and I can select it by hand. But than an odd thing happens. ALL special characters are missing during playback. So, letters as ç, ã, é, í, ö are not shown. For a Latin language such as Portuguese it may get hard to read some words, not to mention awful distractive. Words like “atenção” are displayed as atenc, Pelé, just pel and so forth.

Both first and second problems seam to be 2 different bugs. I’ve found a workaround that kind of fix this, but I hope some one can have a more “elegant” solution.

The workaround is to close OpenPHT, Open Finder and browse till I open the MOVIE NAME folder, and then rename the file that was kept on it’s usually original download name (something like “xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.mkv”) to some simpler version of itself, such as “xxxxx xxxxx xxxxxx 2016.mkv”. I do the same to the SRT file, close finder, wait to PMS to rescan my library, launch OpenPHT and Voilá the subtitle is listed on language options. Then I can choose Portuguese, from the list and watch my movie.

It’s annoying because it forces me to rename manually my files and also, because after I rename a movie file, I no longer know wich release this was. And without knowing the exact release, it get’s really difficult to download a new Subtitle file, should the previously downloaded have some sync problem.

Strangely enough, this odd behavior does not occur on my TV SHOWS folders. Even if there I use one more folder level (season) and even I the tv show file name are long, confusing and full of . - or _.

So, this is something that affects only MOVIE files.

Question, if this is a config problem, could someone please help me to adjust?
Or, if it’s a bug, could it please be solved ASAP?

Thanks and sorry for the long missive

Leonardo Dias
Sao Paulo, Brazil

@diasleo said:
Hi,

This behaviour is very strange and it occurs since the time I was Using PHT, and still happens under OpenPHT. My movie files are under a MOVIES folder and every movie has it’s won subfolder. Inside the MOVIE NAME folder, usually i keep just 2 files. The MKV file + the MOVIE.NAME.pt.srt file (As I’m a native Portuguese speaker).

The expected behaviour for OpenPHT is to automatically identify the SRT file and display the “portuguese (external srt)” selection. But most of the time it does not. No subtitle file is shown. As if Plex was not able to find it.
If I choose to manually browse for the subtitle file it’s there and I can select it by hand. But than an odd thing happens. ALL special characters are missing during playback. So, letters as ç, ã, é, í, ö are not shown. For a Latin language such as Portuguese it may get hard to read some words, not to mention awful distractive. Words like “atenção” are displayed as atenc, Pelé, just pel and so forth.

Both first and second problems seam to be 2 different bugs. I’ve found a workaround that kind of fix this, but I hope some one can have a more “elegant” solution.

The workaround is to close OpenPHT, Open Finder and browse till I open the MOVIE NAME folder, and then rename the file that was kept on it’s usually original download name (something like “xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.mkv”) to some simpler version of itself, such as “xxxxx xxxxx xxxxxx 2016.mkv”. I do the same to the SRT file, close finder, wait to PMS to rescan my library, launch OpenPHT and Voilá the subtitle is listed on language options. Then I can choose Portuguese, from the list and watch my movie.

It’s annoying because it forces me to rename manually my files and also, because after I rename a movie file, I no longer know wich release this was. And without knowing the exact release, it get’s really difficult to download a new Subtitle file, should the previously downloaded have some sync problem.

Strangely enough, this odd behavior does not occur on my TV SHOWS folders. Even if there I use one more folder level (season) and even I the tv show file name are long, confusing and full of . - or _.

So, this is something that affects only MOVIE files.

Question, if this is a config problem, could someone please help me to adjust?
Or, if it’s a bug, could it please be solved ASAP?

Thanks and sorry for the long missive

Leonardo Dias
Sao Paulo, Brazil

I just want to add my setup:

I’m running PMS and OpenPHT most recent versions, on the same machine running on a OSX El capitan (10.11.16).
MOVIES folder is using, Plex Movie Scanner and Plex Movie Agent.
TV SHOWS folder is using TheTVDB agent

The instructions on this page can be misunderstood https://support.plex.tv/hc/en-us/articles/200471133-Adding-Local-Subtitles-to-Your-Media
external subtitles are recognised when they have the exact same name as the video file, except for the filename extension and the language code before that.
So the proper subtitle file name for your video file xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.mkv would be
xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.pt.srt

Second issue: Plex relies on the SRT file being encoded in the ‘UTF-8’ text encoding. If you download a subtitle file, check this and convert if necessary. Otherwise you’ll be getting either garbage characters or missing chars like you experienced before.
There is even a Plex plug in, which tries to convert the subtitle encodings for you.

Dear Otto, thanks for your reply,

I’m familiar with the need of the proper file name for the SRT file. All my subtitles do have the exact name the movie file + “.pt.srt”. Still, for the last year, or so, PHT and Open PHT have been failing to find some srt files. Specially long, complex names (with lots of dots, or “-”).

On the second issue, I just finished installing the UFT-8 Plugin. I’ll came back later and let you know if this works for me as well.

Thanks in the mean time.

Leonardo Dias
Brasil

@OttoKerner said:
The instructions on this page can be misunderstood https://support.plex.tv/hc/en-us/articles/200471133-Adding-Local-Subtitles-to-Your-Media
external subtitles are recognised when they have the exact same name as the video file, except for the filename extension and the language code before that.
So the proper subtitle file name for your video file xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.mkv would be
xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.pt.srt

Second issue: Plex relies on the SRT file being encoded in the ‘UTF-8’ text encoding. If you download a subtitle file, check this and convert if necessary. Otherwise you’ll be getting either garbage characters or missing chars like you experienced before.
There is even a Plex plug in, which tries to convert the subtitle encodings for you.

Dear Otto,

I’ve just finished testing playing some movies after installing and setting up the Plug in you suggested. Unfortunately nothing has changed.

Open PHT does not seam to recognise and find automatically srt files (named correctly with exact same movie name + .pt.srt in the end). And, when I try to browse and manually open the SRT file, no special character is displayed.

Though, if I rename the movie file and the subtitle as well to a much shorter name, all things work. (Well, this proves that the SRT file was UFT-8 encoded to begin with, since the only thing that has changed as the file name…

So, I’m stuck again, I really thing this is a bug. But any help is appreciated.

Thanks a bunch

Leonardo Dias
Brasil

@OttoKerner said:
The instructions on this page can be misunderstood https://support.plex.tv/hc/en-us/articles/200471133-Adding-Local-Subtitles-to-Your-Media
external subtitles are recognised when they have the exact same name as the video file, except for the filename extension and the language code before that.
So the proper subtitle file name for your video file xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.mkv would be
xxxxxxxx.xxxxxxxx.xx.xxxx.2016.1080p.BluRay.x264-ROVERS.pt.srt

Second issue: Plex relies on the SRT file being encoded in the ‘UTF-8’ text encoding. If you download a subtitle file, check this and convert if necessary. Otherwise you’ll be getting either garbage characters or missing chars like you experienced before.
There is even a Plex plug in, which tries to convert the subtitle encodings for you.

@diasleo said:
Open PHT does not seam to recognise and find automatically srt files (named correctly with exact same movie name + .pt.srt in the end).

Technically, it is Plex Server which browses and adds the subtitles.

And, when I try to browse and manually open the SRT file, no special character is displayed.

Please explain. What are you doing? Which program are you using to browse? And how exactly does it look like when you see special characters missing?
Maybe take a screenshot, please.

Though, if I rename the movie file and the subtitle as well to a much shorter name, all things work. (Well, this proves that the SRT file was UFT-8 encoded to begin with, since the only thing that has changed as the file name…

You carefully masked out your real file names. If you didn’t I might have spotted something like a special character in the file name which might have prevented the subtitle getting recognised by PMS.
So please, give me an actual file name which fails to work.

Hi,

Ok, so It’s PMS that has some kind of problem with my subtitles :wink:

When I say I browse and manually open the SRT file, I mean inside Plex, while playing a movie. Assuming I’m watching in my mac, I press menu, than go to the settings menu item, select “browse subtitle” and select the srt file that’s in the same folder my MKV movie file is. Yes, it’s a .pt.srt file.

So it’s no other app, or software I use, just Open PHT, or in the old days PHT itself. Both show the same behavior.
As the srt file is in the same folder, as it has the pt extension, I’d expect Plex to find it automatically, but it does not do it all the time.
So, I manually select the SRT file but every time I do this all é, à, õ, í, ü, ç ê, â and so forth, do not display in the screen. Not even a space, or mambojambo codes. The special characters are suppressed.
I’ve attached a print screen file, so You could see it. The yellow letters are the way Plex displays them, the blue one is written the right way.

It does not occur when the SAME file is automatically identified by Plex. That’s the odd thing!

I know a thing, or two about computers, and I assure you none of my files have any special characters. No file have any symbol that would not be read on a web URL, for example.

To give a real example, let’s take this file name:
Manhattan.Night.2016.1080p.WEB-DL.DD5.1.H264-FGT.mkv
with it’s Manhattan.Night.2016.1080p.WEB-DL.DD5.1.H264-FGT.pt.srt

Plex would not find it, till they’d be renamed into this:
Manhattan Night.mkv and
Manhattan Night.pt.srt

What troubles me is that If I’m to rename all my movie files before watching them into something that would not allow me to know what was the original file, so, if needed, then I’would not know witch SRT release to download again. It kind of sucks, because there’s a lot of bad synced SRT files out there.

I’m not quite sure when this behaviour has started. But I use Plex for some 5 years or more. And it worked ok in the begging. It was just last year that this issue started. It took me some time to figure out these workarounds, with a lot of trial and errors.

Another odd thing is that my TV shows never have this issue, even using similar kind of names.

Once again, thanks for any help!

@OttoKerner said:

@diasleo said:
Open PHT does not seam to recognise and find automatically srt files (named correctly with exact same movie name + .pt.srt in the end).

Technically, it is Plex Server which browses and adds the subtitles.

And, when I try to browse and manually open the SRT file, no special character is displayed.

Please explain. What are you doing? Which program are you using to browse? And how exactly does it look like when you see special characters missing?
Maybe take a screenshot, please.

Though, if I rename the movie file and the subtitle as well to a much shorter name, all things work. (Well, this proves that the SRT file was UFT-8 encoded to begin with, since the only thing that has changed as the file name…

You carefully masked out your real file names. If you didn’t I might have spotted something like a special character in the file name which might have prevented the subtitle getting recognised by PMS.
So please, give me an actual file name which fails to work.

You will always have issues if you do not use the correct naming conventions. This is why I make sure everything is labelled correctly with filebot or some other similar software so I don’t run into these issues.

@diasleo said:
When I say I browse and manually open the SRT file, I mean inside Plex, while playing a movie. Assuming I’m watching in my mac, I press menu, than go to the settings menu item, select “browse subtitle” and select the srt file that’s in the same folder my MKV movie file is. Yes, it’s a .pt.srt file.
Ok, so It’s PMS that has some kind of problem with my subtitles :wink:

Well if you do that way, it is indeed OpenPHT, which has the problem.
This function to load local subtitles exists only in PHT. For all other clients, the file needs to be on the server.

As the srt file is in the same folder, as it has the pt extension, I’d expect Plex to find it automatically, but it does not do it all the time.

Are your media files on the Apple computer directly or are they on a NAS?

For movies where the ‘sidecar’ subtitle is not detected by the server, can you please take a look at the folder contents? There must be no files in there with non-ascii characters in them.
Also the names of the folders above this movie must not contain any non-ascii characters.

But if you say that it works for some movies and not for others, then the culprit must be either the folder name of the movie or the movie file name itself or some other file which is in the same folder as the movie video file.

So, I manually select the SRT file but every time I do this all é, à, õ, í, ü, ç ê, â and so forth, do not display in the screen. Not even a space, or mambojambo codes. The special characters are suppressed.

Could you please zip up such a misbehaving subtitle file and attach it here?

To give a real example, let’s take this file name:
Manhattan.Night.2016.1080p.WEB-DL.DD5.1.H264-FGT.mkv
with it’s Manhattan.Night.2016.1080p.WEB-DL.DD5.1.H264-FGT.pt.srt

Try to make it more pleasing for plex while maintaining the info which release it is by doing this:

  • no dots in the file name, except when they are part of the offical title
  • Official Title (year) - [extrainfo].ext

So could you please test with this?
Manhattan Night (2016) - [1080p.WEB-DL.DD5.1.H264-FGT].mkv
Manhattan Night (2016) - [1080p.WEB-DL.DD5.1.H264-FGT].pt.srt

Another odd thing is that my TV shows never have this issue, even using similar kind of names.

You’re just lucky. The forum is full of reports where it doesn’t work with ‘scene’ file names.