Subtitle .srt not working

Hello,

 

I'm trying to view my videos with subtitles but none of them is working, it work on my TV, on VLC etc ... but not on RasPlex, is the .srt format supported ? Is there anything to configure before try to make it work ?

 

PS : For information I'm used to name .srt files with the same name as my video files.

 

Thank you.

Hello,
 
I'm trying to view my videos with subtitles but none of them is working, it work on my TV, on VLC etc ... but not on RasPlex, is the .srt format supported ? Is there anything to configure before try to make it work ?
 
PS : For information I'm used to name .srt files with the same name as my video files.
 
Thank you.


.srt subtitles working fine for me, which version of Rasplex are you running, .srt has worked fine on all 0.4.0 release candidates. Are you transcoding or playing direct?

Regards

Hello,

I have the last release, I tried with direct play and transcoding but none is working, I really don't understand why. I have no problem with my other supports.

Hello,

I have the last release, I tried with direct play and transcoding but none is working, I really don't understand why. I have no problem with my other supports.

I don't quite understand your last sentence. What other supports ?

That aside, I must chime in with the others in saying that ".srt" subtitles work fine for me.

Perhaps you should give explicit examples of the folder structure and filenames used for the movies that fail to show subtitles.

Here is an example from my own library:

\\RASRV2\RAs2_F\Media (RAs2_F)\Movies\Ivanhoe (1982)\folder.jpg

\\RASRV2\RAs2_F\Media (RAs2_F)\Movies\Ivanhoe (1982)\Ivanhoe (1982).avi

\\RASRV2\RAs2_F\Media (RAs2_F)\Movies\Ivanhoe (1982)\Ivanhoe (1982).en.srt

\\RASRV2\RAs2_F\Media (RAs2_F)\Movies\Ivanhoe (1982)\Ivanhoe (1982).sv.srt

NB: The pathnames may look odd to you, as this is how my PMS computer sees the file shares from the server holding this movie.

Here the folder "Movies" from that drive "F:" of that server is one of the many source folders for my Plex section named "Movies", and in its subfolder named "Ivanhoe (1982)" I have that movie stored together with a poster file and two subtitle files, one English and one Swedish. Both of those subtitles work fine with Plex, using any of the Plex clients, including RasPlex.

It may also be useful to know exactly how you've tried to activate the subtitles for those movies.

RasPlex is based on PHT, which is originally a keyboard-based program, so it has keyboard shortcuts for lots of things.

'S' is the shortcut key to toggle subtitles on/off. 'L' is the shortcut key to switch language when you have multiple subtitles for a movie.

Such language switching also includes one switch step that disables subtitles.
 

In addition to using those shortcut keys during playback you can also select subtitles (if recognized by PMS) in the pre-play screen before starting playback, or in the OSD menu when pausing playback.

When having problems making things work in RasPlex it's often useful to verify if these things work correctly in some other Plex client, with the most widely available one being the Plex/Web client (aka: Media Manager of PMS) which runs in a normal Web browser. If your subtitles are not accessible through this media manager, then they will not be accessible to any other Plex client, as they are not recognized by the PMS server.

Sometimes adding correctly named subtitle files into a movie folder is not sufficient to make them recognized, and you may then have to open the pre-play screen for that movie in the Plex/Web media manager and give a command to reanalyze the movie. But often it's sufficient just to navigate into the pre-play screen for that movie, in order to make PMS aware of its subtitles.

Best regards: dlanor

