External Subtitles not displaying (Samsung TV)

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
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

External Subtitles not displaying (Samsung TV)

Post by binary512 »

Using UMS 14.70 and subtitles sometimes do not work. Attached is the debug log from a video.
Thank you.
Kurt
Attachments
ums_dbg_2024-12-15-08-13.zip
External subtitle not displayed
(313.79 KiB) Downloaded 534 times
User avatar
mik_s
Moderator
Posts: 1446
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

I can see that all your videos are being streamed so it up to the TV to display them.

The external subtitles are being offered to the TV too so it should be able to use them.

Code: Select all

============================= MEDIA HTTP SERVER RESPONSE BEGIN ===============================
HTTP/1.1 206 (non-chunked)

HEADER:
  Server: Windows_11-amd64-10.0, UPnP/1.0 DLNADOC/1.50, UMS/14.7.0
  Date: Sun, 15 Dec 2024 13:11:30 GMT
  CaptionInfo.sec: http://192.168.112.50:5001/ums/subtitles/5ef96039-f773-4686-8322-dd66a1004a7e/791/A+Christmas+Story+%281983%29.eng.srt
  Content-Type: video/mp4
  Content-Range: bytes 0-683014946/683014947
  ContentFeatures.DLNA.ORG: DLNA.ORG_PN=AVC_MP4_HP_HD;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000
  MediaInfo.sec: SEC_Duration=5603253
  Accept-Ranges: bytes
  Connection: keep-alive
  Content-Length: 683014947
============================= MEDIA HTTP SERVER RESPONSE END =================================
I thought the address encoding could be wrong as did not know what "%281983%29" is but this correctly decodes to "(1983)" as it appears in the filename.

Can you enable and select the subtitles on your TV?
It could be that other videos have a forced tag on some subtitles that automatically enables them on the TV.
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.
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

Re: Subtitles not displaying

Post by binary512 »

I have enabled Subtitles on the TV, but it only has effect on live TV stations over-the-air, not streaming.
Any other ideas? In the past, it has always been a UMS setting that needs tweaking.
MOST other videos show the subtitles fine. Something must be different about this video.
Thanks.
Kurt
User avatar
mik_s
Moderator
Posts: 1446
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

Its only a UMS setting if it has to transcode otherwise it does not touch the video or subtitles, it just serves it to the renderer.

The subtitles should work on the TV, there should be somewhere you can select the subtitle stream.
My old series F Samsung TV has a AD/SUBT. button on the remote that should bring this up but testing it now it just gives a message "not available" so it may be only be for normal TV. I have no idea if this has changed on newer models.

There is subtitle settings where you can select the language and turn them on and off when the video is playing.
This is what shows on mine and works with external subtitles too.
20241216_010333.jpg
20241216_010333.jpg (2.64 MiB) Viewed 11396 times
20241216_010440.jpg
20241216_010440.jpg (2.03 MiB) Viewed 11396 times
Another thing you can do to see if UMS detects the external subs is to use the option "Add subtitle information to video names:"
If set to "Basic" and it will add {English subtitles} for example to the filename. If you set this to "Full" it will show something like {Stream Ext. Sub:Subrip:English}

It also could be something wrong with that sub file. Try opening it in a text editor to check, it might only have subs for certain scenes not the whole video.
You could try and replace it with a different one.
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.
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

Re: Subtitles not displaying

Post by binary512 »

Re: The subtitles should work on the TV, there should be somewhere you can select the subtitle stream.
My old series F Samsung TV has a AD/SUBT. button on the remote that should bring this up but testing it now it just gives a message "not available" so it may be only be for normal TV. I have no idea if this has changed on newer models.

Ans: The remote has an AD button, but as you stated, it only works for "normal" over-the-air TV broadcasts. Even though this is turned on, it has no effect on streaming media.

Re: There is subtitle settings where you can select the language and turn them on and off when the video is playing.

Ans: I have never seen a selection for subtitles while playing videos in the years I have been using UMS. It just displays the subtitles as I have configured in UMS.

Re: Another thing you can do to see if UMS detects the external subs is to use the option "Add subtitle information to video names:"
If set to "Basic" and it will add {English subtitles} for example to the filename. If you set this to "Full" it will show something like {Stream Ext. Sub:Subrip:English}

Ans: I have this as the default. For this particular file that does not show the subtitles, it DOES show that there is an "External Subtitle" associated with this video. So it is recognizing it; just not showing it. And the log file uploaded earlier bears this out.

Re: It also could be something wrong with that sub file. Try opening it in a text editor to check, it might only have subs for certain scenes not the whole video.
You could try and replace it with a different one.

Ans: I am currently looking into this. In the past I have had issues with the times in the SRT file being negative or the incorrect format (UTF-8, ANSI, etc.) After further testing, I have found other files that no longer display subtitles, but used to with previous versions. It appears something is broken again with the new releases and I will have to revert back to my previous working version. I'll post here again when I have more information to share.

Thank you for all your help.
Kurt
User avatar
mik_s
Moderator
Posts: 1446
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

Does it display the controls like my first picture when you press the enter/select button (the one in the middle of the arrow buttons) on the remote?
Can you change subs when playing a MKV file with multiple internal subs?
If not could you take some pictures of what the controls looks like and when selecting the gear option and the subtitle setting menu?

No setting in UMS should have any effect on the subtitles as the video is streamed.
If there are any errors it will happen on the TV so would not show in the logs unless the TV sent a error message, but I could not see anything like this.

