UMS 10.6-10.8.2 Stuttering videos

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
Startropic1
Posts: 21
Joined: Thu Jul 25, 2013 5:29 am

Re: UMS 10.6-10.8.2 Stuttering videos

Post by Startropic1 »

Nadahar wrote: Sat Aug 21, 2021 3:05 am
Startropic1 wrote: Sat Aug 21, 2021 2:57 am How do I disable media library? I can't find this anywhere in the main panel, and I do have advanced options enabled.
The UMS devs have decided that they don't care about those that don't use the "media library", and has removed the setting from the GUI to make it difficult to disable. I don't remember what the setting is called in the configuration file, but it might be "use_cache" or something like that. I don't think it's called "media library" in the configuration file.

https://github.com/UniversalMediaServer ... -899859691

I don't really thing UMS will work very well with it disabled in V10, so if you want to use UMS without the media library, I would revert to V9.
If the "media library" component is problematic with certain renderers, and disabling it is not straightforward/problematic for UMS v10, then I think we have a serious problem here.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by Nadahar »

I agree, but I don't think the developers share the concern. V10 is all about new features for the "media library" anyway, so I don't think anybody that don't use it would "miss anything" by going back to V9.

This happens in software development all the time, especially these days. It has become a "trend" to only care about the things the most users use, and ignore the rest. I think telemetry has had a major role in shaping this direction, it makes it easier for those that don't care about the "outliers" to claim that 4% or whatever it might be is negligible. What so many decision makers seem to understand is that when you constantly keeps "screwing" 3-5% of your user base, it adds up. I'm currently extremely frustrated at Mozilla for doing this exact thing with Firefox. I fear that it will become completely useless in the very near future. If you look at what has happened to Windows since Windows 7, it's mostly the same thing. Lots and lots of things have been ditched because the "average user" doesn't use it.

I digress, but I think the fundamental problem is the same. As a user, all you can do is to try to find development teams that don't share this philosophy. It's not always possible though, as it seems that a lot of "leaders" love this "cynicism by telemetry" idea. I've tried to warn the UMS team about the direction for a long time, to no avail.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by SubJunk »

Nadahar is providing misinformation, you can easily disable the Media Library and the caching functionality altogether. We didn't change that ability at any point.
It would be interesting to know if that affects this problem. Those settings are all on the Navigation Settings tab. You may need to enable the "advanced options" on the General Settings tab if you can't see the settings (and it has been like that for many versions)
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by Nadahar »

I'm sorry for the "misinformation" if the settings are still in the GUI. I haven't tested any later versions, so all I have to go by is what I read - and it has been my understanding that they had been hidden. I've had to help other users find the setting to disable it in PMS.conf, and that was the basis for my assumption. Your own comment that I linked also reinforced my impression, although I see now that you said "by default". I can only apologize for the mistake, no misinformation was intended. The rest of what I said still applies as far as I can see though, you said yourself "At this point I think the database and startup scan are essential for UMS to run properly in many ways.". I still read that as "those that disable it can't expect proper operation".
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by SubJunk »

I am still interested in supporting users who use non-default settings. There is always a reason we set defaults and that's because we believe they are the best option for most users, but there are always exceptions, especially if the cache is causing problems for a user.
The cache has always been part of UMS and PMS before it, and if you had asked me 10 years ago when it was PMS I would have said the same - the cache is needed for the best experience. Things will work without it but they will be slower because we need to parse files in realtime instead of their cached versions.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by Nadahar »

Let's try to separate "the cache" (the caching of parsed media information) from the "media library" (database query based organization of media items).

The cache is essential for speeding up browsing, and I can think of no "conflict" between the cache function and renderers that enumerate the whole media tree when browsing. It should be as helpful there as anywhere else.

The problem is the "meda library" which can and usually will list the same item multiple times when browsed recursively, in addition to that each media item already is listed under the folder structure. That, and the "initial scan" whose purpose is to make sure that the database is up-to-date with what's actually in the shared folders, has a high cost for large libraries and no "performance benefit". It has a "convenience benefit" if you use the "media library" to browse and find your media. If you don't, either because your renderer "behaves badly" like discussed here, or because you prefer that the media is organized the way you have organized your folders, it's a complete waste of time/resources.