Thank you very much for your answer. Sorry for my sentence (I'm not fluent in english :p).

I'm used to name my .srt file with the same name of my movies like :

movie.mp4

movie.srt

When I saw your .srt files, I wonder if I must rename my .srt files :

movie.en.srt

My issue with subtitle files is that I can't even open them, when I try to open them there is no list in available subtitles.

Regards.

Thank you very much for your answer. Sorry for my sentence (I'm not fluent in english :p).
 
I'm used to name my .srt file with the same name of my movies like :
 
movie.mp4
movie.srt
 
When I saw your .srt files, I wonder if I must rename my .srt files :
 
movie.en.srt
 
My issue with subtitle files is that I can't even open them, when I try to open them there is no list in available subtitles.
 
Regards.


Your naming is correct, dlanor has English and Swedish subtitle files and can switch between them as he outlined in his post. Can't understand why yours are not working. Your naming is the same as mine.

Regards

Thank you very much for your answer. Sorry for my sentence (I'm not fluent in english :P).
 
I'm used to name my .srt file with the same name of my movies like :
 
movie.mp4
movie.srt
 
When I saw your .srt files, I wonder if I must rename my .srt files :
 
movie.en.srt


Both variations of the subtitle filenames should work.

The only difference is that my naming allows the Plex clients to show the language strings in the menus where subtitles can be chosen. If you leave out the ".en" part then the entry will be shown as "Unknown" instead of "English". (When it works properly that is.)
 

My issue with subtitle files is that I can't even open them, when I try to open them there is no list in available subtitles.


Yes, I see. But have you tried this in the Plex/Web media manager too, and not just in RasPlex ?

It might also be useful to see one of those subtitle files that fails for you.
Perhaps you can attach one of them to your next post.

Best regards: dlanor

I try on the Web media manager, it doesn't work too. But I found out something, I played a movie which is on my computer and the subtitles works, but from my harddrive (which is connect to the same computer), it doesn't ...

I'm also having problems getting sidecar .srt files to work. 

I'm running PMS on my Synology NAS (DS413 running DSM 4.3).

I checked the rasplex debug logs, and found out that it effectively asks for the subtitles ("considering caching the subtitles to a local file" or something similar). So I checked, and there was indeed a .srt file alongside the debug log, but it was empty!

The logs also showed the url used to download. I tried it on my PC, and indeed, I get an empty file. However, I noticed the url contains an 'encoding=utf-8' query param. If I remove it, it works!

So I check the PMS log files, and I found out that the server tries to convert the files from Windows-1252 codepage to UTF-8, but fails!

So why does PMS think they are windows-1252 (perhaps they are, I never really understood how codepages were determined in txt files), and why can't it convert? Is it missing some tool (like iconv)? Is it a locale setting in the NAS OS?

And why is Rasplex insisting on having the files encoded ad UTF-8? Can you change that in the settings somewhere?

I know that there is a Plex Agent SRT2UTF-8 (https://github.com/ukdtom/SRT2UTF-8.bundle) that can convert them, but I haven't tried it yet (will do sometime this week, and post my findings), but I'd like to understand more why this would be needed in the first place...

One strong reason for using UTF-8 encoded SRT files is that this format can cope with regional character sets, including but not limited to Swedish, French, German, and other regional character set variations. This includes some not even based on the standard ‘Roman’ alphabet like all those I mentioned are. But Greek, Russian and others can also be catered for by UTF-8.

As for how the software can recognize UTF-8, that is quite simple. The first bytes of a UTF-8 encoded file are always bytes not valid for use in traditional Ascii/Ansi text files. These bytes identify which type of encoding the file uses.

Translation between differently encoded text files usually doesn’t require any dedicated programs, as most modern text editors can do it.
I use UltraEdit myself, but there are lots of others that can do it too, including freewares like Notepad++.
I’m not sure, but in modern OS versions it wouldn’t surprise me if even standard Notepad can do it too.

But dedicated subtitle editors often offer additional useful features, such as timing adjustment tools. So they are still worthwhile.

Best regards: dlanor

As for how the software can recognize UTF-8, that is quite simple. The first bytes of a UTF-8 encoded file are always bytes not valid for use in traditional Ascii/Ansi text files. These bytes identify which type of encoding the file uses.

Sadly, I disagree here  :rolleyes:

Your statement is only true, if the file contains a BOM

http://www.unicode.org/versions/Unicode5.0.0/ch02.pdf

With a regular srt file, one has to digest the contest of the file, and from that, simply guess.

AFAIK, nobody.....Not even the big companies like Google etc. has yet found a way to detect 100% of all cases, since it depends on the contents....

To see how I do it, take a peak @ the source-code for SRT2UTF-8 found here:

https://github.com/ukdtom/SRT2UTF-8.bundle/blob/master/Contents/Code/__init__.py

/Tommy

Sadly, I disagree here  :rolleyes:


You are free to do so, but I'm also free to disagree with your disagreement... ;)
 

Your statement is only true, if the file contains a BOM


Which I think should always be the case for a correctly UTF-8 encoded SRT file.
 
While the official UTF standard does allow the 8-bit UTF characters to be used without a BOM, their use this way for SRT files is pointless. It's necessary for every player to identify the encoding type, and reliable identification requires the BOM. That's what eliminates the guesswork you mention. And because of this an SRT file using UTF-8 without BOM should be considered incomplete, regardless of the variations allowed for generic UTF documents (in the "presence of higher-level protocols" which define the encoding, according to that PDF document).

Personally I've never had the misfortune to meet any UTF-8 file without BOM, but if I ever do and need to use it, then I will of course add a BOM to it before that use.


As for your SRT2UTF-8 code, it is of course interesting (I saved the link for future reference), but personally I prefer to ensure that my subtitle files work standalone, without any on-the-fly conversion needed.

To be honest I couldn't really understand your program code at first glance, since the code that is used to identify the SRT encoding is hidden inside the "BeautifulSoup" definition, which is not present in that listing. Perhaps that's familar stuff to you and other bundle authors, but to me it's just another cryptic reference.

Best regards: dlanor

I can confirm that SRT2UTF-8 solves my problem!

Which I think should always be the case for a correctly UTF-8 encoded SRT file.

And that's the whole issue, here: srt files you download from subtitle sites are not always (I guess about half the time) UTF-8 encoded. In my case (dutch) their mostly recognized as windows-1252.

Which PMS apparently has problems with converting to UTF-8, while that can actually be solved in 2 lines of Python code.

Maybe the default subtitle agent in Plex could be updated to store the srt's straight to UTF-8?

You are free to do so, but I'm also free to disagree with your disagreement... ;)
 

Which I think should always be the case for a correctly UTF-8 encoded SRT file.
 
While the official UTF standard does allow the 8-bit UTF characters to be used without a BOM, their use this way for SRT files is pointless. It's necessary for every player to identify the encoding type, and reliable identification requires the BOM. That's what eliminates the guesswork you mention. And because of this an SRT file using UTF-8 without BOM should be considered incomplete, regardless of the variations allowed for generic UTF documents (in the "presence of higher-level protocols" which define the encoding, according to that PDF document).

Personally I've never had the misfortune to meet any UTF-8 file without BOM, but if I ever do and need to use it, then I will of course add a BOM to it before that use.


As for your SRT2UTF-8 code, it is of course interesting (I saved the link for future reference), but personally I prefer to ensure that my subtitle files work standalone, without any on-the-fly conversion needed.

To be honest I couldn't really understand your program code at first glance, since the code that is used to identify the SRT encoding is hidden inside the "BeautifulSoup" definition, which is not present in that listing. Perhaps that's familar stuff to you and other bundle authors, but to me it's just another cryptic reference.

Best regards: dlanor

I take it, that you didn't read the pdf from unicode.org  :wacko:

Page 36 says:

. Use of a BOM is neither required nor recommended for UTF-8, 

And I've seen several without it, and they ARE VALID

Besides that, unlord is also correct in saying, that lots of srt files for non-english languages are not even in utf-8, thus why I wrote my plug-in

Regarding Beautiful Soap, then it's not part of my plug-in, but comes with PMS itself.

Best Regards

Tommy

I take it, that you didn't read the pdf from unicode.org  :wacko:
 
Page 36 says:

. Use of a BOM is neither required nor recommended for UTF-8, 

Of course I read it (I even remarked on it).
I just don't agree that it's a good part of the standard.
I'm a firm believer in standards being consistent, which this one is not.
 

And I've seen several without it, and they ARE VALID

Yes. Thanks to the standard being inconsistent they are considered valid.
But for much software to recognize them as valid it's still necessary to add a BOM.
 

Besides that, unlord is also correct in saying, that lots of srt files for non-english languages are not even in utf-8, thus why I wrote my plug-in

Yes, I agree that your plugin can be useful for such cases. I never argued against it in any way.
It's just that I prefer to convert the files permanently to a reliable format for use in my own players (Plex and non-Plex).
 

Regarding Beautiful Soap, then it's not part of my plug-in, but comes with PMS itself.

Yes, I guessed as much. I commented on that only to explain why I couldn't fully understand your code, since the part responsible for identifying the encoding is not present in your listing, except as an import reference. But it wasn't intended as criticism in any way.

Best regards: dlanor

Hi!

Similar problem here.

I have sidecar subtitles in srt format.

I am able to read the video with subs through Android App ou the plex web app.

From rasplex, i can see an select the different languages for subs in the "summary screen" of the video.

When i start the video play, The subs are not displayed. When i acivate the OSD "menu", i can see the sub language previously selected shown. 

But, if i go in the "audio" submenu, the tickbox for subtites is not checked and there is no languages available in the list of available subtitles.

I can tick the box to activate subtitles, but no effect.

There is nothing obvious in PMS debug logs.

This happen only for some files. (maybe 30%), and it has started to happen quite recently, so it might be related with an update of PMS.

Do you have some pointers to find out what is wrong ?

Hi!

Similar problem here.

I have sidecar subtitles in srt format.

I am able to read the video with subs through Android App ou the plex web app.

From rasplex, i can see an select the different languages for subs in the "summary screen" of the video.

When i start the video play, The subs are not displayed. When i acivate the OSD "menu", i can see the sub language previously selected shown. 

But, if i go in the "audio" submenu, the tickbox for subtites is not checked and there is no languages available in the list of available subtitles.

I can tick the box to activate subtitles, but no effect.

There is nothing obvious in PMS debug logs.

This happen only for some files. (maybe 30%), and it has started to happen quite recently, so it might be related with an update of PMS.

Do you have some pointers to find out what is wrong ?

Hello! The same problem is happening to me, half of my subtitles won't work on Rasplex but work well with PHT. I also guess this is related to a PMS update .. Have you found any workaround for this issue?

I tried SRT2UTF-8 agent with no luck, the issue is still happening. I have ordered a 8go class 10 SD card to see if it might impact my system (currently running from an USB key and I also have some posters that are not showing). My server is on OSx Yosemite, runnig the latest versions of PMS and Rasplex …

Hello! The same problem is happening to me, half of my subtitles won't work on Rasplex but work well with PHT. I also guess this is related to a PMS update .. Have you found any workaround for this issue?

Could be they are invalid, like with an extra CR/LF somewhere

Try and load it into Subtile Edit and save it afterwards back again, overwriting the existing one

/T

I have done a clean install on a class 10 8gb SD card which solved all my issues! So thanks guys for you help :)