[Solved] UMS stopped transcoding subtitles

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
mik_s
Moderator
Posts: 1104
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: [Solved] UMS stopped transcoding subtitles

Post by mik_s »

Could you post logs? see the section in red above.

As a work around you could play from the #--TRANSCODE--# folder and select your subs that way. This will transcode and burn them into the video stream which is not ideal if the original file is supported by your TV but should work OK for now.
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.
jareeq
Posts: 8
Joined: Sun Dec 05, 2021 1:13 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by jareeq »

Thanks for reply mik_s,

I am aware of TRANSCODE folder but from couple of versions (currently using 9.8.2) I simply can't operate with pause FastForward or Rewind on FFmpeg files with embedded subtitles.
Can only operate on 'No transcoding' or tsMuxeR.
So I'm convicted to stream.

Attached trace logs from two attempts with srt files (10.13.0 x86_64 headles under linux). Same setup works fine with 9.8.1 and 9.8.2 but not with 9.8.3, 10.1.0, 10.13.0.
Also what is noticeable - 'No transcoding' with external subtitles is not available under TRANSCODING folder in 10.13.0, however it is under 9.8.2.

ums-2021-12-05_1246.zip
trace logs no srt on LG-la740s
(262.62 KiB) Downloaded 970 times
I appreciate your time
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by Nadahar »

I'm pretty sure this is because of the change they made to how subtitles support is indicated in the renderer configuration files. It used to be (before a certain version, probably v9 something) that support for external subtitles could be specified on a separate line that applied to all containers. Then they changed this so that instead it must be specified on the individual supported lines, so that it's possible to support a certain subtitles type for one container type but not for another.

That is all well, the problem is that most of the existing renderer configurations weren't updated to this new syntax. This means that subtitles support most renderers were effectively removed, and that they will only be fixed one by one when somebody complains that it has stopped working.

I don't remember how the "new" format looks, but if you can find one of the renderer configurations that has been "updated", it should be easy enough to see. The same changes then need to be done to all the "supported" lines where it applies, and you should be good to go. Then a PR should be created to update the renderer configuration that comes with UMS, so that the "fix" is done for other users as well, and so that version updates won't invalidate the changes.
jareeq
Posts: 8
Joined: Sun Dec 05, 2021 1:13 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by jareeq »

Hi Nadahar,

Already spotted new syntax, however in my case renderer conf wasn't updated from long time and afraid that it is not only change needed.
Meanwhile added new notation to every line:

si:SUBRIP se:SUBRIP

Without luck, so will wait for trace interpretation.
Also problem is that my lines in renderer not always match exactly given MKV/MP4 file. Finally i don't know where problem is. Lucky i am not forced to use v10 but being so much behind worries me and that's why started thread.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by Nadahar »

The "si:" (internal subtitles) and "se:" (external subtitles) are the ones I was thinking of. However I can't see them in the LG-LA740s.conf in your "trace files". Also, remember that you have to restart UMS after editing the renderer configuration file for the changes to apply.

When it comes to being worried about "falling behind" the latest version, there's nothing to worry about. That's a "hoax" that many software companies use to make users upgrade, it's easier for them if everybody is running the latest version, and it often also generates more money for them. It's mostly software that "directly interfaces with the Internet" that is critical to keep updated, like web browsers etc. UMS doesn't do that at all, it only operates on your local network (unless you configure some kind of port forwarding for your web interface, which you really shouldn't because there's no "security features" in the web interface). UMS doesn't have authentication (passwords etc), encryption or any other such "security" feature, so most "security vulnerabilities" found in software is irrelevant. The UPnP AV/DLNA protocol that is the basis for this is also without authentication, the whole idea is that the protocol should be easy for home users to use, and authentication always makes things much more difficult, typically making it "out of reach" for the majority of users or at the very least very inconvenient to use. It is assumed that the server and the renderers run on local networks that is protected by a router or similar. In addition, it relies on multicast IP, which generally isn't routed and thus "unreachable" as soon as you have to go through a router. So, to sum it up, you have nothing to worry about with running an older version when it comes to security.

From your trace log I find:

Code: Select all

TRACE 2021-12-05 12:25:45.528 [HTTPv2 Request Worker 4] Subtitles "nttd.srt" aren't valid for streaming to LG LA-740s
TRACE 2021-12-05 12:25:45.528 [HTTPv2 Request Worker 4] Subtitles "vltbc.srt" aren't valid for streaming to LG LA-740s
...which points to the missing "se:" entries in your renderer configuration file.

Another problem I see in our UMS.conf is "disable_transcoding = true". This option is only meant for troubleshooting, it really disables a good chunk of the logic that normally applies, so I wouldn't be surprised if this cuts short some of the subtitles processing. You should remove it, and instead make sure that your "supported" lines match the actual capabilities of your renderer. UMS will never transcode if it doesn't have to, so as long as it knows that the renderer can play the file, it will not transcode. Thus, disabling transcoding is pointless, even though you want to avoid transcoding, I assume it's better to have a video transcoded than not playing at all.
jareeq
Posts: 8
Joined: Sun Dec 05, 2021 1:13 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by jareeq »

Changing

Code: Select all

Supported = f:mp4|mov         v:h264|mp4              a:aac|aac-he|ac3|mp3            se:SUBRIP       m:video/mp4
to

Code: Select all

Supported = f:mp4|mov         v:h264|mp4              a:aac|aac-he|aac-lc|ac3|mp3            se:SUBRIP       m:video/mp4
Results in that srt subtitles are displayed at least for mp4 file again, also in TRANSCODE folder shows up 'No transcode' version with external subtitles.
Looks like newer versions of UMS need exact match of renderer line

now same way:
changing:

