Some help with rclone mount for plex? Buffering everywhere

the mount is runing on the vps not your local computer.
so the mount will download the entire file to the vps before plex can stream it.
this would test if the problem is between gdrive and the vps

not sure what you mean?

You only need these flags:
--allow-other
--dir-cache-time 160h \

everything else is optional, even logging:
--log-level INFO
--log-file /var/log/rclone.log

drive-chunk-size does nothing on a mount, this is used for copy/move/sync commands. Value should be 32M,64M, or 128M depending on your ram, disk performance, and other factors. 64M should be plenty to hit max upload speeds. This is the only flag needed to control upload speeds (unless --bwlimit). The tps-limit flags that people think increases speed doesn't.

Don't use these flags, most people don't know what they are doing with them...

umask 022 \ - not needed if you're running your mount as your user.
--allow-non-empty \ - remove this, folder should be empty when not mounted.
--allow-other \ - required

--fuse-flag sync_read \ - remove, this isn't used unless you compiled your own kernel, which you didn't and it isn't needed anymore anyway.

--tpslimit 10 \ - Remove this, the default is set to google's max allowable limit

--tpslimit-burst 10 \ - Remove this, this will cause random errors.

--drive-chunk-size 128M \ - Remove this on a mount. This is only useful for uploading. You're better off setting this in your rclone.conf anyway. Use move/sync/copy instead.

--dir-cache-time=160h \ - this is good a value, you can leave this.

--buffer-size=128M \ - the bigger the buffer, the more buffering you will have :). Remove this flag or use 16M or 32M. The buffer frequently gets dropped, so bigger buffer means more work for nothing, wasted.

--attr-timeout=1s \ - remove, don't need it.

--vfs-read-chunk-size=64M \ - 64M is ok but 128M (default) is the best. Don't go lower than 64M.

--vfs-read-chunk-size-limit=2G \ - this is a common flag, it doesn't do any harm but IDK if there's a benefit.

--vfs-cache-max-age=24h \ - only needed if using caching mode which is not recommended.

--vfs-cache-mode=minimal \ - don't need caching for plex, in the future cache mode improvements will happen, when that does, full will be recommended. do not use full now because it will download the file first before starting playback, which isn't what you want.

--cache-db-path=/media/plexcache/ \ - this is the old cache backend, don't use it, it's slower.

--write-back-cache \ - don't need this either.

--cache-dir ${UPLOADS} \ <- Use rclone move/sync/copy instead to upload. Uploading via mount isn't great

--poll-interval 1m - leave this alone, remove it.

If you are trying to stream remux files, especially 4k remux files this way, it's not going to work unless you have a fast connection 300mbps+ in your home too.

Basically your server downloads the file from google, then uploads it to you and needs to do it quick enough to handle the bitrate on both ends.

try getting rid of all of the flags except the ones I said in my other reply.

I downloaded a file in the VPS HD and I tried to play..even with a local file, was not able to play

Thank you for all explanation!

But this is weird..When I try to play files with my gdrive mounted in home, I can play, and no buffering. I just open via VLC or MPHC, just take some seconds to start but after started, plays well

have you tried this yet?

I am curious if this is like my issue. Instead of messing with the mount, set your client to not allow direct play and force it to direct stream. Not all clients will support this, you will have to check on Plex to verify it is not direct playing.

For me, I get buffering whenever I direct play, but direct stream is perfect!

Direct stream is a transcode so it buffers using this setting.

So assuming your server keeps it, it would keep that amount of time in it's buffer.

Direct play is sensitive to blips as the plex clients have tiny buffers on them.

Yes, I think you helped me rule it down to how the file was being opened and closed repeatedly, but can’t remember the specifics. Once I set all my clients to direct stream, it has been fairly smooth. Hope this helps OP

Was not a mount or plex configuration. I was far away from my server and the long distance was the reason of the buffering. I had to point my server to Cloudflare and now the buffering is gone

