rmg / plex-cache-filler

Simple script for forcing playing media into fs cache.
Other
1 stars 0 forks source link

Interesting idea #1

Open pmwoodward3 opened 8 years ago

pmwoodward3 commented 8 years ago

Cool idea, could you expand at all on the performance gains or benefits? I think I'm on your ideal use case. Thanks!

rmg commented 7 years ago

Here's what I've got:

The video library is all on the NAS and then mounted on the iMac as /Volumes/Multimedia where Plex looks for its libraries.

When watching videos, even ones that don't require any transcoding, I found that the video would pause periodically while "waiting for the transcoder to catch up". At first it looked like the problem was network related, but even when run on a wired network the problem persisted. I eventually tracked it down to the way Plex treats the files. Because it looked local to Plex it simply reads the file on-demand. Since the files are actually on a network share, their is more lag in reading the files and they also don't get cached quite as aggressively at the OS level as far as I could tell.

Before this script, whenever I was having a playback problem I would hunt down the file being streamed and just do dd if=/path/to/actual/file.mkv of=/dev/null. Since Plex provides an API that shows what is playing at any given moment, I just automated it.