# Plex Remote Transcoder - Dockerized

**URL:** <https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [May 16, 2016, 3:19pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269 "2016-05-16T15:19:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjenney69](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kjenney69/32/5155_2.png) [@kjenney69](https://forums.plex.tv/u/kjenney69)\
**Post date:** [May 16, 2016, 3:19pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/1 "2016-05-16T15:19:09Z")

</div>

# Dockerizing Plex Remote Transcoder

This is a fork of this thread:

> **[Plex Remote Transcoder - A distributed transcoding backend for Plex](https://forums.plex.tv/discussion/178320/plex-remote-transcoder-a-distributed-transcoding-backend-for-plex)**
>
> I just came across this repo and couldn’t find a post on here about it. I AM NOT THE DEVELOPER, but I am really excited about this and have been waiting for something like this. Would love to hear peoples take/opinion on this project.

## 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** :

> **[wnielson/Plex-Remote-Transcoder](https://github.com/wnielson/Plex-Remote-Transcoder)**
>
> A distributed transcoding backend for Plex. Contribute to wnielson/Plex-Remote-Transcoder development by creating an account on GitHub.

**Instructions for deploying to Ubuntu are here** :

> **[wnielson/Plex-Remote-Transcoder](https://github.com/wnielson/Plex-Remote-Transcoder/wiki/Ubuntu-Install)**
>
> A distributed transcoding backend for Plex. Contribute to wnielson/Plex-Remote-Transcoder development by creating an account on GitHub.

**Tim Haan’s Plex Server container is here** :

> **[timhaak/docker-plex](https://github.com/timhaak/docker-plex)**
>
> This is a Dockerfile to set up Plex Media Server https://plex.tv/ - timhaak/docker-plex

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:

1. Setup NFS mount on Plex Server Host
2. Add Plex UID and GID for NFS on Host
3. Start Plex Server container mounting the config and data volumes from NFS
4. Setup NFS mount on PRT Slave Host
5. Add Plex UID and GID for NFS to match Host
6. 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:

> **[mastermindg/docker-plexremote](https://github.com/mastermindg/docker-plexremote)**
>
> Plex Remote Transcoder Dockerized. Contribute to mastermindg/docker-plexremote development by creating an account on GitHub.

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.

---

<div class="post-metadata">

**Author:** ![kopfpilot](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kopfpilot/32/6687_2.png) [@kopfpilot](https://forums.plex.tv/u/kopfpilot)\
**Post date:** [June 28, 2016, 8:56pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/2 "2016-06-28T20:56:26Z")

</div>

The idea is pretty charming 🙂

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 🙂

---

<div class="post-metadata">

**Author:** ![deevus](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@deevus](https://forums.plex.tv/u/deevus)\
**Post date:** [August 19, 2016, 2:11pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/3 "2016-08-19T14:11:08Z")

</div>

I’ll be watching the development of this. +1

---

<div class="post-metadata">

**Author:** ![detz](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/detz/32/177281_2.png) [@detz](https://forums.plex.tv/u/detz)\
**Post date:** [September 14, 2016, 2:22am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/4 "2016-09-14T02:22:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ipmcc](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ipmcc/32/83646_2.png) [@ipmcc](https://forums.plex.tv/u/ipmcc)\
**Post date:** [September 29, 2016, 10:06pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/5 "2016-09-29T22:06:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kopfpilot](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kopfpilot/32/6687_2.png) [@kopfpilot](https://forums.plex.tv/u/kopfpilot)\
**Post date:** [October 8, 2016, 8:56am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/6 "2016-10-08T08:56:18Z")

</div>

> @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).

---

<div class="post-metadata">

**Author:** ![doughnet](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doughnet](https://forums.plex.tv/u/doughnet)\
**Post date:** [October 8, 2016, 2:13pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/7 "2016-10-08T14:13:16Z")

</div>

> @kopfpilot said:
> 
> > @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?

---

<div class="post-metadata">

**Author:** ![kopfpilot](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kopfpilot/32/6687_2.png) [@kopfpilot](https://forums.plex.tv/u/kopfpilot)\
**Post date:** [October 13, 2016, 6:06pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/8 "2016-10-13T18:06:25Z")

</div>

I am mouting my shares using CIFS.  
Use whatever meets your needs 🙂

---

<div class="post-metadata">

**Author:** ![dan.franks\_gmail.com](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dan.franks\_gmail.com](https://forums.plex.tv/u/dan.franks_gmail.com)\
**Post date:** [December 23, 2016, 8:04pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/9 "2016-12-23T20:04:58Z")

</div>

Sweet! Now we can apply this idea to the official plex docker image.

---

<div class="post-metadata">

**Author:** ![deevus](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@deevus](https://forums.plex.tv/u/deevus)\
**Post date:** [December 28, 2016, 2:51am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/10 "2016-12-28T02:51:40Z")

</div>

Nothing has been happening in this space so I took the liberty to solve the problem myself: [GitHub - deevus/docker-plex-remote-transcoder](https://github.com/deevus/docker-plex-remote-transcoder)

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 🙂

---

<div class="post-metadata">

**Author:** ![deevus](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@deevus](https://forums.plex.tv/u/deevus)\
**Post date:** [December 30, 2016, 8:09am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/11 "2016-12-30T08:09:25Z")

</div>

Update: I have added a README to the repository.

---

<div class="post-metadata">

**Author:** ![kjenney69](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kjenney69/32/5155_2.png) [@kjenney69](https://forums.plex.tv/u/kjenney69)\
**Post date:** [December 30, 2016, 7:53pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/12 "2016-12-30T19:53:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![doughnet](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doughnet](https://forums.plex.tv/u/doughnet)\
**Post date:** [December 30, 2016, 9:05pm UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/13 "2016-12-30T21:05:41Z")

</div>

Will the docker version work with multiple slaves communicating with the same master? I.E. four slaves and one master.

---

<div class="post-metadata">

**Author:** ![deevus](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@deevus](https://forums.plex.tv/u/deevus)\
**Post date:** [December 31, 2016, 1:40am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/14 "2016-12-31T01:40:00Z")

</div>

> @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.

1. slave starts up
2. connect to master via SSH (keys are in /config directory)
3. call `prt add_host` and add itself
4. 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.

---

<div class="post-metadata">

**Author:** ![kjenney69](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kjenney69/32/5155_2.png) [@kjenney69](https://forums.plex.tv/u/kjenney69)\
**Post date:** [December 31, 2016, 3:18am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/15 "2016-12-31T03:18:21Z")

</div>

> @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.

---

<div class="post-metadata">

**Author:** ![doughnet](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doughnet](https://forums.plex.tv/u/doughnet)\
**Post date:** [December 31, 2016, 3:40am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/16 "2016-12-31T03:40:57Z")

</div>

> @kjenney69 said:
> 
> > @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?

---

<div class="post-metadata">

**Author:** ![deevus](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@deevus](https://forums.plex.tv/u/deevus)\
**Post date:** [December 31, 2016, 3:50am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/17 "2016-12-31T03:50:19Z")

</div>

> @doughnet said:
> 
> > @kjenney69 said:
> > 
> > > @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.

---

<div class="post-metadata">

**Author:** ![doughnet](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@doughnet](https://forums.plex.tv/u/doughnet)\
**Post date:** [December 31, 2016, 4:02am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/18 "2016-12-31T04:02:59Z")

</div>

> @deevus said:
> 
> > @doughnet said:
> > 
> > > @kjenney69 said:
> > > 
> > > > @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.

Thanks but I’m unfamiliar how that works as well.

---

<div class="post-metadata">

**Author:** ![kegobeer-plex](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kegobeer-plex/32/17444_2.png) [@kegobeer-plex](https://forums.plex.tv/u/kegobeer-plex)\
**Post date:** [December 31, 2016, 4:04am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/19 "2016-12-31T04:04:11Z")

</div>

> @doughnet said:  
> Thanks but I’m unfamiliar how that works as well.

In the first post there’s a link to the Plex Remote Transcoder thread. That should fill you in on how things work.

---

<div class="post-metadata">

**Author:** ![kjenney69](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kjenney69/32/5155_2.png) [@kjenney69](https://forums.plex.tv/u/kjenney69)\
**Post date:** [January 2, 2017, 12:46am UTC](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269/20 "2017-01-02T00:46:24Z")

</div>

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 🙂

P.S. Happy New Year!!!

[Next page](https://forums.plex.tv/t/plex-remote-transcoder-dockerized/145269.md?page=2)