Code: Select all

Supported = f:mkv               v:h264                  a:aac|aac-he|aac-lc|mpa|ac3|dts    m:video/x-matroska
to

Code: Select all

Supported = f:mkv               v:h264                  a:aac|aac-he|aac-lc|mpa|ac3|dts|eac3    m:video/x-matroska
gives srt subtitles displayed for mkv file as well as 'No transcode' with ext subtitles.

Even when I don't know that eac3 is supported by my tv or not.
Anyway - this gives me feeling that I'm hacking something, with my current version (9.8.2) such operations are not needed and everything works :-|

@Nadahar I will seriously consider your words about simply staying with v9
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by Nadahar »

@jareeq You're not "hacking" anything, it's the way it's supposed to work. It is true that the "supported" line must match "exactly", if it doesn't match the line isn't used.

There are some confusion regarding what codec "codes" to use, I don't remember exactly what applies in UMS, but I'm pretty sure that "aac|aac-he|aac-lc" isn't necessary. HE-AAC and AAC-LC are both AAC, they are just more specific. I doubt that the "aac" entry does anything, although I'm not sure. The same goes for "mp4" under video codec. There are no video codec that can be identified as MPEG-4, the MPEG-4 standard describes two different video codecs, one is MPEG-4 Visual and the other is AVC/H.264. MPEG-4 visual is sometimes called "mp4v", sometimes "mp4sp" or "mp4asp" (which are really just different profiles of MPEG-4 Visual, "Simple Profile" and "Advanced Simple Profile"). In any case, just specifying "mp4" seems unlikely to match anything. Most people aren't familiar with MPEG-4 Visual, but DivX and XVid are implementations of this codec.

The codes are defined here: https://github.com/UniversalMediaServer ... #L590-L695

If we assume that it is to be trusted, it seems like "mp4" is indeed valid as a video codec, and I can only assume that it means MPEG-4 Visual, although AVC/H.264 is "just as much" MPEG-4. "aac" on the other hand is not listed.

"aac-he" doesn't seem to be valid either, it's supposed to be "he-aac".

Regarding codecs you don't know if is supported, you should either find out in a manual or online, or you should test it. Leaving something as "supported" that really isn't supported will just lead to no playback if you encounter such a file. You don't have to add codecs (like EAC-3) to get anything to work unless you have files using that codec. If you have files using that codec and playback works, with subtitles and all when specified like this, then you in fact know that your TV does support it. Otherwise the file wouldn't play.

Edit. I can't understand how this line can make SRT work with MKV's though, as you're missing the "se" spec:

Code: Select all

Supported = f:mkv               v:h264                  a:aac|aac-he|aac-lc|mpa|ac3|dts|eac3    m:video/x-matroska
jareeq
Posts: 8
Joined: Sun Dec 05, 2021 1:13 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by jareeq »

This is very strange indeed.
Basing on your informations it should work 'as is' ported from my old renderer file, but I carefully tested this two cases with renderer modifications leaving finally one line only.
Maybe this is difference between versions ?
Not looked at code at all but to me it can be exact match issue - maybe wrong regex. Or something more complicated like 'sub-codecs should not be listed '.
Going back to simpler question - why that config just work with 9.8.2 ? :-)

Will make next trace today if needed with working examples.
jareeq
Posts: 8
Joined: Sun Dec 05, 2021 1:13 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by jareeq »

Managed to create next trace with described modifications.
This change works with 10.13.0.

Looks like since 9.8.3 renderer need to have exact line match to load subtitles.

Needed to add eac3 to:

Code: Select all

Supported = f:mkv	v:h264	a:aac|aac-he|aac-lc|mpa|ac3|dts|eac3	m:video/x-matroska
and aac-lc to:

Code: Select all

Supported = f:mp4|mov	v:h264|mp4	a:aac|aac-he|aac-lc|ac3|mp3	m:video/mp4
to get working configuration in both cases, no si/se declaration.

Now don't know what should be interpretation of this behavior since for end user better is more intelligent config that - like @Nadahar said - if I place aac this should include also aac-lc as well aac-he.
From other hand my device not support eac3 looking to:
https://www.lg.com/us/support/help-libr ... 7119236444
(need to click: Troubleshooting>DLNA>Certain files wont show/play)
But it is working - don't know why.

Maybe exact matching is the case in first example but what about second one ?
This looks like no solution since I need to add all combinations of codecs to get functionality from older version.
Attachments
ums-2021-12-05-1841.zip
(280.5 KiB) Downloaded 866 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: [Solved] UMS stopped transcoding subtitles

Post by Nadahar »

The "format/codecs overview" you linked does indicate EAC-3 support in MPEG-TS and AVI files (although strangely not in MP4 or MKV, which makes me thing the "overview" is probably inaccurate). "Dolby Digital Plus" in another name for EAC-3, while "Dolby Digital" means AC-3.

It has always been the case that it must "match exactly", the reason why it used to work in the older version for you was probably because you disabled transcoding. Logic change in the code has probably made this "glitch" unavailable in later versions. It was never meant to work this way anyway. It's as simple as to specify a match for everything the TV supports. It might be that they made a modification at some stage that doesn't require "se:" and "si:" as long as you have these defined:

Code: Select all

SupportedExternalSubtitlesFormats = SUBRIP
SupportedInternalSubtitlesFormats = SUBRIP
Specifying them on the individual "supported" line does give you more flexibility to actually indicate what's supported. I believe that the "external" subtitles support probably is the same for all containers/formats, while the "internal" probably isn't.

As far as I can tell from your log, transcoding is still disabled, so it's very difficult to determine what's going on as parts of the logic isn't applied as a consequence. Enable transcoding and generate a new log.
Post Reply