Best mount settings for streaming ( Plex )

with plexdrive I have in every 2-3 days a crash, like this:

[PLEXDRIVE] [2017-06-10 02:22] DEBUG : Deleting oldest chunk file /home/plex/plextmp/chunks/0B0fKJMA00CwzNlpwY2xwVlo4Szg/178257920
[PLEXDRIVE] [2017-06-10 02:22] DEBUG : Requesting object 0B0fKJMA00CwzT3pqVGo4dEE4dkk bytes 1268776960 - 1274019840 from API
[PLEXDRIVE] [2017-06-10 02:22] DEBUG : Requesting object 0B0fKJMA00CwzT3pqVGo4dEE4dkk bytes 1274019840 - 1279262720 from API
[PLEXDRIVE] [2017-06-10 02:22] DEBUG : Cleaning empty directory /home/plex/plextmp/chunks/0B0fKJMA00CwzR0EyR1I3V0I3RFk
panic: runtime error: invalid memory address or nil pointer dereference

this is how Iā€™m starting it:

plexdrive -v 3 -o allow_other,read_only -t /home/plex/plextmp/ --clear-chunk-max-size=100G /home/plex/ACD/.gdrive

Donā€™t know if my box is in need of a re-install but Google OCAML was crashing once a day as well. Iā€™ve switched back to the new version of PlexDrive 4.0.0. Itā€™s been running for 24 hours without issue so far.

There is an issue I have open where itā€™s not showing all my content so am just waiting to hear back if I need to rebuild the database or something.

Hi guys

What the best (and ban/stuttering free, of course) mount settings if i use Plexdrive and rclone (rclone only encrypt)?

Now i use this:

Plexdrive:

/usr/bin/plexdrive -v 2 /mnt/plexdrive (no switches)

Rclone:

/usr/bin/rclone mount --read-only --allow-other --acd-templink-threshold 0 --stats 1s --buffer-size 1G --timeout 5s --contimeout 5s --max-read-ahead 1G -vv --log-file=/home/vamp/log/rclone_log Plexdrive_crypt:/ /home/vamp/google

hi!
in my case I substituted the RCLONE MOUNT with PLEXDRIVE.
As my DATA was encFS encrypted.
So, if you donā€™t relay on crypt from rclone, you could just forget the rclone mount
And copy your data to the cloud with rclone COPY/MOVE frequently.

All the mount part will be done by plexdrive.

(Plexdrive 4.0 needs mongodb and ā€œ-m localhostā€ switch as well)

I use 4.0 and installed Mongodb, but my systemd script just this(not -m localhost switch):

# /etc/systemd/system/plexdrive.service

[Unit]
Description=Plexdrive
AssertPathIsDirectory=/mnt/plexdrive
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/plexdrive -v 2 /mnt/plexdrive
ExecStop=/bin/fusermount -u /mnt/plexdrive
Restart=on-abort

[Install]
WantedBy=default.target

It need to this use mongodb?

(the mount work well)

The Rclone mount need, because i dont want to re-encrypt everything.

And it need to use some switches on plexdrive or need to delete some with rclone?

Hi,
i have a problem with buffering the start from movies is very fast 1-3 seconds but after a few minutes beginns the buffering. Play- Buffering 1-20seconds - Play - Buffering - ā€¦

i have a root server by hetzner with 1gbit and enough power and at home i have 50mbit download. I use plexdrive and than rclone local to encrypt and fuse mount.

I try plexdrive 4.0 but always by the script plexrebuild-cache from ajki i see an error ā€œCould not open mongo db connectionā€. ok i switch back to plexdrive 3.0 and plexdrive works but the buffering is a big issues for me.

Mount settings:
/usr/bin/plexdrive $MPOINT
-o allow_other,read_only
-t /root/.plexdrive/temp
ā€“refresh-interval=1m
-v 3 &>>$LOGFILE &
sleep 10
/usr/sbin/rclone mount --allow-other crypt: /media/crypt &
sleep 3
/usr/bin/unionfs-fuse -o cow,allow_other,direct_io,auto_cache,sync_read /media/hdd2/LOCAL=RW:/media/crypt=RO /media/Media/ &

I try many mount paramters with --clear-chunk-max-size=100G \ and --chunk-size=26214400 \ but after a few minutes all movies buffering.

what kind of movies?
720p? 1080p? x264? remux? mkv? avi?
what do you see in plexpy? is your machine transcoding? what about disable subtitles?
where is your transcode folder? RAM? or local space?

Iā€™m also at hetzner, but Iā€™ve no such problem.
Plexdrive 3.0 worked for me very well, only I had every 2nd day at night a crash
But with 4.0 and mongodb it was solved

Start, play, rewind, backwind also very fast

  • all movies and all series and i prevered 1080p bluray oder remux
  • the most are mkv
  • its directly play
  • usually it is without subtitles
  • transcoding its in the RAM 8GB with /etc/fstab

i have no crashes for weeks but the buffering problem with 3.0 and i try 4.0 with some guides and mongodb runs with service but i have the ā€œCould not open mongo db connectionā€ error.

nobody can help me?
Always after 3-5 days I have to refresh the cache so it works again

did you actually run mongodb from the command line before running plexdrive? (you have to start it manually after a reboot) i had the same error problem till i figured that out : ) working perfectly now.

Hello Everyone,

