Optimize for 4K Plex Direct Play from Gdrive

With vfs-cache-mode full, that isn't a problem anymore.

As @VBB pointed out, you are most likely have a network issue/latency issue which you can't really tune around. To play high rate files, you need a consistent connection and any little blips will cause issues.

My plex server is local to my house so I don't see any issues.

@misteriks are you able to copy files from the mount directly to the PC? While you do that check if the speed is constant or fluctuating. And now that you have the file locally, add it to plex and see if it still buffers.

Very interesting topic, taking note myselft of some rclone codes here for optimization but, What It really helped me is the path were you set to do the cache/transcode in PLEX conf. I have noticed a major improvement when I use a Fast SSD Drive or even a RAMDisk and add a 3600 of buffer

Home Streaming

CHECK Use recommended settings

Transcoder

Transcoder temporary directory
F:\FAST\SSD\PATH
Directory to use when transcoding for temporary files.

Transcoder default throttle buffer
3600
Amount in seconds to buffer before throttling the transcoder.

The transcoder location isn't relevant for Direct Play as there is no transcoding happening.

Could it be but on his case the transcode seems to be happening.
Also on my experience it's always a good method to have a sepparate drive for caching, even for rclone purposes and I belive you also do the same on your published setup isn't it?

If you check above, you can see he confirms that it is direct playing.

As noted by that post as my dutch translation is bad.

Not sure if it's good or bad, but in my setup, I use a separate disk but to circle back to the OP's post, it's not related as he's direct playing.

Thx for all the responses!

My plex server is indeed local.

I already have this in my mount command.

I cleared my rclone cache and start playing the test file again. What I can see in windows task manager on the Plex server is that downloading the file to local cache is not one steady data stream. Instead it is downloading a part of the file and then pauses for a bit after which downlaods the next part of the file.

Is it possible to continue caching the complete file locally during playback without the pause until the file is completely cached locally?

Upload to the to the Plex client is one steady stream of data.

When I download from the rclone mount to a local drive it is one steady download stream that doesn't dip below 300 Mbps with peaks of 500+ Mbps

With the local drive mounted in plex the test file still buffers when using the USB ethernet adapter.

This is the network behavior when playing the local file via the USB network adapter

I then tested via the Wifi connection of my TV and to my surprise that performed a lot better without any buffering. As you see compared with the USB network adapter the data stream is much more steady. Access points I have are Unifi WiFi 6 Lite

And also playing via Wifi from the rclone mount works perfectly

I think it is safe to conclude that the issue is somewhere in my local wired connection between the plex server and plex client.

I will troubleshoot this and if I find the issue will post it here, but I will probably keep using the wifi connection on my TV as I noticed that all TV apps work fine with the USB network adapter except for Netflix. That only works with the build in Nic or Wifi adapter

You are fighting with the built client and how it works as you've shared from your local copy which keeps a consistent rate of data and the built in LG client which doesn't. Rclone can't control if a client opens and closes a file so there aren't many option unless you want to to run something to precache the whole file but not sure that would solve the problem either.

If your server and client are local as you stated, you'd really want to use a decent plex client like the Shield to play 4K content as the embedded clients are just awful.

I don't think it is the Plex client that is causing this behavior. Note, this is the situation when playing a file that is on the Rclone mount that hasn't been cached locally yet.

The data stream from the Plex server to the Plex client is a steady stream of data of about 88 Mbps.
This is the "send" as you see it in the screenshot.

The data stream from Google Drive to the Plex Server has the spikey behavior between 150 and 200 Mbps. This cannot be caused by the Plex client or the plex server.
That is Rclone that is caching the file locally is batches.

Hence my question if it possible to continue caching the complete file locally during playback without the pause until the file is completely cached locally?

That's exactly what is happening. Rclone doesn't do anything in regards to requesting the file. The application requests the file and in this case, the application is your TV Client.

The premise here is wrong as it's not rclone as it's the application requesting. Plex playback is always spikey as it grabs a bunch and closes. The client matters as the client is especially worse on built in clients because they have tiny buffers in them and they are very susceptible to latency/spikes in data since they can't buffer. Better clients like Shield/ATV 4Ks handle it better.

If you are using full, you can use:

--vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full.

This works but if the client (like your previous logs showed) closes/opens the file, you lose the benefit since it's not sequentially reading and the file is closed out.

It's all in the plex debug logs of what the client/server are doing so it's best to look there and not guess on the behavior.

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