Mount over samba with a lot files doesn't works play files

here log txt

anyway also in kodi same story, i can make a log from kodi, but doesn't change.

Kodi is playing over Samba or how?

yes but also over dlna, over http, webdav

i have tried all protocols from rclone, so get a dlna server from rclone, or webdav, same story same issue

I can try to move movies from movies folder to another and have movies folder with 9.999 files and not 10000 and try again

I don't know how to solve this issue :frowning:

you mentioned that you tested on windows and did not experience the delay.
tho perhaps you did experience the same behavior.

on windows, using rclone mount, when using vlc to play a media file, does the debug log show the same behavior of listing all the files in the folder before playback of media starts?

given all the api and tps quirks of gdrive, perahps not the best idea to have 17,000 media files in the same folder?

That's really up to you as the number of files isn't the issue.

If you have 17k files in a folder, it has to retrieve them when it enters that directory to see if a file is there.

That should happen and get cached based on your dir-cache-time and won't be problematic after unless you change something there and have to refresh it.

Don't use Samba #winning

Put rclone where you want to run things and move on or continue to troubleshoot all these layers.

For me, I did some testing and just ran:

rclone serve http /media -v --dir-cache-time 1h --addr :8686

Which sits on top of a bunch of rclone local mounts and a local disk combined with mergerfs.

I installed Kodi on my Windows machine.

Connected the source to http://192.168.1.30:8686 and I'm watching a Movie via my Windows machine so seems to work without any issue.

This issue is only in Movies folder
In Movies 4k folder that contain only 1.000 files, there isn't any lookup and there isn't any issue.

It isn't the number of files that makes a lookup or not a lookup.

If you run a ls or dir or the application calls for a directory listing, you get a listing.

If it is 1 file, 100 files, 1000, 10000000 files, it's all the same and the only thing that changes in the amount of time back from the command via the API.

Debug logs show this information like:

2021/12/07 13:04:06 DEBUG : Movies 4k/: ReadDirAll:
2021/12/07 13:04:09 DEBUG : Movies 4k/: >ReadDirAll: item=1017, err=<nil>

The listing from your larger directory is pretty fast as well:

2021/12/07 13:05:11 DEBUG : Movies/: >ReadDirAll: item=12027, err=<nil>
2021/12/07 13:05:11 DEBUG : Movies/: ReadDirAll:
2021/12/07 13:05:11 DEBUG : Movies/: >ReadDirAll: item=12027, err=<nil>
2021/12/07 13:05:12 DEBUG : Movies/: ReadDirAll:
2021/12/07 13:05:12 DEBUG : Movies/: >ReadDirAll: item=12027, err=<nil>
2021/12/07 13:05:12 DEBUG : Movies/: ReadDirAll:

So lookups go really fast once they are all loaded in as the number of files / folders really doesn't matter too much.

Example is checking basic file attributes in a complex TV setup:

felix@gemini:/DB_TV$ find . -type f | wc -l
50910
felix@gemini:/DB_TV$ find . -type d | wc -l
965

and it's almost instant once cached:

felix@gemini:/DB_TV$ time find . -type d | wc -l
965

real	0m0.586s
user	0m0.035s
sys	0m0.077s
felix@gemini:/DB_TV$ time find . -type f | wc -l
50910

real	0m0.252s
user	0m0.029s
sys	0m0.038s

So my suggestion, run the same command I shared. Point Kodi to that, play whatever one thing you want and capture a debug log and share that.

In this case, I've installed Kodi Windows, done the same above and seems to work quite well.

is slow to open file

You clicked on a file in Kodi and hit play?

What file did you play?

What's 'slow'? 1 second? 5 seconds? 100 seconds?

a video of that

I add in kodi the folder and open folder, then click play on a movie.

And This one is with scraper of some movies