I followed this tutorial but noā€™m Iā€™m also trying to use the crypt function. I tried following the tutorial but the first part doesnā€™t work. Iā€™ve got the second part working (crypt). I just changed the setting to point it to the already running plexdrive mount. But I want to have the auto start function enabled in case of a reboot. So could someone please provide a bit more explanation for the first part of the tutorial?

If I run the code as is, I get an empty plexdrive folder (no files visible) which doesnā€™t surprise me since I never entered my clientid & clientsecret. any ideasā€™s?

Thank you!
Soul

Can nobody help me a bit?

If I run the code as is, I get an empty plexdrive folder (no files visible) which doesnā€™t surprise me since I never entered my clientid & clientsecret. any ideasā€™s?

Did you not try entering your information, how do you expect plexdrive to get information without entering a way for it to access it?

Yeah, Iā€™m an idiot. It was point to the wrong folder where plexdrive was inā€¦ Ignore me :).

Related to the topic: the latest beta has an improvement on how rclone cache talks with Plex. It will reconnect if the socket closes: https://beta.rclone.org/v1.41-106-gaaa85916/

+1 for that @remus.bunduc, the reconnect has been a tremendous help for me

hi all Iā€™m hoping you can help. Iā€™ve created my mount using

unionfs-fuse -o cow,allow_other,direct_io,auto_cache,sync_read /mnt/user/movies_adults_upload=RW:/mnt/disks/rclone_vfs/movies_adults_gd=RO /mnt/disks/unionfs_movies_adults

but when I try to add a movie to /mnt/disks/unionfs_movies_adults I get the error below from radarr. I believe itā€™s some sort of permissions error, but I donā€™t know how to start to fix - can anyone help please?

Message
Couldn't import movie /import/usenet/movies/xxxxxxx: Access to the path is denied.

Exception
System.UnauthorizedAccessException: Access to the path is denied.
  at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00116] in <71d8ad678db34313b7f718a414dfcb25>:0 
  at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, System.Boolean overwrite) [0x000e3] in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskProviderBase.cs:245 
  at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileTransactional (System.String sourcePath, System.String targetPath, System.Int64 originalSize, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x0008f] in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:477 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, NzbDrone.Common.Disk.DiskTransferVerificationMode verificationMode) [0x003c2] in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:299 
  at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, NzbDrone.Common.Disk.TransferMode mode, System.Boolean overwrite, System.Boolean verified) [0x0000e] in C:\projects\radarr-usby1\src\NzbDrone.Common\Disk\DiskTransferService.cs:183 
  at NzbDrone.Core.MediaFiles.MovieFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.MovieFile movieFile, NzbDrone.Core.Movies.Movie movie, System.String destinationFilePath, NzbDrone.Common.Disk.TransferMode mode) [0x0012b] in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieFileMovingService.cs:120 
  at NzbDrone.Core.MediaFiles.MovieFileMovingService.MoveMovieFile (NzbDrone.Core.MediaFiles.MovieFile movieFile, NzbDrone.Core.Parser.Model.LocalMovie localMovie) [0x00052] in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieFileMovingService.cs:82 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeMovieFile (NzbDrone.Core.MediaFiles.MovieFile movieFile, NzbDrone.Core.Parser.Model.LocalMovie localMovie, System.Boolean copyOnly) [0x000b0] in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:69 
  at NzbDrone.Core.MediaFiles.MovieImport.ImportApprovedMovie.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.MovieImport.ImportMode importMode) [0x0026e] in C:\projects\radarr-usby1\src\NzbDrone.Core\MediaFiles\MovieImport\ImportApprovedMovie.cs:110

Looks like the permissions are wrong at:

/mnt/user/movies_adults_upload

Best to start a new thread than to tag an old threadā€¦

thought Iā€™d post here as all the experts seemed to be here :wink:

Somehow Iā€™ve managed to fix - Iā€™ve finally got everything working how I want it. Loving it!

I started reading this post a few days ago around a campfire while camping (I know, amazing i had cell service), and kinda lost track and never saw a definitive ā€œthis is generally best for plexā€

Was there a determination as to the best settings to be used for streaming plex?

if it helps here are my settings with a few pieces redacted -


[gdrive]
type = drive
client_id =
client_secret =
scope = drive
root_folder_id =
service_account_file =
token = {ā€œaccess_tokenā€:ā€œREMOVEDā€}


[gcrypt]
type = crypt
remote = gcache:/crypt
filename_encryption = standard
directory_name_encryption = true
password = *** ENCRYPTED ***
password2 = *** ENCRYPTED ***


[gcache]
type = cache
remote = gdrive:/gdrive
plex_url = http://sub.publicdomain.com:12153
plex_username = plexusername
plex_password = *** ENCRYPTED ***
chunk_size = 5M
info_age = 24h
chunk_total_size = 10G ā€”(Can this be increaded to any size???)ā€”
plex_token = plextoken

Mounted with -
rclone mount --allow-non-empty gcrypt: ~/mnt/gdrive &

I then pointed my plex media folder for movies to -/home/USERNAME/mnt/gdrive/Movies

Plex does find my movies Iā€™ve uploaded,
GDrive shows encrypted files and folders when i brows through a browser

I just read all these other settings to improve streaming possibly and am unsure if they are needed?

I havent tested too much yet, Iā€™d just like to rule out any rclone settings and make sure the cache is being used so i dont hit a API ban

Iā€™m on the US west coast, my seedbox Iā€™m using for plex is a box located in the US.
I get great Up/Down speeds with the provider.

If I should start my own post I will do so.

1 Like