PLEX-Optimization to GDrive

Hi There

when mounting with
rclone mount --allow-other --buffer-size 1G --no-traverse drive: /gdrive &
and start to optimize a file by PLEX, it runs up to 100%, but then the following message appears in putty:
2017/09/07 09:20:02 ERROR : TV Shows/Plex Versions/Optimized for Mobile/The 100/.inProgress/S02E16.mp4.45: WriteFileHandle.Write can't seek in file
2017/09/07 09:20:23 ERROR : TV Shows/Plex Versions/Optimized for Mobile/The 100/.inProgress: Dir.Remove failed to remove directory: directory not empty

Can anyone help me with this?

Regards
Perstin

do not MOUNT with rclone

use PLEXDRIVE for mount

and rclone for “MOVE” or COPY files to gdrive

Thanks for the reply @alneven.
As far as I see, plexdrive is read-only. How can I get the optimized/transcended files to Google drive so plex recognizes them?
My vps hast 50gb ssd, which should be more than enough?!

Regards
Perstin

you can create a “local” folder
and the gdrive

and “merge” both with unionfs
for example as “media”
and point PLEX to that media folder

in this case “local” is RW
gdrive R-only

PLEX will “optimize” to local
which you can “upload”/move with rclone to the gdrive encrypted

why would you optimize your files?
for iphone? or such?
are you planning to doing such thing?

or do you mean just the normal transcode process from PLEX?
as that is on-the-fly and can be done in RAM or on the “root” system disc

I have a 8-core 8GB-Scaleway-VPS, which is having trouble to stream, scan and add Metadata, so I want to pre-transcode the shows I’m watching and optimize them for TV (X1-App). The next step would be transcodingfor mobile.

Can you send me (to) a tutorial/how-to, which points out the essential steps?
Did not really find any quick-n-dirty thingy. Which should work for me.

Right now:
installed plex
Installed rclone
Mounted rclone to /gdrive
Added the libraries in /gdrive
Done.

basically this is it:

just replace ACD with gdrive
and "rclone mount" with PLEXDRIVE

Thanks, mounting worked. but it seems like plex is not a friend of transcoding to this:

#626 Sep 11, 2017 07:59:32.304 [0x7fd392ffe700] DEBUG - Completed: [83.76.36.202:64805] 200 GET /playQueues/1 (7 live) TLS GZIP 26ms 1006 bytes (pipelined: 2)
#627 Sep 11, 2017 07:59:32.308 [0x7fd38c7fe700] ERROR - Error creating directory /gdrive/TV Shows/Plex Versions/Optimized for Mobile/Lucifer: boost::filesystem::create_directory: Permission denied: "/gdrive/TV Shows/Plex Versions/Optimized for Mobile/Lucifer"
#628 Sep 11, 2017 07:59:32.308 [0x7fd38c7fe700] ERROR - TranscodeJobManager: [Running] directory is not writable: /gdrive/TV Shows/Plex Versions/Optimized for Mobile/Lucifer
#629 Sep 11, 2017 07:59:32.309 [0x7fd38c7fe700] DEBUG - BPQ: setOverrideState for generator 97: failed/diskUnwritable?

tried everything, from chmod 777, over chown plex to mount by plexdrive with default root permissions (w/o --uid/–gid)… :S

edit:
Plexdrive: /plexdrive -o allow_other --refresh-interval=1m /.gdrive &
FuseFS: unionfs-fuse -o cow,allow_other /.localmedia=RW:/.gdrive=RO /gdrive

edit2:

drwxr-xr-x 26 root root 4096 Sep 11 07:01 .
drwxr-xr-x 26 root root 4096 Sep 11 07:01 ..
drwxr-xr-x 2 root root 4096 Sep 7 09:34 bin
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot
drwxr-xr-x 11 root root 13100 Sep 11 07:56 dev
drwxr-xr-x 73 root root 4096 Sep 11 07:56 etc
drwxrwxrwx 1 root root 4096 Sep 11 07:13 gdrive
drwxr-xr-x 1 root root 0 May 18 17:19 .gdrive
drwxr-xr-x 3 root root 4096 Sep 4 08:50 home
drwxr-xr-x 12 root root 4096 Sep 4 08:08 lib
drwxr-xr-x 2 root root 4096 Sep 5 02:52 lib64
drwxrwxrwx 2 root root 4096 Sep 11 07:13 .localmedia
drwx------ 2 root root 16384 Jan 5 2017 lost+found
drwxr-xr-x 2 root root 4096 Dec 9 2016 media
drwxr-xr-x 2 root root 4096 Dec 9 2016 mnt
drwxr-xr-x 3 root root 4096 Sep 6 09:05 opt
-rwxr-xr-x 1 root root 10546476 Jun 9 13:56 plexdrive
drwxr-xr-x 2 plex root 4096 Sep 11 07:54 .plexdrive
dr-xr-xr-x 117 root root 0 Sep 11 07:55 proc
drwx------ 9 root root 4096 Sep 11 07:04 root
drwxr-xr-x 17 root root 600 Sep 11 07:56 run
drwxr-xr-x 2 root root 4096 Sep 7 09:34 sbin
drwxr-xr-x 2 root root 4096 Dec 9 2016 srv
dr-xr-xr-x 12 root root 0 Sep 11 07:55 sys
drwxrwxrwt 9 root root 4096 Sep 11 08:10 tmp
drwxr-xr-x 10 root root 4096 Jan 5 2017 usr
drwxr-xr-x 11 root root 4096 Jan 5 2017 var

/.localmedia is the loca path, for transcodings (will rclone copy from there)
/.grive is the mountpoint for plexdrive
/grive is the folder where I merge /.localmedia (RW) and /.gdrie (RO) by FuseFS

Think the problem was that I mounted everything with root. After messing with chown/chmod and mounting with plex, i can at least convert, there are 24 minutes left this conversion/optimization - I’ll edit it in this post.

Thanks for your help, @alneven !

EDIT: works now. damn permissions in linux ^-^

Nice.

One suggestion. I wouldn’t optimize/transcode directly to PLEXDRIVE mount
I would optimize first LOCAL
And rclone move it to the “cloud”