Trying to play video file but keeps buffering

What is the problem you are having with rclone?

I am trying to play a video file (with a bitrate of 80Mbit) located on OneDrive but it always keeps buffering.
I have 1Gbit Down and 300Mbit Up so i don't think it is a connection speed problem

I am also using a 128 GB Sata SSD as cache hoping that it would help but i am still having problems

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0

  • os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
  • os/kernel: 10.0.19045.4170 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.22.1
  • go/linking: static
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Microsoft OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount OneDrive: Z: --vfs-cache-mode full --buffer-size 256M --vfs-read-ahead 4096M --vfs-fast-fingerprint --read-only --no-checksum --no-modtime --vfs-cache-max-size 100G --cache-dir D:\Cache --volname OneDrive -vv --log-file=D:\mylogfile.log

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[OneDrive]
type = combine
upstreams = OneDrive1=OneDrive1: OneDrive2=OneDrive2: OneDrive3=OneDrive3: OneDrive4=OneDrive4:

[OneDrive1]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business

[OneDrive2]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business

[OneDrive3]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business

[OneDrive4]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business

A log from the command that you were trying to run with the -vv flag

https://gist.github.com/Gasico/b33e7db1cd8340103d0da5ab64304770

That most likely has very little to do with rclone.

The key is that in the log file, you can see 'present true' meaning it's all in cache so you are serving from disk.

2024/03/29 13:06:18 DEBUG : vfs cache: looking for range={Pos:17531006 Size:16384} in [{Pos:0 Size:19922944} {Pos:2739044352 Size:23060480} {Pos:45540291725 Size:334879}] - present true

Are you transcoding? Can the the server keep up?
Is the server/client same spot? Is the server somewhere else?

You most likely want to check everything other than rclone in this case :slight_smile:

No transcoding, both the client and the server are connected via ethernet to the router and both get full speed connection.
I even tried to run rclone mount on the client device but i am having the same issue.

I thought that the buffering occurred due to the file being very heavy, but i think it might just be that it is corrupted or something since i just tried another video file and had no issue.

Sorry for opening a useless topic

Definitely not useless as we’ve ruled out a good piece and hopefully gotten you on a good direction.

1 Like

Unfortunatelly i am still experiencing issues trying to play heavy video files (bitrate of +50 Mbit/s)
It has nothing to do with corrupted video files, it was just that some video files with low bitrate (like 15Mbit/s) give me no issues at all, however, large video files with more than 50Mbit/s are a different story, i can't reliably play these files without getting occasional bufferring, a know that this is the problem because when i got buffering i immediatelly check the log file and found "present false" so i did a test, i launched rclone with --vfs-read-ahead 10G, ilaunched the same video file that gave me problems at the beginning and immediatelly paused the playback, waited for the cache to fill up (i checked the size of the folder and it was around 10GB) and resumed the playback, after that, i got no issues or buffering.

So the problem is that for some reason i can't download fast enough to fill the cache before the client asks for the files.
I checked throught the task manager of windows and it showed that i was downloading at around 30-60 Mbit/s nowhere near my max speed of 950 Mbit/s

I am actually having a very similar issue, and for me disabling vfs read ahead (or setting it to 8M) actually helps a lot even though I am on a 100mbit connection. I can basically play the files fine as long as read ahead is off or vfs cache itself is off.

unfortunately it didn't fix my problem, i am getting very low download speeds from onedrive

1 Like

OneDrive cannot give the speed required for streaming such high bitrate files.

You can have a look at my thread where with the kind help of people here I explored many options to make it work, but my ultimate conclusion was it cannot, there is a limit to it. 1080p streaming works fine, but high bitrates are no-go.

I am currently trying out iDrive, even it seems to have some problems from time to time. I am trying out different storage areas to see if they make any difference.

I think that all depends on how reliable is network connection to OneDrive servers. I am on 150/50 Mbits fibre Internet and can play 80Mbit video files without any issues. Probably lucky that my ISP has good interlinks to whatever Microsoft is using. I play it from basic rclone mount --vfs-cache-mode full --vfs-cache-max-size=10GiB --vfs-refresh without any extra tweaking flags and files are stored in ondrive personal (with own client_id) + crypt. When downloading from Onedrive 150 Mbits connection is fully saturated. I did try faster Internet (2/1 Gbits) at friend's place and looks like max I could get is 200 Mbits download.

Can you play the entire file consistently without any buffering or freezing though? I found with OneDrive it's the fluctuations that kill it; it's not a consistently low speed from the start, it's that the speed can and does drop unpredictably and suddenly, and it can happen at any part of the file.

Yes I can play all. Never experienced stuttering. When I seek it takes few seconds to start (5-10) but it does not bother me much.

I have never monitored speed all the time but temporarily slowdowns should be handled by cache and chunked reading.

That's very interesting.

So I guess the element of location plays a role too. I wonder if my OneDrives are in my country (as I've set them up from here) and because the server is in another country that affects the performance.

I have experienced heavy throttling without own clinet_id though. This is something now I always configure with new onedrive remote first thing. Important is to recreate token after adding it to an existing remote - to be sure I usually create all remote from scratch.

All my OneDrive remotes have my own client IDs which I created at the same time as creating the remotes.

I am trying to think what's different between your setup and mine.

Is your server at the same geographical location as your OneDrive accounts?
I suspect that mine are not, as I created the accounts from my location but the server is in a different country.