remove the buffer flag you set. the higher the buffer size, the more data it downloads just to be thrown away if it keeps closing the file.

Direct stream does not transcode video and does not use the transcoder default throttle buffer. There can be partially transcoded direct streaming, but that occurs when the audio portion is transcoded. The video portion is simply copied unchanged into a compatible container and streamed to the client.

Using the transcoder in Plex is a binary thing. It either is or isn't. Direct streaming uses the transcoder settings.

Here is a pic as you can see the transcode buffer as it's the grey line.

Here is the Plex Transcoder Statistics.log if you put it in debug, you can see the Transcoder going.

<SessionReport version="2" startTime="0" startTimestamp="Aug 06, 2020 06:54:14.246" key="/library/metadata/82391" session="" transcode="">
<User id="1" thumb="https://plex.tv/users/XX/avatar?c=1591672997" title="animosity022" />
<Player address="192.168.1.152" device="OSX" machineIdentifier="" model="bundled" platform="Chrome" platformVersion="84.0" product="Plex Web" remotePublicAddress="XXXX" state="" title="Chrome" vendor="" version="4.34.3" local="1" relayed="0" secure="1" userID="1" />
<Variants>
<Variant id="ff7dd511-208b-4028-9170-989b079e646e" targetBitrate="10000000" context="streaming" sourceVideoCodec="h264" sourceAudioCodec="aac" videoDecision="copy" audioDecision="copy" protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" audioChannels="2" transcodeHwRequested="1" transcodeHwFullPipeline="0">
<Media audioProfile="he-aac" id="83539" videoProfile="high" audioChannels="2" audioCodec="aac" bitrate="3989" container="mp4" duration="565442" height="1080" optimizedForStreaming="1" protocol="dash" videoCodec="h264" videoFrameRate="24p" videoResolution="1080p" width="1920" selected="1">
<Part audioProfile="he-aac" id="142447" videoProfile="high" bitrate="3989" container="mp4" duration="565442" height="1080" optimizedForStreaming="1" protocol="dash" width="1920" decision="transcode" selected="1">
<Stream bitrate="3989" chromaLocation="left" codec="h264" codedHeight="1088" codedWidth="1920" default="1" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)" frameRate="23.975999999999999" height="1080" id="552025" streamType="1" width="1920" decision="copy" location="segments-video" />
<Stream bitrateMode="cbr" channels="2" codec="aac" default="1" displayTitle="English (HE-AAC Stereo)" extendedDisplayTitle="English (HE-AAC Stereo)" id="552026" language="English" languageCode="eng" selected="1" streamType="2" decision="copy" location="segments-audio" />
</Part>
</Media>
</Variant>

and in Tautulli, you can see the transcode buffer line as well.

You aren't transcoding though. You are remuxing. The video and audio streams are being copied to the transcoder temp folder and then placed into a container compatible with your client. Direct streaming uses very little CPU (unlike transcoding), but it still needs a temporary place to put the video/audio streams while it remuxes.

In Tautulli you can look at stream_video_decision in the raw stream info (https://github.com/Tautulli/Tautulli-Wiki/wiki/Debugging) if it says "Copy" then it is remuxing, if it says "Transcode" then it is actually transcoding.

I did not say the video was being trasncoded,

What I said was it was using the Plex Transcoder and the Transcoder settings, which I've proven/shown with the screenshots.

In the log I posted, you can see I said it was being copied / remuxed as that's why I shared the log.

So the first part of your statement is right as it's not being transcoded but is using the Plex Transcoder and the second part is just wrong for Direct Streaming as my logs/screenshots show. That's why I used "Transocder" and not "transcoding".

In other forum a user told me to configure nginx...maybe my location and the vps is causing this buffer. I'm trying to figure out how works.

Yes, a user told me this but is a little hard to configure nginx, I made with this guide and was easier https://techperplexed.blogspot.com//2018/01/part-1-enabling-cloudflare.html

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