As a huge fan of Plex and it’s community and huge fan of Docker and it’s community I figure - why not combine these two awesome things ?!!
Plex Remote Transcoder is here:
Instructions for deploying to Ubuntu are here:
Tim Haan’s Plex Server container is here:
The initial goal would be to create a (relatively) simple container that abstracts Tim’s container, adding requirements for PRT, and then build a second container for the slaves.
Here’s the action-plan as I see it:
Setup NFS mount on Plex Server Host
Add Plex UID and GID for NFS on Host
Start Plex Server container mounting the config and data volumes from NFS
Setup NFS mount on PRT Slave Host
Add Plex UID and GID for NFS to match Host
Start PRT Slave container mounting the config and data volumes from NFS
I’ve created a Github project that’s a combination of Tim’s and Weston’s work wrapped up with a shell script:
This will be where I will begin. If you have any comments/suggestions and/or want to help knock this out of the park then feel free. There are no such thing as bad ideas.
Though, i am curious why you try to mount NFS share everywere…
Network shares should be mounted to the docker host and used as volumes in order to mount the shares into the docker containers. Actualy this will even result in less network traffic
This is what I need! I have my main plex box that gets hammered sometimes but my Mac desktop with tons of power sits idel. I might have to get docker on the Mac and try this out, looks very promising.
The NFS requirement is, unfortunately, a requirement of PRT at this point. I’ve been chin-scratching about how one might work around this, but haven’t dug in too deeply yet.
FWIW, my problem is similar to OP. My Plex machine is relatively wimpy, but my desktop is mostly idle, and far more capable.
@ipmcc said:
The NFS requirement is, unfortunately, a requirement of PRT at this point. I’ve been chin-scratching about how one might work around this, but haven’t dug in too deeply yet.
yep, but you mount the NFS shares on the docker host and mount them inside the containers as volumes (actually mount bind a docker host path to a container path).
@ipmcc said:
The NFS requirement is, unfortunately, a requirement of PRT at this point. I’ve been chin-scratching about how one might work around this, but haven’t dug in too deeply yet.
yep, but you mount the NFS shares on the docker host and mount them inside the containers as volumes (actually mount bind a docker host path to a container path).
Not sure about docker but why not just use an ftp file system mount like curlftpfs or ssh file system mount like sshfs?
My work is based off the official plex docker images.
It is in a working state, as I’m currently running the master on my Synology NAS, with the slave on Ubuntu 16.04. I originally wanted to run my slave in Windows, but Docker for Windows cannot mount network drives yet
I’m looking for contributors to help with documentation and testing. PRs welcome
Good job! I played with it for a little bit and I’ve got the master and slave working. I’ll see if I can find some time to help simplify the SSH process.
@kjenney69 said:
Good job! I played with it for a little bit and I’ve got the master and slave working. I’ll see if I can find some time to help simplify the SSH process.
I had the idea that the slaves could register to the master, instead of the other way around.
slave starts up
connect to master via SSH (keys are in /config directory)
call prt add_host and add itself
register itself as known_host using ssh-keygen
This would support any number of slaves, and the master wouldn’t need to know about them when setting up.
@doughnet said:
Will the docker version work with multiple slaves communicating with the same master? I.E. four slaves and one master.
Yep. Under the hood the master is just plex with prt installed. If you docker exec into the container you can run prt add_host yourself.
@doughnet said:
I had the idea that the slaves could register to the master, instead of the other way around.
Having the slaves register with the master makes the most sense!
I submitted a Pull Request just now that will remove the requirement to register in known_hosts. So adding a new slave will be a 3 step process that can be automated/started when the container is started.
@doughnet said:
I had the idea that the slaves could register to the master, instead of the other way around.
Having the slaves register with the master makes the most sense!
I submitted a Pull Request just now that will remove the requirement to register in known_hosts. So adding a new slave will be a 3 step process that can be automated/started when the container is started.
That’s awesome. Able to give details on how it does the transcoding:
Does it split all streams and split transcoding across all slaves?
Or
Does it take a single steam and dedicates that to a single slave?
@doughnet said:
I had the idea that the slaves could register to the master, instead of the other way around.
Having the slaves register with the master makes the most sense!
I submitted a Pull Request just now that will remove the requirement to register in known_hosts. So adding a new slave will be a 3 step process that can be automated/started when the container is started.
That’s awesome. Able to give details on how it does the transcoding:
Does it split all streams and split transcoding across all slaves?
Or
Does it take a single steam and dedicates that to a single slave?
It works exactly the same as Plex Remote Transcoder, except that it’s containerized using docker.
@doughnet said:
I had the idea that the slaves could register to the master, instead of the other way around.
Having the slaves register with the master makes the most sense!
I submitted a Pull Request just now that will remove the requirement to register in known_hosts. So adding a new slave will be a 3 step process that can be automated/started when the container is started.
That’s awesome. Able to give details on how it does the transcoding:
Does it split all streams and split transcoding across all slaves?
Or
Does it take a single steam and dedicates that to a single slave?
It works exactly the same as Plex Remote Transcoder, except that it’s containerized using docker.
I’m building out a Vagrant cluster to test slave registration. I’m really interested in an EC2 micro cluster with on-demand transcoding…but that’s the next step