Can't play video when using SSL plex with google drive encrypted mount

What is the problem you are having with rclone?

Hi All,

I have everything setup and running using a local IP plex instance (http://192.168.X.XXX:32400/web/index.html#) but I can't play any video from the encrypted google drive when accessing plex from a DNS address (https://plex.XXX.duckdns.org/web/index.html) using letsencrypt setup from this website - https://blog.linuxserver.io/2019/04/25/letsencrypt-nginx-starter-guide/#dockernetworking.

I can't seems to find any information on how to solve this. Will anyone be able to help?

What is your rclone version (output from rclone version)

rclone v1.52.2

os/arch: linux/arm
go version: go1.14.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

"Raspbian GNU/Linux 10 (buster), 32bit

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

Google drive

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

    [Unit]
    Description=rclone: Remote FUSE filesystem for cloud storage config %i
    Documentation=man:rclone(1)
    [Service]
    Type=notify
    ExecStartPre=/bin/mkdir -p %h/mnt/%i
    ExecStart=
    /usr/bin/rclone mount
    --cache-dir /srv/dev-disk-by-label-Data/appdata/rclone
    --dir-cache-time 1000h
    --log-level INFO
    --log-file /srv/dev-disk-by-label-Data/appdata/rclone/rclonemount.log
    --poll-interval 15s
    --fast-list
    --vfs-read-chunk-size 32M
    --allow-other
    %i: %h/mnt/%i
    [Install]
    WantedBy=default.target

The rclone config contents with secrets removed.

    type = drive
    client_id = X
    client_secret = X
    scope = drive
    token = X
    team_drive = X
    [crypt]
    type = crypt
    remote = gdrive:/crypt
    filename_encryption = standard
    directory_name_encryption = true
    password = X
    password2 = X

A log from the command with the -vv flag

Do we need plex logs?

can you access plex directly using a public IP address?

yes i can......

I'm gonna assume you can access your plex just fine via its public hostname (https://plex.XXX.duckdns.org/ ) and your issue is only related to playing movies you stored in your encrypted google drive.

My setup is similar, although instead of my main drive I use 5 Team Drives for my media, so I have a systemd unit template, and 5 .conf files

this is the systemd unit file

cat /etc/systemd/system/mnt-rclone\@.service
[Unit]
Description=Mount ${LOCAL_PATH} shared drive
#AssertPathIsDirectory=/mnt/${LOCAL_PATH}
After=network.target

[Service]
User=grimlock
Group=grimlock
Type=simple
PIDFile=/run/rclone/mount-${LOCAL_PATH}.pid
EnvironmentFile=/etc/rclone/%i.conf
ExecStart=/usr/bin/rclone mount \
    --log-level=${LOGLEVEL} --log-file=/var/log/${LOGFILE} \
    --config=/home/USER/.config/rclone/rclone.conf \
    --poll-interval 15s \
    --timeout 1m \
    --cache-chunk-path=/caches/${CACHE_FOLDER}/chunks \
    --cache-dir=/caches/${CACHE_FOLDER}/vfs \
    --cache-db-path=/caches/${CACHE_FOLDER}/db \
    --drive-use-trash=false \
    --user-agent brain \
    --allow-other \
    --drive-use-trash=false \
    --gid=1000 \
    --uid=1000 \
    --stats=0 \
    --tpslimit ${TPSLIMIT} --transfers ${TRANSFERS} \
    --vfs-read-chunk-size ${CHUNK_SIZE} --vfs-read-chunk-size-limit ${CHUNK_TOTAL_SIZE} \
    --vfs-cache-mode writes \
    --dir-cache-time=68400m --cache-info-age=7d \
    --cache-rps=${RPSLIMIT} \
    ${REMOTE}:/ ${LOCAL_PATH}
ExecStop=/bin/fusermount -u ${LOCAL_PATH}
Restart=always
RestartSec=10


[Install]
WantedBy=default.target

This is one of the .conf files

cat /etc/rclone/media_a.conf 
REMOTE=media_a_0
LOCAL_PATH=/mnt/media/media_a
CACHE_FOLDER=media_a
LOGFILE=rclone.log
LOGLEVEL=INFO
TPSLIMIT=10
TRANSFERS=5
RPSLIMIT=10
CHUNK_TOTAL_SIZE=100G
CHUNK_SIZE=16M

And this are the relevant parts of rclone.conf for the remotes

[mediahub_a_7]
type = drive
client_id = XXXXXXXXXXXXXX
client_secret = XXXXXXXXXXXXXXXXXXX
scope = drive
service_account_file = /folder_for_service_account_jsons/17.json
team_drive = XXXXXXXXXXXXXXXXX

[media_a_7]
type = crypt
remote = mediahub_a_7:/
filename_encryption = standard
directory_name_encryption = true
password = XXXXXXXXXXXXXXXXXXXXXXX
password2 = XXXXXXXXXXXXXXXXXXX

[cached_media_a]
type = cache
remote = media_a_7:/
plex_url = https://plex.url.on.the.interwebs.com
plex_username = XXXXXXXXXXXXXXXX
plex_password = XXXXXXXXXXXXXX
info_age = 16h0m0s
plex_token = XXXXXXXXXXXXXXXXXX
chunk_size = 8M

This is currently working for me. I have read recently that rclone performs better if you have:
DRIVE <-> CACHE <-> CRYPT

but I haven't found to switch the other around, but as I said earlier, Plex can play fine.

Let me know if you need help understanding my settings

EDIT: Besides those files, I create cache folders and mount points... e.g. /caches/media_a/{chunks,db,cfs} /mnt/media/media_a

EDIT: One thing I forgot to mention.... I use mergerfs to combine the 5 team drives I use and present that to plex... but you shouldn't need to.

Hi @FragileRasputin, Thanks for the long reply. Is there a way to use VFS? I read that cache is going to be depreciated and VFS performance is better?

Can't find the equivalent of these flags in encrypted settings.

plex_url = https://plex.url.on.the.interwebs.com
plex_username = XXXXXXXXXXXXXXXX
plex_password = XXXXXXXXXXXXXX
info_age = 16h0m0s
plex_token = XXXXXXXXXXXXXXXXXX

hi,

you are correct, the cache backend is soon to be depreciated

these settings are only for cache backend, so you do not need to worry about them

given that you can stream when using a public ip address, that would imply your rclone settings are working.
and you already using the vfs cache with this flag --vfs-read-chunk-size 32M

--fast-list does nothing for a mount, so you can remove it.

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