Subtitles not displaying

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Subtitles not displaying

Post by MTOakey »

Greetings all,
It has been sometime since I last posted anywhere in the Forum, and I would like to have this issue rectified once and for all.
After reading numerous posts and all the complaints about the inability to get "Subtitles" to show ANYWHERE, or on any specific device, I have tested 20 different T.V.s and numerous differentials of settings to come to my conclusions.
And I will quote, sporadically, here, while interjecting my thoughts and experiences in BOLD:

"Re: Subtitles not displaying
Post by user @Fairway » Fri Dec 20, 2024 8:34 am {on page 2 of this thread}
{Yep. I have the exact same issue: while watching on my TV, most tv series using UMS on windows 11, the .srt files work fine. On some tv series they just don't show.
Though I neither have a problem with those exact same .srt files when playing those problematic tv series .srt files on my computer's media player, nor when playing them on the same TV but then from my NAS media server.
So, there's some mystery to this... the .srt files are working, but just not with UMS.} Nope, not for me, The existing .srt files never worked with any settings nor location of said files. Turns out the .srt were indeed UNIX files as described.

{Troubleshooting this, I suspect I found the cause:
It has to do with the .srt file format.
UMS seems to NOT being able to process the .srt file when it has the unix file format. The .srt files are only processed well, when they have the DOS/Windows format.
When you convert the .srt from the unix format to the DOS/Window format, i.e. from \LF to \LF\CR line endings, then the subtitles work fine.} but for me, ONLY on a computer using VLC, Media Player, or Movies & TV Apps - still NOT on my TV, a new TCL-Google 4k.

{Since UMS does not seem to support the unix file format .srt files on windows, at least not at the moment of writing this, you would need to convert the .srt files from unix to dos format.
Manual conversion of the .srt files in batch recursively for your video library can be a bit of a head scratch, since there is not an obvious, simple solution available, unfortunately.}

{The best solution would be for UMS to support unix style .srt file formats.} - BUT THIS alone does not and will not fix the problem of UMS NOT showing Subtitles over the network to a T.V.
{And that probably will take some time to hit release and will not help you today.}

{Notepad does open the unix format .srt files and correctly shows them (yes, this is possible since about about 2018). You can see the format of the file in notepad's bottom bar.
But... notepad cannot help you save the file in dos format, unfortunately.
Notepad++, however, can. But then you need to do it file by file, not in batch (AFAIK).}

{On internet you can find some haphazard cmd and/or powerscript solutions. I did not try them all. Most of them have some drawbacks deleting and/or replacing some characters in the conversion. Check e.g. https://stackoverflow.com/questions/175 ... ne-endings.
There is an open source tool called UNIX2DOS, found here: https://sourceforge.net/projects/unix2dos/.
If you decide you want to convert all your .srt files to dos format in your video library folder tree, you'll still require a cmd file script to carry out unix2dos on the tree, though."}


So, as I have noted here, you will have to START with a DOS/Windows formatted .srt file.
- To convert a Unix formatted file to a DOS formatted file in Notepad++,
- open the .srt file,
- click on "Edit", select> "EOL Conversion", and then select "Windows (CRLF)" from the options; - this will change the line endings from just "LF" (Unix) to "CRLF" (DOS).
- "Save" the file.
And even after doing this, to every .srt file for every movie I have on my server - still no subtitles showing on my TV directly, nor through my ROKU... Subtitles are able to show on my computer now at least.
Whatever the "universal" fix is for this issue is, it remains to boggle everyone here who has posted/commented on this issue - including the developers, apparently.
But I DO know this, each and every App on my windows machine that allows me to see the correctly formatted .srt Subtitles, ALSO has a control button in the interface to "search & select" any .srt file I can find...
WHY does UMS NOT have such a control and service ???

.
Last edited by MTOakey on Sat Feb 15, 2025 10:13 am, edited 1 time in total.
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
mik_s
Moderator
Posts: 1430
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

This was a bug in UMS where it was ignoring some tag character in the metadata for subtitles on newer Samsung TVs when there are external subtitles but he video is being streamed. This meant the TV was not being sent the right location of the sub file so could not find it.

Apparently the it was working was 14.6.0 but has been fixed since 14.9.0 I think, I don't know when that fix was merged but was fairly recent.

14.6.0 is around the time they switched to a different UPnP library as the old one was no longer maintained and full of patches and hacks to make some devices work properly.
The change worked quite well but this one was overlooked due to the specific requirements for Samsung TVs.

The text encoding format has no effect and UMS is able to use it. I tried various combinations and they work just fine on my old series F Samsung TV.
I don't know what @Fairway's problem was or if this fixed it for them as they never followed up.
When UMS is streaming it does not read the srt file anyway, it just offers it as a resource for the TV to use.
Even when transcoding it is the transcoding engine (like FFmpeg) that reads the sub file not UMS.
This was just one of the possibilities I was trying to figure out when troubleshooting before raising it as an issue for the Devs. This is the issue I made.

If you are having problems with subs could you post your logs (see the section in red above) and I might be able to see why.
Unless all the TVs you tested on were recent Samsung TVs with those specific versions of UMS then it is probably something wrong with your configuration.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Re: Subtitles not displaying

Post by MTOakey »

Only 2 Samsung TV's in the test bunch, and my current TCL 4k is only 3 months old.
Subtitles have NOT worked for me on any TV being streamed since after v12.1
The text encoding most certainly matter, since NONE of the files encoded as UNIX would work for any App on my windows computer.
Subtitles also do NOT work when just using UMS in a local browser !!! NO control to activate, access, turn ON or OFF.
On TVs, there is NO selection of Subtitles available - they either show or NOT.
That link to github helps not at all.
I get nothing at all, as in Subtitles showing, when trying a movie with UNIX coded .srt files.
I only get Subtitles showing on windows Apps when using DOS coded files, and still NOT in a browser directly from UMS.
Attachments
ums_dbg_2025-02-14-17-50.zip
(1.33 MiB) Downloaded 239 times
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
mik_s
Moderator
Posts: 1430
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

I can see that UMS is detecting and identifying the subs for this video

Code: Select all

net.pms.configuration.ConfigurationReader Reading subtitles_languages: "eng,on;*,eng;*,und" (default: "eng,fre,jpn,ger,und")
net.pms.util.SubtitleUtils Looking for subtitles with the highest priority from eng, on;*, eng;*, und
net.pms.util.SubtitleUtils Returning subtitles with priority External, lang: en, type: SUBRIP, externalFile: D:\Videos\6 Underground - (2019)\Subs\6 Underground (2019).srt, external file character set: ISO-8859-1: {}
net.pms.store.StoreItem Forcing external subtitles track for "6 Underground (2019).mp4": External, lang: en, type: SUBRIP, externalFile: D:\Videos\6 Underground - (2019)\Subs\6 Underground (2019).srt, external file character set: ISO-8859-1
But they are not supported due to the transcoding format

Code: Select all

net.pms.dlna.DidlHelper Subtitles "6 Underground (2019).srt" aren't supported while transcoding to Roku 4 (NSP 6-7)
The reason will be because for a good playback experience on the Roku it uses HLS to break the video into small blocks that can be requested by the renderer to allow seeking and I think this method does not support external subtitles. I am not sure on this as I know next to nothing about the details of how HLS works though so I could be wrong.
If the video has internal subtitles then it should be selectable on the device itself.

The web player uses the same method and I think one of the devs mentioned this to me before.
I would test this myself to confirm but due to recently losing my computer and all my files I don't have anything to test on.

One thing you can try is to edit Roku-4640x.conf to change

Code: Select all

TranscodeVideo = HLS-MPEGTS-H264-AAC, MPEGTS-H264-AAC
to

Code: Select all

TranscodeVideo =  MPEGTS-H264-AAC
to only use the old transcoding method which definitely does support external subtitles burned into the video, however you will lose the ability to seek the video due to a firmware change in Roku devices from what I remember.

You may also want to play from the #--Transcode--# folder and try no transcoding because no other supported formats was set up for that device as transcoding to HLS was better for most of them.
For those that will play by streaming you may also need to add (copied from random conf)

Code: Select all

SupportedInternalSubtitlesFormats = ASS,MICRODVD,SUBRIP,TEXT
SupportedExternalSubtitlesFormats = ASS,MICRODVD,SUBRIP,TEXT
for subs to be sent.

For your TVs it could be a similar issue but I only see the Roku in the logs.
Modern TVs will have a lot of support for newer formats so less likely to need to be transcoded and should work well with external subs.
If you make logs playing directly on them then I'll be able to see if UMS is offering them.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Re: Subtitles not displaying

Post by MTOakey »

Tried editing both locations of that Roku xxx.conf file, no change, still no Subtitles. Not on my TCL directly, and not through the Roku media player App.
Do these "external" subtitles need to be in a sub directory, or can they sit in same directory as movie ??
Noticed also that the FFmpeg decoder is using the very same HLS for it's own Web Player...

Also have noticed that since v14, when playing videos on my TV or in the web player, every so often {quite a lot actually} noticeable audio glitch happens every time this happens: {14:31:36 INFO Compressing [C:\ProgramData\UMS\debug.log] take PT8.4349205S} and this happens about every minute. Very annoying.

BTW: what the hell is this in the Logs: { Unhandled exception while resolving New Whistleblowers Golf course: For input string: "CC1" }
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
mik_s
Moderator
Posts: 1430
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

External subs are usually in the same folder but I know some players can be configured to look in a different location, but unlikely for TVs.

I had a look into how HLS uses subs. The only format it uses is WebVTT so will be unable to use SRTs.
I there are ways of converting SRT into WebVTT as they are very similar and I think FFmpeg does this for internal subtitles but not sure if it can use external subs aswell.
It might be this was never set up to work this way in UMS if it is possible.
This is what I found when looking into this but does not look easy.
https://www.vidbeo.com/blog/hls-subtitl ... ns-webvtt/
https://stackoverflow.com/questions/617 ... -as-webvtt
https://stackoverflow.com/questions/676 ... ing-ffmpeg
https://developer.apple.com/streaming/

Yes the web player will be doing the same thing so you should be able to enable subtitles there.
Have you tried playing videos with internal subtitles and enabling them on your TV, Roku, or the web player?
Screenshot 2025-02-16 011649.png
Screenshot 2025-02-16 011649.png (76.45 KiB) Viewed 6097 times
In theory the sub button on the remote should turn them on but for Samsung TVs you have to open the menu to enable them as the sub button is only for broadcasts as I discovered earlier in this thread.

Do you have a Roku device or is Roku the app on your TV? In the logs it is identifying itself as "Roku/4400X"
If it is an app does your TV have a native media player? If so it will need a conf making as there are non yet for the TCL.

I don't see how log compressing should not have any effect on audio. If there was any impact it would also effect the video too but this will take next to no resources away from transcoding to cause a glitch. Normally when UMS is not in TRACE mode there is very little written to the logs so they don't get large enough to be split and compressed, and once you create trace logs it goes back to what it was previously.
Does this glitch only happen on one device with every video, or is happening on every device with just that one video?

I was actually going to ask about that golf video as I have seen this message for CC1 a few times before. I think it has something to do with old TV broadcast subtitles.
I made a issue about this on Github but the Devs did not have a video to test on to find the problem. Could you upload that somewhere so they can use it to find out why this exception is happening?
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Re: Subtitles not displaying

Post by MTOakey »

I believe all the videos I have are absent internal subs, most are DVDrip's, some are Netflix converts, I really have no way to know for sure, but I do have .srt's for all ...
pretty stupid that the most common subtitle file {.srt} is not able to be used from the start by UMS... just sayin'.

I did the update to 14.10.1 and NOW NONE of the movies will play through Roku Media player, or starts playing for about 3 seconds or so, buffers for a few minutes producing an error : "NO Valid bitrates"

My "webplayer does NOT show all the controls your pic shows above ... notice NO control for Subtitles ...
2025-02-17 09 36 36.jpg
2025-02-17 09 36 36.jpg (16.52 KiB) Viewed 5538 times

And that "Compressing debug.log ..." is still happening - now every 45 seconds.

I have rebooted my computer, the Roku, the TV, my Router ... no change - and No movies.


On another note ... I have asked - for years - for the "column separator" for Titles {media} to be extended to at least 500 {it is set/calculated at 300 currently} because the scroll left and right in that column is a nuisance to grab for my old eyes and fingers. I would prefer NO scroll bar at all, and extra space at the bottom so titles don't get cut off. Each time I access this directory to search for a title to play, I have to go into "Inspect" in Chrome and change settings for the page to make that column wider TO SHOW ALL THE TITLES THAT ARE LONGER THAN WHAT IS ALLOWED TO SHOW. It would be nice if at least THAT vertical line separating the areas on the page was made to be "grabbed" and moved with the mouse pointer, but I would prefer it to be hard set at that 500 for me, MAYBE a setting could be added in the Config file to "hard" setoption for width, once, by the individual user.
2025-02-17 09 36 36.jpg
2025-02-17 09 36 36.jpg (16.52 KiB) Viewed 5538 times
2025-02-17 09 36 36.jpg
2025-02-17 09 36 36.jpg (16.52 KiB) Viewed 5538 times
Image


Also just noticed that NOW, in v14.10.1, after I change those settings I mentioned above - they NO LONGER PERSIST after I close the "Inspect" window ... the column returns to being too short to show entire media titles.
Forum would not allow a fourth pic to show edits ... and those pics showing at the bottom are in the wrong order in "Preview" anyways.
...
Attachments
2025-02-17 10 10 51.jpg
2025-02-17 10 10 51.jpg (98.91 KiB) Viewed 5495 times
2025-02-17 10 13 32.jpg
2025-02-17 10 13 32.jpg (47.02 KiB) Viewed 5495 times
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Re: Subtitles not displaying

Post by MTOakey »

AND, above, the small pic of the Controls area of the web player is showing 3 times, and I only have it to show once up top in the post.
Here is the third pic of the code ... And I now notice that the pics are being cut off the left and right, not showing everything I am uploading ...
2025-02-17 10 12 30.jpg
2025-02-17 10 12 30.jpg (94.93 KiB) Viewed 5482 times
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
MTOakey
Posts: 74
Joined: Thu May 26, 2022 9:36 am
Location: Homestead, FL
Contact:

Re: Subtitles not displaying

Post by MTOakey »

Try this ...
Attachments
2025-02-17 11 32 01.jpg
2025-02-17 11 32 01.jpg (97.58 KiB) Viewed 5485 times
2025-02-17 11 37 15.jpg
2025-02-17 11 37 15.jpg (371.28 KiB) Viewed 5485 times
2025-02-17 11 40 08.jpg
2025-02-17 11 40 08.jpg (370.51 KiB) Viewed 5485 times
“A truth’s initial commotion
is directly proportional to how deeply the lie of it was believed ...” ~Dresden James
“The surest barrier to truth is the conviction you already have it.”
User avatar
mik_s
Moderator
Posts: 1430
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

I split the topic as this seems like a separate issue.

That video you tried must not have had internal subs or multiple audio tracks so would not show those options.
Try the test5.mkv video from here and this should work.
Use download raw to get it.
Screenshot 2025-02-17 192325.png
Screenshot 2025-02-17 192325.png (3.13 KiB) Viewed 5298 times
I just tested it and all the controls and subs appear for me.
Screenshot 2025-02-17 192031.png
Screenshot 2025-02-17 192031.png (93.83 KiB) Viewed 5298 times
This will at least confirm subtitles will work if internal.

I just opened a question about external subtitles with HLS on Github here so hopefully we'll get a definite answer if this is possible or can be added.

Subjunk has added your suggestions to the list of tasks for V15. you can keep an eye on progress here.


For your TV I can help you set up a conf for it that should allow external subtitles to work properly but will need to see logs of you attempting to play videos on it with the native media player. I'll need to see what the user agent it uses is and the exact model number so I can look up some specs of what it is supported.


Are you able to upload that video with "CC1" message? It will help the devs fix it.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply