UMS subtitle problem

For help and support with Universal Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
lriuqs
Posts: 8
Joined: Sun May 06, 2018 6:16 pm

UMS subtitle problem

Post by lriuqs » Wed Oct 17, 2018 9:24 pm

Hello,

Since version 7.0.1 I have problem with the subtitels.
In earlier version everything works good, but I do not remember which version I have got earlier.

In my media library I have got packed movies. When I unpack movie UMS show it correctly. After that I'm uploading subtitels to movie directory. Mostly it looks like tkat:
I'm downloading .zip file, then I'm unpacing the subtitels and then, but not always I'm renaming subtitel file name to have the same name as movie file.

Subtitels are in .txt.

In previous version when I go to this directory through my TV I was able to watch my movie with subtitles. Right now subtitles are not visible.
When I reboot the UMS everything is ok.

I was looking in configuration and on google, but I do not find any solution.

I was making also some tests.
After the restart of UMS, I have deleted the subtitles file and check in TV and UMS update the folder and it was ok. Next I again uploaded subtitles to this folder and also UMS update the folder. So automatic adding of subtitles works, but not as in previous version.

Other my try.
At first I uploaded to the folder with movie the subtitles, then I unpacked the movie and in this scenario UMS showed my subtitles on TV. So automatic adding the subtitles works.

I can live with that, but I'm very habit to this procedure. It takes less time of my life :).

User avatar
squadjot
Moderator
Posts: 651
Joined: Fri Jun 01, 2012 4:24 am

Re: UMS subtitel problem

Post by squadjot » Thu Oct 18, 2018 4:32 am

Two things.

1. The subtitle must be of same filename, so something like

Code: Select all

The Best Movie Ever (2018).mp4
The Best Movie Ever (2018).srt
( If it worked without renaming srt file, it is most likely because the videofile had embedded subtitles )

2. If you have already entered the movie folder through UMS, you must restart UMS for it to register any new/renamed subtitles.

@SubJunk i really think that UMS should be able to recognize new subtitles without having to restart UMS

Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: UMS subtitle problem

Post by Madoka » Thu Oct 18, 2018 9:52 am

It actually DOES recognize them, but it doesn't display or work from the main folder window. In 6.8.0, if I add a new subtitle to a folder, exit and re-enter that folder, UMS will rescan that folder, but it doesn't show that it found the new subtitle in the main folder window. However, if I go into the TRANSCODE folder, it will list the new subtitle as an option. Manually selecting that option will play the video with the new subtitle. So UMS did find it. This saves me from having to restart UMS when I just want to watch the movie/show.

User avatar
SubJunk
Lead Developer
Posts: 2934
Joined: Sun May 27, 2012 4:12 pm

Re: UMS subtitel problem

Post by SubJunk » Thu Oct 18, 2018 10:37 am

squadjot wrote:
Thu Oct 18, 2018 4:32 am
@SubJunk i really think that UMS should be able to recognize new subtitles without having to restart UMS
Yes this would be great. We should make a new issue for it on GitHub so it is more likely to be worked on, here it is https://github.com/UniversalMediaServer ... ssues/1624

Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: UMS subtitle problem

Post by Madoka » Thu Oct 18, 2018 1:27 pm

I'm only posting to give some insight on how I use UMS and subtitles. I sincerely hope I am not stepping on any toes.

I am currently using the build posted here. I really like this build as I can have UMS running for weeks without it crashing. I also set the "Add subtitle information to video files" to Full, as I like to know if it's an .srt or an .ass file, as many times I have both for the same video file. I have noticed that UMS uses the first one it finds, so it's always .ass if there are both in the same folder. If this includes the code talked about in #1483, then it exhibits the behavior I described in my above post. I think (as it's been awhile), if I have a language code in the subtitle name, then it does show up in the main folder window. Please see the discussion I had with Nadahar in the thread mentioned earlier.

One personal note. I understand you guys' desire to get OpenSubtitles working. I mention this as it seems to be a cause of a memory leak in the code. However, I have never used open subtitles. I always download specific subtitles I want from specific subbers. I am part of a community where there are specific fansubbers who will produce subtitles for new dramas every season. I know which are good fansubbers and which are bad so I get specific subs from my favorite subbers. These subs are often on individual journal sites as well. Many, perhaps most, don't make it to OpenSubtitles. This behavior is not specific to me, but to most people who enjoy Asian dramas with subtitles, as I'm on the largest forum dealing with Asian fansubs, and we all do the same thing.

I mention this only in that it seems there are many improvements in subtitle handling in the works, but are being held back due to the bug. Perhaps you can separate the basic subtitle handling improvements from the OpenSubtitles code, and include only those for now. I don't know coding so I apologize if this was a naive comment as perhaps those things cannot be separated. As I mentioned earlier, as a very heavy subtitle user, the 6.8.0-subs release is the best release of UMS for me. I have been waiting for the subtitle code to get into the 7 series (UMS, not BMW) before upgrading.

Thanks for reading, and again, I apologize for any unintended offense.

Nadahar
Posts: 1439
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS subtitle problem

Post by Nadahar » Thu Oct 18, 2018 2:43 pm

I'll just add a bit more information to further clear things up. The rumor about the memory leak in the OpenSubtitles code is unfounded as far as I know. Apart from you Madoka, I think I'm the only that has tested this code over time, and I haven't noticed any such issue either.

The reason it's not merged is much more complicated and has to do with disagreements among the developers rather than technical barriers. I was the developer that made most of the work on this build, and I have since been kicked off the UMS development team. When the disagreements arose I discontinued the work on this branch and continued my work in another project. The state in which that code is now simply isn't compatible with UMS.

There are still some unfinished things in that branch, but it would certainly be possible to separate all that is finished from what isn't. My plan is to finish it, but I've simply had to do a lot of other things for some months for various reasons. When I finish it, it won't make it into UMS unless the remaining UMS developers step up their effort regarding this branch quite a lot, since the incompatibility with the UMS code at this stage is significant. A big part of the problem is that the code released as UMS 7.0.0 broke significant parts of this code, so until somebody takes it upon themselves to combine the two sets of code into something that is working, it's hard to see how this will ever make it into UMS.

The basics of what isn't finished is that the algorithm for selecting the "best" subtitles for a given video isn't as good as it can be, as I see it. Another problem is how the code calls the OpenSubtitles API, or rather how often. This frequently leads to the IP address in question being temporarily blocked by OpenSubtitles. This is a problem that has been there since long before this work started, but since the OpenSubtitles functionality hasn't really worked earlier I don't think many users have noticed this.

I believe that it's possible to make the API queries in "smarter" ways so that the problem is much less. In addition, this branch provides support for configuring your OpenSubtitles credentials for use by the code. VIP members aren't affected by query rate limitations, and wouldn't suffer from this problem.

I fully understand that there are many useful fixes in that branch that isn't related to OpenSubtitles and that could be merged separately, but since the changes in that branch are quite big (18109 new lines of code and 4192 lines of removed code in 106 files), I'd rather spend my time finishing it than trying to separate it. There's nothing preventing the current UMS developers from undertaking that though.

User avatar
SubJunk
Lead Developer
Posts: 2934
Joined: Sun May 27, 2012 4:12 pm

Re: UMS subtitle problem

Post by SubJunk » Thu Oct 18, 2018 7:42 pm

Thanks for the feedback Madoka. We actually use OpenSubtitles for our IMDb-like lookups too so it isn't just for subtitles :)

I am very interested in merging that branch into master, and valib and I have been continuing to work on it and test it lately. It is possible that the memory leak only happens with "filename prettifying" enabled, and may only happen on a more recent build of it - that one you are using quite out of date with our branch at https://github.com/UniversalMediaServer ... /pull/1483
Would you like to help us test it? I can compile it for you if you want

Nadahar is right that it is on valib and I to make it mergeable. The features in the branch are working AFAIK, the only reason it is not yet merged is that I experience a memory leak with it that I can reproduce 100% of the time, and I haven't had time yet to look into and fix it. When that is fixed I think it can be merged, and it may be a quick fix, so unless I am misunderstanding things greatly I don't think there is much to be done before it merges.

Madoka
Posts: 328
Joined: Fri Jun 01, 2012 12:51 pm

Re: UMS subtitle problem

Post by Madoka » Fri Oct 19, 2018 8:11 am

Thank you Nadahar and SubJunk for your kind replies.

I would be happy to test any build with improved subtitle support. My understanding is that series 7 uses some new configuration terms compared to series 6 (especially for the show/hide features), is that correct? Such that I should do a fresh install of any series 7 UMS? Also, can I have both installations on my computer or will that mess with the uninstaller?

Nadahar
Posts: 1439
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS subtitle problem

Post by Nadahar » Fri Oct 19, 2018 9:50 am

There's no need for a fresh install, just rename or copy your profile folder and you can keep the one you have for 6.x in case you want to switch back.

Depending on the platform, the profile folder's default location is:

Windows: %ALLUSERSPROFILE%\UMS (usually C:\ProgramData\UMS)
Linux: ~/.config/UMS
macOS ~/Library/Application Support/UMS

Make a copy of the folder and call it for example UMS6x, and you can later revert simply by changing the names of the folders. 7x will modify the database files inside the profile folder which makes it impossible to go back without deleting the database.

lriuqs
Posts: 8
Joined: Sun May 06, 2018 6:16 pm

Re: UMS subtitel problem

Post by lriuqs » Mon Oct 22, 2018 1:34 am

squadjot wrote:
Thu Oct 18, 2018 4:32 am
Two things.

1. The subtitle must be of same filename, so something like

Code: Select all

The Best Movie Ever (2018).mp4
The Best Movie Ever (2018).srt
( If it worked without renaming srt file, it is most likely because the videofile had embedded subtitles )

2. If you have already entered the movie folder through UMS, you must restart UMS for it to register any new/renamed subtitles.

@SubJunk i really think that UMS should be able to recognize new subtitles without having to restart UMS
1. Yes, my subtitles always got the same name as movie file, like you wrote above.

2. In old version when I wanted to change existed subtitles I had to restart UMS.

Right now it is probably from version 7, subtitles are visible in main movie directory only when they are earlier uploaded to this directory than the movie. In other case I have to reboot UMS.

Earlier it works, so I hope you will find the solution for that.

Post Reply