UMS won't play long file names [Solved]

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
Videodoctor
Posts: 7
Joined: Sat Feb 17, 2018 10:09 am

Re: UMS won't play long file names

Post by Videodoctor »

Attached is the log zip file.
I have tried downloading and viewing "The.Walking.Dead.S10E16.A.Certain.Doom.1080p.AMZN.WEBRip.DDP5.1.x264-CasStudio[rarbg]"
The folder names show up but the actual file does not.I have tried researching the database manually but it still doesn't show.
It will show up if i manually rename the file to "The.Walking.Dead.S10E16.A.Certain.Doom.1080p" which is a lot shorter and this seems to work.
I use Goodsync program to download the files from my seedbox and then UMS shows them on my tv downstairs.This works perfectly all the time except when the file name is very long.
My process is fully automated so having to rename file names kinda defeats the automatic process.
Any suggestions as to how to fix this would be most appreciated.
Attachments
ums_dbg_2020-10-01-18-13.zip
(169.94 KiB) Downloaded 285 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS won't play long file names

Post by Nadahar »

I haven't looked at your log, but IF in fact it's caused by the max Windows path length constraint, I don't think there's much that can be done from UMS' side. The only solution I can think of then is to shorten the names of the folder(s) where you keep your media, it's the total path length that counts.

It might be some other UMS bug though.
Videodoctor
Posts: 7
Joined: Sat Feb 17, 2018 10:09 am

Re: UMS won't play long file names

Post by Videodoctor »

I don't think it's anything to do with Windows file limit.Firstly the file length isn't all that long(possibly max 50 chars) where as Windows is at least 256 length limit.
Also the files show up in Windows no trouble and can be played.It just UMS that doesn't like it.
This problem shows up in both LG tv's so it seems to point to UMS as the common problem area?
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS won't play long file names

Post by Nadahar »

The window file limit is for the FULL PATH. That means: "D:\Some location\Media\Home Video\Fall 2019\Holiday\video.mp4" is more than just 5 characters. Windows isn't consistent with its own limit, some places you can exceed the limit, other places you can't. I've had files that I can't rename for example, because they are too long. If I copy them to another folder with a shorter path, I can. The explanation for this behavior is that some of Windows' API's have been upgraded to not be limited by this, while others haven't. The end result is that it depends on the specific operation whether some of the "old" code is in use or not, and that's not really transparent for anybody but the Windows devs themselves, as we don't know what "goes on under the hood", it being closed source and all.

When I look in your log, the total length for the path for the file you mentioned is 230 characters. It's quite long, but I don't think it exceeds the limit. Try renaming the folder name to something shorter (while leaving the file name the same) and see if that makes a difference, just to determine if the path length is the problem or not.
boss
Posts: 343
Joined: Thu Jun 30, 2016 1:07 pm

Re: UMS won't play long file names

Post by boss »

On a different note, I see you are using the LG-LA6200 (modified) conf file.
In that you have entries for stream extensions.
StreamExtensions = asf,wmv,avi,divx,mp4,m4v,mov,3gp,3g2,mkv,ts,trp,tp,mts,m2ts,vob,mpg,mpeg,mp3,jpg,jpeg,jpe,jps,mpo"

As well as having most in "Supported Video Formats". I believe you should just have them in "Supported Video Formats" and remove the "StreamExtensions".

Also, the LG-6200 is basically the LG generic conf file. If the LG TV is quite new, it will be a WebOS TV and there is a specific conf file for LG WebOS TV's being "LG-WebOS.conf"
boss
Posts: 343
Joined: Thu Jun 30, 2016 1:07 pm

Re: UMS won't play long file names

Post by boss »

Although I am running Linux, I made a folder (7 sub folders) which was 370 characters long plus the extra characters for the file name.

It exceeded the 256 character limit and I couldn't access it from a Windows computer (using SAMBA) as it was too long.

But.... using UMS, my LG TV was able to drill down through the folders and see and play the video file.
That would sort of indicate the UMS does not have a problem with long path/file names.
Videodoctor
Posts: 7
Joined: Sat Feb 17, 2018 10:09 am

Re: UMS won't play long file names

Post by Videodoctor »

Right,I think we have got to the bottom of this problem with Nadahar's help.It IS the file name length that's the problem.I was just looking at the film file name and thinking "well that's not over 256 characters long" , where as the file limit length was the whole file destination including folder names and sub folder names.
I renamed a very long name movie i had downloaded but this time left the .MKV file the same length and just shortened the folder and sub folder names.This did the trick.The movie would now show up and play perfectly.
My Goodsysnc program was creating a folder within a folder which due to the name length exceeded what windows will handle.
The cure was to just download the file as it was without any sub folders hence shortening the overall destination considerably.

So thanks guys,you were right all along :D
Prehaps this thread can be marked as 'SOLVED' 8-)
Post Reply