root@services:/mnt# rclone serve http ROB_MASTER: -vv --dir-cache-time 1h --addr :8686
2021/12/07 17:38:02 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "serve" "http" "ROB_MASTER:" "-vv" "--dir-cache-time" "1h" "--addr" ":8686"]
2021/12/07 17:38:02 DEBUG : Creating backend with remote "ROB_MASTER:"
2021/12/07 17:38:02 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: Open: flags=O_RDONLY
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: >Open: fd=Movies/#Alive (2020).mkv (r), err=<nil>
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.openRange at 0 length 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 0 length 4096 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4096 length 8192 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 12288 length 16384 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 28672 length 32768 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 61440 length 65536 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: Open: flags=O_RDONLY
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: >Open: fd=Movies/#Alive (2020).mkv (r), err=<nil>
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.openRange at 0 length 134217728
2021/12/07 17:38:47 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 126976 length 131072 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 0 length 4096 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4096 length 8192 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 12288 length 16384 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 28672 length 32768 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 61440 length 65536 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 126976 length 131072 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 258048 length 262144 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 520192 length 524288 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 1044480 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 2093056 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 INFO  : Movies: 192.168.178.21:63407: Serving directory
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 3141632 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4190208 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 5238784 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 6287360 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 7335936 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 8384512 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:48 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 9433088 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 10481664 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 11530240 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 12578816 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 13627392 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 14675968 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 15724544 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 16773120 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 17821696 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 18870272 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 19918848 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 20967424 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 22016000 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 23064576 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 24113152 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 25161728 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 26210304 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 27258880 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:49 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 28307456 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:50 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 29356032 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:38:50 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 30404608 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:39:02 INFO  :
Transferred:       14.220 MiB / 4.197 GiB, 0%, 1.016 MiB/s, ETA 1h10m14s
Transferred:            3 / 4, 75%
Elapsed time:       1m0.0s
Transferring:
 *                      Movies/#Alive (2020).mkv:  0% /4.197Gi, 1.088Mi/s, 1h5m36s

2021/12/07 17:39:02 DEBUG : Google drive root '': Checking for changes on remote

2021/12/07 17:39:02 DEBUG : Google drive root '': Checking for changes on remote
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: Open: flags=O_RDONLY
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: >Open: fd=Movies/#Alive (2020).mkv (r), err=<nil>
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.openRange at 0 length 134217728
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: ReadFileHandle.seek from 0 to 4506173184 (fs.RangeSeeker)
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.RangeSeek from 0 to 4506173184 length -1
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at -1 length 4096 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:25 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.openRange at 4506173184 length 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4506177280 length 8192 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4506185472 length 16384 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4506201856 length 32768 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4506234624 length 65536 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 4506300160 length 131072 chunkOffset 4506173184 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 31453184 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:39:26 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 32501760 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:39:27 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 33550336 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:39:27 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 34598912 length 1048576 chunkOffset 0 chunkSize 134217728
2021/12/07 17:39:27 DEBUG : Movies/#Alive (2020).mkv: ChunkedReader.Read at 35647488 length 1048576 chunkOffset 0 chunkSize 134217728



As you can see also with scraper, there is a lag, when i open a movie, request a lot of chunk in the first time, then not open the movie, then request one more time and now open the movie

keep in mind that rclone is on ubuntu, not in the windows machine.

I use kodi into firestick

Isn't possible mount rclone into firestick, so i need ubuntu to mount rclone and share via DLNA from rclone to kodi

If i use rclone in windows and i use windows, ok works.

But if i use rclone in ubuntu,ONLY Movies folder doesn't works properly.

Very strange, because others folder with less that 10000 files works

I can't see what you are clicking on as I just want to look through the log file and compare :frowning:

So from my testing with Kodi, you can see the log growing on your left as it's trying to add all that to your Kodi system which is scanning everything and since it's a fresh instance, it's enumerating through everything.

So you are confounding the play by having a large library to add to Kodi since it's fresh so trying to compare a play while media is being added won't be a great use case as Kodi is doing it's thing much like Plex.

As I don't use / know much about Kodi, I would not have any advice on how to use / configure it / tune library adds.

I did another test with VLC and just used a browser to find a URL for a movie and network played that link in VLC as another test which also works great.

So I think the challenge here is if you want to get Kodi to work, you need someone that knows/uses Kodi to add input. I use Plex.

I'm not sure what else I can add at this point as I've shared other ways to do things that all work generally and your setup isn't something I can help trouble shoot much more.

Good luck.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.