When you introduce "functionality" that you know will "break" if some settings are not default, how can you see that in any other way than that you don't care about the experience for those users?
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by SubJunk »

@Startopic1 can you try https://www.universalmediaserver.com/up ... 38d288.exe please? I hope it fixes it

@Nadahar the performance benefit of the initial scan is that it pre-parses media, and that parsing is used in all folders, whether they are in the Media Library or not. The startup scan prepopulates the cache so that even the first time a user browses a folder it will load quickly. If the cache (AKA the database) is disabled, UMS will need to parse the media in each folder on-demand, which for large collections can take a long time and lead to timeouts, mostly while we wait to launch a MediaInfo instance for each file.
Whenever a user goes into a folder via UMS, UMS needs to know about the files in the folder in order to tell the renderer about them, so they need to be parsed. So it's a question of when that parsing happens.

To lay the options out logically from slowest to fastest:
1) Slowest: Cache and initial scan are disabled - files are parsed when a folder is browsed, and it needs to be done every time
2) Faster: Cache is enabled, initial scan is disabled - files are parsed when a folder is browsed, but that only happens once, so subsequent browses are fast
3) Fastest: Cache and initial scan are enabled - files are parsed ahead of time and cached, so even the first browse of a folder is fast

As for the Media Library it is just an optional folder that can be disabled. Some users like it and others don't. Personally as a user, I use both.
Hopefully I have clarified some misunderstandings.
Startropic1
Posts: 21
Joined: Thu Jul 25, 2013 5:29 am

Re: UMS 10.6-10.8.2 Stuttering videos

Post by Startropic1 »

I will provide logs a little later, but I can report that after unchecking "enable the cache" and unchecking "show media library folder" UMS 1.8.2 is running MUCH better, it isn't even crashing anymore on the application (windows) side. It should be noted that the media library folder bit probably has no bearing on anything, I just disabled it since it wasn't going to be used.
SubJunk wrote: Sun Aug 22, 2021 7:42 am @Startopic1 can you try https://www.universalmediaserver.com/up ... 38d288.exe please? I hope it fixes it

@Nadahar the performance benefit of the initial scan is that it pre-parses media, and that parsing is used in all folders, whether they are in the Media Library or not. The startup scan prepopulates the cache so that even the first time a user browses a folder it will load quickly. If the cache (AKA the database) is disabled, UMS will need to parse the media in each folder on-demand, which for large collections can take a long time and lead to timeouts, mostly while we wait to launch a MediaInfo instance for each file.
Whenever a user goes into a folder via UMS, UMS needs to know about the files in the folder in order to tell the renderer about them, so they need to be parsed. So it's a question of when that parsing happens.

To lay the options out logically from slowest to fastest:
1) Slowest: Cache and initial scan are disabled - files are parsed when a folder is browsed, and it needs to be done every time
2) Faster: Cache is enabled, initial scan is disabled - files are parsed when a folder is browsed, but that only happens once, so subsequent browses are fast
3) Fastest: Cache and initial scan are enabled - files are parsed ahead of time and cached, so even the first browse of a folder is fast

As for the Media Library it is just an optional folder that can be disabled. Some users like it and others don't. Personally as a user, I use both.
Hopefully I have clarified some misunderstandings.
I will give the daily build you posted a go and see how it performs. (I will be sure to save logs too.)

Fyi, you can probably improve parsing performance by NOT scanning contents of subfolders until the user opens that specific subfolder.
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by SubJunk »

That's interesting to know... It gives me another idea to try, I'll make another build now
User avatar
SubJunk
Lead Developer
Posts: 3705
Joined: Sun May 27, 2012 4:12 pm

Re: UMS 10.6-10.8.2 Stuttering videos

Post by SubJunk »

Can you please re-enable those settings and try this build too? https://www.universalmediaserver.com/up ... 9998e0.exe
Post Reply