Jump to content

[TOOL] RClone Cache Pre-Caching for Emby


jrwr

Recommended Posts

I have written a little webhook server to help with getting better performance if you are using rclone cache mounts and emby

 

This will create a small webserver to be put on the same machine as the rclone cache mount. when media is being played, it will tell rclone to cache the entire file to disk and help eliminate buffering.

 

This mimics the behavior that rclone cache has when setup to use Plex Pre-caching.

 

https://github.com/JRWR/emby-rclone-precache/blob/master/run.py

 

I've been testing it with my rather busy media server and it has made the experience a ton better.

 

  • Like 2
Link to comment
Share on other sites

cuzz1369

I have written a little webhook server to help with getting better performance if you are using rclone cache mounts and emby

 

This will create a small webserver to be put on the same machine as the rclone cache mount. when media is being played, it will tell rclone to cache the entire file to disk and help eliminate buffering.

 

This mimics the behavior that rclone cache has when setup to use Plex Pre-caching.

 

https://github.com/JRWR/emby-rclone-precache/blob/master/run.py

 

I've been testing it with my rather busy media server and it has made the experience a ton better.

Thanks for the share.

 

Sent from my SM-G965W using Tapatalk

Link to comment
Share on other sites

Spaceboy

I have written a little webhook server to help with getting better performance if you are using rclone cache mounts and emby

 

This will create a small webserver to be put on the same machine as the rclone cache mount. when media is being played, it will tell rclone to cache the entire file to disk and help eliminate buffering.

 

This mimics the behavior that rclone cache has when setup to use Plex Pre-caching.

 

https://github.com/JRWR/emby-rclone-precache/blob/master/run.py

 

I've been testing it with my rather busy media server and it has made the experience a ton better.

nice and thanks! Still working on getting all my data up to gdrive but this will be great!
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
laris11

Hey @@jrwr thanks for the great work. I have a problem, every time that try to run the command cache/fetch I receive this error, do you know what could be the problem. I have last rclone and i mount the rclone with the --rc and the --rc-addr as default:

 

2020/03/21 14:22:31 Failed to rc: Failed to read rc response: 404 Not Found: {

"error": "couldn't find method \"cache/fetch\"",

"input": {},

"path": "cache/fetch",

"status": 404

}

 

Mar 21 13:34:44 emby run.py[31129]:         "input": {

Mar 21 13:34:44 emby run.py[31129]:                 "chunks": ":",

Mar 21 13:34:44 emby run.py[31129]:                 "file": "***/Media/TV/Outlander/Season 05/Outlander - S05E01 - The Fiery Cross - 4K_U

Mar 21 13:34:44 emby run.py[31129]:         },

Mar 21 13:34:44 emby run.py[31129]:         "path": "cache/fetch",

Mar 21 13:34:44 emby run.py[31129]:         "status": 404

Edited by laris11
Link to comment
Share on other sites

  • 3 weeks later...
tomimc

Hi i use rclone with vfs,

Woks with vfs? Or only with cache settings ?

 

Enviado desde mi MI 5 mediante Tapatalk

Link to comment
Share on other sites

  • 1 month later...
kikinjo

Yes great news :) I use cache backed without an issues, it just needs some tuning and it is good and stable

Link to comment
Share on other sites

  • 4 weeks later...
rohit_11

Yes great news :) I use cache backed without an issues, it just needs some tuning and it is good and stable

hi can you please explain what are you tweaking settings ..I'm new to rclone.. thanks in advance!ings

Edited by rohit_11
Link to comment
Share on other sites

kikinjo

hi can you please explain what are you tweaking settings ..I'm new to rclone.. thanks in advance!ings

Hi @@rohit_11

 

Here is my complete config of rclone.conf and servise file for systemd on linux for auto start / mount

I use crypted remote with cache backend, and with emby everything is working really good.

Use rclone forum, there is so much good documentation explaining every option.

 rclone conf:

 [gd2]
type = drive
client_id = (your id)
client_secret = (your secret)
scope = drive
token = (token)
root_folder_id = 0APDQcyXx3HaiUk9PVA

[gcache2]
type = cache
remote = gd2:/gd2
chunk_size = 16M
info_age = 1d
chunk_total_size = 400G

[gcrypt2]
type = crypt
remote = gcache2:/gd2
filename_encryption = standard
directory_name_encryption = true
password = pass1
password2 = salt1

 gdrive.service file for ubuntu automount

[Unit]
Description=gdrive2mount
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
KillMode=none
Environment=RCLONE_CONFIG=/home/myuser/.config/rclone/rclone.conf

ExecStart=/usr/bin/rclone mount gcrypt2: /mnt/md5/gdrive2 \
--config /home/myuser/.config/rclone/rclone.conf \
--allow-other \
--dir-cache-time=160h \
--cache-info-age=168h \
--buffer-size=96M \
--cache-db-purge \
--cache-db-path /home/myuser/_rclonecache/gdrive2 \
--cache-tmp-upload-path /mnt/md5/_uploadtempgdrive2 \
--log-level INFO \
--log-file /home/myuser/gdrive2.log \
--fast-list \

ExecStop=/bin/fusermount -uz /mnt/md5/gdrive2
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
Edited by kikinjo
  • Like 1
Link to comment
Share on other sites

tuyoplex

nice and thanks! Still working on getting all my data up to gdrive but this will be great!

me puedes ayudar ?

Link to comment
Share on other sites

rohit_11

 

Hi @@rohit_11

 

Here is my complete config of rclone.conf and servise file for systemd on linux for auto start / mount

I use crypted remote with cache backend, and with emby everything is working really good.

Use rclone forum, there is so much good documentation explaining every option.

 rclone conf:

 [gd2]
type = drive
client_id = (your id)
client_secret = (your secret)
scope = drive
token = (token)
root_folder_id = 0APDQcyXx3HaiUk9PVA

[gcache2]
type = cache
remote = gd2:/gd2
chunk_size = 16M
info_age = 1d
chunk_total_size = 400G

[gcrypt2]
type = crypt
remote = gcache2:/gd2
filename_encryption = standard
directory_name_encryption = true
password = pass1
password2 = salt1

 gdrive.service file for ubuntu automount

[Unit]
Description=gdrive2mount
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
KillMode=none
Environment=RCLONE_CONFIG=/home/myuser/.config/rclone/rclone.conf

ExecStart=/usr/bin/rclone mount gcrypt2: /mnt/md5/gdrive2 \
--config /home/myuser/.config/rclone/rclone.conf \
--allow-other \
--dir-cache-time=160h \
--cache-info-age=168h \
--buffer-size=96M \
--cache-db-purge \
--cache-db-path /home/myuser/_rclonecache/gdrive2 \
--cache-tmp-upload-path /mnt/md5/_uploadtempgdrive2 \
--log-level INFO \
--log-file /home/myuser/gdrive2.log \
--fast-list \

ExecStop=/bin/fusermount -uz /mnt/md5/gdrive2
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

 

Thanks buddy!  :)

Edited by rohit_11
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...