Hi all!
I have got a question
I use Windows 10 and rclone 1.51.0
I record my gameplays, encode them and upload them on GDrive. So, I do those things:
Record gameplays: they are in the folder "recorded" (NOT copied by rclone to gdrive)
Encode gameplays: put them in the folder "encoded" (copied by rclone to gdrive)
So, I was thinking about the best way to optimize those things with rclone. I use Handbrake to encode
What happens if I encode a video in the folder "recorded" and set the output to the folder "encoded"? So, does rclone starts the copy while the file is still being written? Can this cause some file corruption or problems with rclone?
Up, I did some tests and strange things happens if I set the output folder to a mounted gdrive folder or if I set as input a file on a mounted gdrive folder, so I can't use those ways.
So, the question is just one.
What happens if I encode a video in the folder "recorded" and set the output to the folder "encoded" (remember that "encoded" is always copied to gdrive)? So, does rclone starts the copy while the file is still being written? Can this cause some file corruption or problems with rclone?
I think that
If upload speed < writing speed (in mb/s), than there aren't problems, because rclone will always be "behind" the encoding
But what happens if
Upload speed > writing speed? So, rclone will "finish to upload the file" while it is still being written. Also what happens if I pause the encoding?
Rclone shouldn't start the copy while the file is being written unless the writing app opens and closes it multiple times, which I guess it might. Rclone should pause the app while the upload is happening so I think that the worst that will happen is that the file will get uploaded multiple times.
You'll probably need --vfs-cache-mode writes for your app to work properly I'd guess.
This is my code rclone mount "Roba - ccsf:" X: --vfs-cache-mode writes --cache-dir "D:\Programs\ProgrammiNonInstallati\Rclone\VSFCache"
I use "Handbrake" to encode
So, I tried to:
Encode a local video putting the output to X: (mount). Handbrake used 100% CPU (normally) but blocked at 99% for 2-3 minutes, than the file just disappeared from the mount.
1b) Again, encode a local video with output to X:. Worked good, Handbrake didn't block at 100% but the output file was corrupted and couldn't open it.
Meanwhile, the 1) file re-appeared in X: and it was ok, I can open it
Used the 1) file (on mount) to encode it putting the output on X:. So, input from mount and output into mount. Handbrake used only 15% CPU (strange thing), the output was corrupted
So, I'm not an expert and I don't know what's happening here, but 2 files on 3 got corrupted doing this process so this isn't a reliable process I think
So, I can't use mounts. I have got only a question: what happens if I encode a local video putting the output into a local folder but that rclone copies to GDrive?
command:
rclone.exe mount --vfs-cache-mode=minimal --file-perms=0777 wasabieast2:handbrake01 x:
handbrake location=C:\data\M\handbrake\handbrake\HandBrake.exe
source=C:\data\rclone\scripts\rr\other\test\test.mp4
dest=x:\encoded\test.from.local.mkv
using vlc, i was able to play x:\encoded\test.from.local.mkv
handbrake location=C:\data\M\handbrake\handbrake\HandBrake.exe
source=x:\recorded\test.mp4
dest=x:\encoded\test.from.mount.mkv
using vlc, i was able to play x:\encoded\test.from.mount.mkv
in addition, i copied handbrake folder to x:
i was able to run handbrake.exe from x:
handbrake location=x:\handbrake\HandBrake.exe
source=x:\recorded\test.mp4
dest=x:\encoded\test.from.mount.mkv
using vlc, i was able to play x:\encoded\test.from.mount.mkv
--file-perms=0777 - i do not think that is your problem.
it is an obscure flag, most users do not know about it and do not need it.
normally, a rclone mount can be use as a virtual drive.
you can copy files, delete files, and your windows programs can access those files, as if local.
but you cannot execute a program on the x:
when you run handbrake, you run it from local hard drive, c:.
but with that flag, you get an extra feature, the ability to run programs that are stored on the mount.
as i demonstrated, i execute handbrake from that x:, not from local c: drive.
i do not use mounts at all for anything as mounts are much more finicky and slow.
when a windows user has a problem with mount, i try to replicate it, to make sure there are no bugs with the mount command on windows. my small contribution to rclone.
do what i would do - write a simple script.
run handbrake.exe and save encoded files to c:\path.to.encoded.folder\