Thank's a lot for your thoughts and suggestions!
Unfortunately Plex cannot store those optimizations temporarily on a local drive and move them afterwards. Even a manual move after the creation is not possible as it "breaks" the Plex database. Plex basically creates the optimized file at its designated location and expects it to be there. The path is stored in the sqlite db of plex and if the file is moved Plex won't find it.
You can tell Plex, where to store the optimized file (independent of the file location of the original file) as long as the folder you designate is included in the Plex Library Folders.
The Union FS solution suggested by @thestigma sounds great, however it is not ideal for my purpose.
I still want some files to upload instantly. I basically have the following workflow:
MacMini with Sab, Sonarr, Radarr, Rclone.
Rclone mounts my gdrive root to Volumes/gdrive
- Sab downloads (temporary folder and final folder on local disk),
- a Sabnzbd post processing script moves the completed, extracted etc. files to gdrive/UploadDump
- Radarr or Sonarr respectively watch gdrive/Uploaddump and move the files to their final destination (gdrive/Media), notify plex to initiate a library refresh
- PMS on a different machine on the same network has access to gdrive/media over smb (I know it is not optimal but it works reliable).
I still want the instant upload from sabnzbd after finishing its downloads, so new stuff gets picked up shortly after the downloads finish. (Upload speed is roughly 500mbit, so speed is quite ok). Therefore combining a merger-fs "local upload dump", with scripted delayed general uploads seems not optimal.
I basically need only one folder on gdrive with delayed uploads and thought that might be possible to implement via a second mount? Reworking the folder structure: e.g. rclone mount 1 has gdrive/Media as root. In Gdrive/Media we have all the media files and a upload/dump. rclone mount 1 with mount location /Volumes/gdrive gets shared over smb to PMS.
Rclone mount 2 points to gdrive/delayedupload as its root folder gdrive/delayedupload stores all the optimized versions and PMS has also access over smb to this mount?
Would this work with the following commands for rclone mount 2
--cache-tmp-upload-path=~/rclone/tmp_upload
--cache-tmp-wait-time=600m \
assuming all optimizations are finished within 10 hours. Or is there maybe even a way to do this with a vfs-cache mount?
Best regards