If in the past UMS settings did change the subs for you then it means that it must have been transcoding and burning in the subtitles.
This would also mean that you had no option to change the subtitles or audio track on the TV as when transcoding it only has the video and one audio track.
There have been improvements to the Samsung confs to prevent this on modern TVs if there was not an exact match to that model TV instead of falling back to an old conf with limited support defined.

I did compare your configuration to mine from a clean(ish) install and the only things that stand out as different is

Code: Select all

audio_subtitles_languages = eng,on;*,eng;*,und
subtitles_languages = eng,jpn,ger,und
These look fine but maybe there is something not quite right. When these are not set in the conf the default settings are used depending on your system language.
To eliminate this as a cause try editing your UMS.conf in C:\ProgramData\UMS to delete these 2 lines (or comment them out with # at the start).
You will have to quit UMS first or your changes will be immediately overwritten.
It is better to do it this way for these as deleting the values in the settings is a valid option (I don't know why) and does not reset these to default.
This caused me a lot of problems when I was testing the V14 beta last year and none of the subtitles worked for me.

Another possibility is some mismatch in the database so the url of the sub file is incorrect.
You could try renaming or deleting the database folder so a fresh one will be built. It is located in C:\ProgramData\UMS\database
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.
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

Re: Subtitles not displaying

Post by binary512 »

Re: Does it display the controls like my first picture when you press the enter/select button (the one in the middle of the arrow buttons) on the remote?
Can you change subs when playing a MKV file with multiple internal subs?
If not could you take some pictures of what the controls looks like and when selecting the gear option and the subtitle setting menu?

Ans: When hitting the enter/select button, it displays the settings/options menu below.
Options
Options
pic 1.jpeg (193.56 KiB) Viewed 11363 times
However, there is no option for EXTERNAL subtitles...only Rotate and Information.
No subtitle option
No subtitle option
pic 2.jpeg (137.4 KiB) Viewed 11363 times
There IS an option for subtitles when the file has INTERNAL subtitles.
Subtitles option available for INTERNAL subs
Subtitles option available for INTERNAL subs
pic 4.jpeg (129.03 KiB) Viewed 11363 times
About 95% of my videos have external subtitles. So I need to get it to work with external subs.


Re: I did compare your configuration to mine from a clean(ish) install and the only things that stand out as different is
audio_subtitles_languages = eng,on;*,eng;*,und
subtitles_languages = eng,jpn,ger,und
These look fine but maybe there is something not quite right. When these are not set in the conf the default settings are used depending on your system language.
To eliminate this as a cause try editing your UMS.conf in C:\ProgramData\UMS to delete these 2 lines (or comment them out with # at the start).
You will have to quit UMS first or your changes will be immediately overwritten.
It is better to do it this way for these as deleting the values in the settings is a valid option (I don't know why) and does not reset these to default.
This caused me a lot of problems when I was testing the V14 beta last year and none of the subtitles worked for me.

Ans: I removed the configuration for these two lines so they are blank. There was no effect whether subtitles displayed or not.

Re: Another possibility is some mismatch in the database so the url of the sub file is incorrect.
You could try renaming or deleting the database folder so a fresh one will be built. It is located in C:\ProgramData\UMS\database

Ans: This was a "clean" installation on this version with a virgin database.

In a nutshell, it appears that there is a difference in the way Samsung handles EXTERNAL subtitles versus INTERNAL. Maybe that can help us troubleshoot further.

Thank you.
Kurt
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

Re: Subtitles not displaying

Post by binary512 »

As a follow-up to the previous post...
I created a copy of the video file that does not work with an external subtitle (video plays but subtitles do not show up). The video file with the internal subtitles works fine.

It seems like there must be something in the renderer file that is allowing subtitles to work with INTERNAL subtitles in files, but not working all the time with EXTERNAL subtitle files.
Will this help with the troubleshooting to find a solution for External subtitles?
Thank you.
Kurt
binary512
Posts: 36
Joined: Sat Sep 30, 2017 2:10 am

Re: Subtitles not displaying

Post by binary512 »

Update: I have been reading many posts over the last five years about Samsung TVs not displaying External Subtitles from DLNA-compliant applications. It appears this is an issue with Samsung and not UMS. Although if anyone is aware of a UMS setting or configuration fix for this, I would be eternally grateful.
Thank you.
Kurt
User avatar
mik_s
Moderator
Posts: 1446
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Subtitles not displaying

Post by mik_s »

I have been trying to replicate this on my TV but it is working as it should if I match the file type, the way the file is named and the external subtitle.
It works on MP4s and MKVs even if they have internal subtitles too.

One thing that does break it is if I comment out the option

Code: Select all

SubtitleHttpHeader = CaptionInfo.sec
Samsung TVs need this header to find the sub file as it does this in a non standard way to other devices.

The odd thing is the conf you are using has this set so it should be working.
Maybe they have changed the header to something else on newer TVs so it is now ignoring this.
I had a look to see if they use anything else now but could not find anything, but I'm not sure what to search for.

There is also this option that is set to true

Code: Select all

# Whether to use the "sec:CaptionInfoEx" parameter to stream external subtitles.
# Supported subtitles are defined in SupportedExternalSubtitlesFormats.
# Default: false
UseClosedCaption = 
This is not in my conf so it may may be related. You could try setting this to false to see if it makes a difference.
I did try adding this to my conf but it made no difference and it still worked.
You could also try combinations of these 2 options and commenting them out.

Another thing you can try is to make sure the srt file is names exactly the same as the video.
So for example if the video is "Movie (2024).mp4" then call the sub file "Movie (2024).srt", this will appear as unknown subtitle to UMS but might work on the TV.

I can't think of anything else it could be without access to a modern Samsung TV.

If nothing works then I could open an issue on this on Github as I don't have the knowledge to take it any further.
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