Best mount settings for streaming ( Plex )

@pushnoi

Maybe we need to ask @ncw to implement chunking / pre-fetching so that it splits the download into multiple threads to reconstitute the file…

I think node-gdrive-fuse does this for Google Drive.

Yup. That sounds good. Although, I haven’t had any issues after moving to EU servers (which makes more sense for me anyway, since I’m over in The Netherlands). That and I use my local storage on the server as well, creating a ‘buffer’ of 3TB.

What is the curl equivalent for this script? I attempted to change it, but wasn’t successful.

`

So made an account in .co.uk to try out speed from Hetzner to EU and US for single copy.
Here are the results:

WRITE to amazon:
EU single file:
Transferred: 875.969 MBytes (14.440 MBytes/s)
US single file:
Transferred: 289.219 MBytes (4.671 MBytes/s)

READ from amazon:
EU single file:
Transferred: 1.627 GBytes (27.309 MBytes/s)
US single file:
Transferred: 1.356 GBytes (22.212 MBytes/s)

3 times faster for single file to copy to EU servers than US…

What is the problem ?

Here I remade it using CLI command instead of curl calls, however this will take longer as with curl the call is being made and scripts processed to next request with CLI call it will wait until analyzation is done before continuing.

#!/usr/bin/env python3
from subprocess import call
import os
import requests
import sqlite3
import sys

conn = sqlite3.connect(’/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db’)

c = conn.cursor()
c.execute(‘select metadata_item_id from media_items where bitrate is null’)
items = c.fetchall()
conn.close()

print("To analyze: " + str( len(items) ))

for row in items:
os.system('LD_LIBRARY_PATH=/usr/lib/plexmediaserver PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application\ Support /usr/lib/plexmediaserver/Plex\ Media\ Scanner -a -o ’ + str(row[0]))
os.system(‘sleep 1’)
print(str(row[0]))

p.s Since its python it could be when you copy paste some tabs are not ok.

@Ajki

Your script you pasted is missing the # sign at the start. So if they copy paste, not only are the tabs missing, but the script will never run.

Maybe put it on gist.github.com

That’s because of the forum settings. It reads the hashtag sign and makes it a “headline”

Yes, I know, but it would appear many people in here are new at this stuff so they wouldn’t necessarily know to put that if the copy/paste

you’re right. Good idea to point it out to others :slight_smile:

I would recommend switching to EU account if you’re using Hetzner. Although you can max out your connect at 100MB/s to US server by increasing --transfers but having good read speed of individual files are important for streaming.

Ajki,

I’m using ubuntu. I get the following error while attempting to run the script. I changed the name and plex token for security reasons. So do I need to use a curl call or can I use the original script?

I added a ‘#’ to the first line before the ‘!’

File “./plexanalyse.py”, line 14
requests.put(url=‘http://name.com:32400/library/metadata/’ + str(row[0]) + ‘/analyze?X-Plex-Token=xxxxxx’)
^
IndentationError: expected an indented block

** Update **

I resolved it. I actually just added a space for the code

@Ajki

So you’re running @ rclone’s encryption now right? Is it an improvement over encfs?

Not yet, just came back from vacation today and Iam still waiting for new server that I ordered.
( it will take some time for PCIe SSD delivery ) I plan to run two server for a while the old/current one on ENCFS and the new one with crypt.

However I did a lot of testing locally and so far the playback performance is more or less the same.
The main reason Iam switching to crypt is far cleaner setup and far less IO writes since its beyond annoying to wait for ages when coucpotato and sonarr are moving files concurrently so instead of instant file move I need to wait for couple of minutes so ENCFS encrypt fhose files locally.

Right… that makes sense. Plus I guess you’ll be able to use the Windows rclone version as well if need be, right? Mmm… might switch as well then.

If you have limited bandwith I suggest you do it on 3€ scaleways VPS.

Yeah, I was thinking the same thing. I noticed you only used --transfer=5 @ your other topic. This to prevent the abuse trigger @ acd?

I also used transfers 5 as you dont get much ram and rclone can be quite demanding :stuck_out_tongue:

Right. Well. Might just use my Hetzner machine. It’s almost the end of the month and got enough TB’s bandwidth to spare still. Plus I don’t have your enormous library =)

Btw, when doing a rclone move to acd with rclone’s encryption, will the terminal output be readable? As in do you see the unencrypted file names?

I cloned ACD to Gdrive (30TB) worth using --transfers 100 and never got a ban [quote=“pushnoi, post:182, topic:344, full:true”]

Right. Well. Might just use my Hetzner machine. It’s almost the end of the month and got enough TB’s bandwidth to spare still. Plus I don’t have your enormous library =)

Btw, when doing a rclone move to acd with rclone’s encryption, will the terminal output be readable? As in do you see the unencrypted file names?
[/quote]

Yes thats also one thing that annoyed the shit out of me with ecnfs not to mention you cant really use rclone filter because of it.