# \[Release\] UnicornTranscoder, create a Plex Transcoding Cluster

**URL:** <https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [July 11, 2018, 11:28am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679 "2018-07-11T11:28:16Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [March 20, 2019, 9:33pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/43 "2019-03-20T21:33:10Z")

</div>

Windows isn’t supported and it’s not planned in our roadmap but feel free to fork and support it😉

---

<div class="post-metadata">

**Author:** ![iced98lx](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/iced98lx/32/82788_2.png) [@iced98lx](https://forums.plex.tv/u/iced98lx)\
**Post date:** [March 21, 2019, 2:40am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/44 "2019-03-21T02:40:29Z")

</div>

Keep up the good work!

---

<div class="post-metadata">

**Author:** ![ned](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ned/32/90864_2.png) [@ned](https://forums.plex.tv/u/ned)\
**Post date:** [March 21, 2019, 6:56am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/45 "2019-03-21T06:56:59Z")

</div>

> [@Maxou44](#):
>
> Windows isn’t supported and it’s not planned in our roadmap but feel free to fork and support it😉

I’ve got a docker build of this that I’m currently working on so then you can just run run this in Docker on Windows which might also be another option rather than forking the project totally.

Just trying to iron a few bugs out with the transcoder currently then I’ll push up my code.

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [March 21, 2019, 7:31am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/46 "2019-03-21T07:31:26Z")

</div>

Nice! I’m so excited to use Docker to debug it easier 😁

---

<div class="post-metadata">

**Author:** ![Xarin](https://avatars.discourse-cdn.com/v4/letter/x/58f4c7/32.png) [@Xarin](https://forums.plex.tv/u/Xarin)\
**Post date:** [March 21, 2019, 6:51pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/47 "2019-03-21T18:51:54Z")

</div>

Thank you! I’ll go ahead an provision a secondary plex dev server for testing!

---

<div class="post-metadata">

**Author:** ![theCheek](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@theCheek](https://forums.plex.tv/u/theCheek)\
**Post date:** [March 23, 2019, 6:36am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/48 "2019-03-23T06:36:44Z")

</div>

This is an awesome project and just what I’m looking for.  
I run an Airbnb with 4 private rooms, each one with a Raspberry Pi running Plex on Libreelec. They are being served by an ageing laptop running Plex Media Server on Ubuntu 18.04 LTS, which is pulling video files from my Synology NAS.

The issue is that when all 4 rooms are trying to transcode, then PMS starts to choke.  
I’m thinking of replacing the laptop with another Raspberry Pi to act as the main PMS, then have the RPI’s in the rooms use this project to help out with the transcoding.

So if you would be so kind to answer these questions?

1. Can this project be run on a Raspberry Pi?
2. If so, what is the minimum SD Card size required to be able to handle the transcode? The largest movies in my collection are around 40-50 GB, so would a 128GB SD Card suffice?

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [March 23, 2019, 7:12am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/49 "2019-03-23T07:12:41Z")

</div>

Hello,

Yes the project can run on Raspberry Pi but it’s not the best solution, the goal of this project is to use multiple servers for transcode videos and Raspberry Pi have really poor performance for that 😅

---

<div class="post-metadata">

**Author:** ![theCheek](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@theCheek](https://forums.plex.tv/u/theCheek)\
**Post date:** [March 23, 2019, 9:19am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/50 "2019-03-23T09:19:52Z")

</div>

Understandable. But I was thinking that if each Pi can handle just 1 transcode, then having a pool of 4 of them should be enough to suffice the requirements of all the Airbnb rooms? I’m thinking of having each rooms raspberry pi be part of the pool, so they would be part Plex client, part Plex transcoder. Do you think I should go down this rabbit hole? 🙂

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [March 23, 2019, 12:00pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/51 "2019-03-23T12:00:47Z")

</div>

I’m not sure of the result, it could work but I’m not sure about performance

---

<div class="post-metadata">

**Author:** ![drouarb](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@drouarb](https://forums.plex.tv/u/drouarb)\
**Post date:** [March 23, 2019, 2:05pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/52 "2019-03-23T14:05:27Z")

</div>

I think you will have a bad result, when you start to transcoding, you rely on Plex Transcoder that is basically a tunned FFMPEG. The h264 encoder of FFMPEG is libx264, and the implementation is in assembler. The ARM version of libx264 is not well optimized so you will loose some performance just because Rasberry PI have an ARM CPU. Also the installer is made to work on x86\_64 Linux, if you want to run UnicornTranscoder on Raspbery PI, you will have to find a version of Plex Transcoder that run on ARM Linux.

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [March 24, 2019, 7:02pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/53 "2019-03-24T19:02:47Z")

</div>

It is time for the Plex 1.15.x support!  
You can update your Plex to 1.15.2 and update your transcoders with UnicornTranscoder 2.1.0 😉

CHANGELOG:

- Support music transcode
- Support Plex 1.15.2
- Add debug option

> **[Release UnicornTranscoder 2.1.0 · UnicornTranscoder/UnicornTranscoder](https://github.com/UnicornTranscoder/UnicornTranscoder/releases/tag/2.1.0)**
>
> //github.com/UnicornTranscoder/UnicornTranscoder/releases/tag/2.1.0

---

<div class="post-metadata">

**Author:** ![Xarin](https://avatars.discourse-cdn.com/v4/letter/x/58f4c7/32.png) [@Xarin](https://forums.plex.tv/u/Xarin)\
**Post date:** [March 31, 2019, 5:39am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/54 "2019-03-31T05:39:17Z")

</div>

Got a dev environment all setup and everything’s working. Would you guys be open to adding a repo in your org for apache? I have a working reverse proxy config I’d like to share, and have others contribute to.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [April 1, 2019, 6:38am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/55 "2019-04-01T06:38:40Z")

</div>

Of course we can 🙂

Make a Pull Request on this repository:

> **[UnicornTranscoder/Apache](https://github.com/UnicornTranscoder/Apache)**
>
> Contribute to UnicornTranscoder/Apache development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Xarin](https://avatars.discourse-cdn.com/v4/letter/x/58f4c7/32.png) [@Xarin](https://forums.plex.tv/u/Xarin)\
**Post date:** [April 1, 2019, 5:31pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/56 "2019-04-01T17:31:37Z")

</div>

Apologies if I’m missing something. It looks like the repo isn’t initialized, so I can’t fork or pull request.

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [April 2, 2019, 7:24am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/57 "2019-04-02T07:24:04Z")

</div>

My fault, it’s fixed 😅

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [April 9, 2019, 9:57pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/58 "2019-04-09T21:57:34Z")

</div>

We are back! With good news! 👌

The 2.2.0 pre-release is now available, this version supports “Media Optimizer” and “Sync” features 😁

# Update to 2.2.0

You need to update your LoadBalancer, the fake “Plex Transcoder” and your transcoders , don’t forget to type `npm i` to install new required dependencies 👌

[https://github.com/UnicornTranscoder/UnicornLoadBalancer/releases/tag/2.2.0](https://github.com/UnicornTranscoder/UnicornLoadBalancer/releases/tag/2.2.0)

> **[Release Version 2.2.0 · UnicornTranscoder/UnicornTranscoder](https://github.com/UnicornTranscoder/UnicornTranscoder/releases/tag/2.2.0)**
>
> Support Sync (Plex Pass feature)
> Support Media Optimizer
> Bugfixes

> **[Release Version 2.2.0 · UnicornTranscoder/UnicornFFMPEG](https://github.com/UnicornTranscoder/UnicornFFMPEG/releases/tag/2.2.0)**
>
> UnicornFFMPEG can be killed by the UnicornLoadBalancer (to support Sync/Optimizer)

# Report bugs

It’s a pre-release version, some bugs can happend, if you have some bug please report it on Github (or here)

To report bugs:

> **[UnicornTranscoder/UnicornLoadBalancer](https://github.com/UnicornTranscoder/UnicornLoadBalancer/issues)**
>
> Contribute to UnicornTranscoder/UnicornLoadBalancer development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [April 13, 2019, 5:17pm UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/59 "2019-04-13T17:17:15Z")

</div>

Time for UnicornTranscoder 2.2.1

> **[UnicornTranscoder/UnicornTranscoder](https://github.com/UnicornTranscoder/UnicornTranscoder/releases/tag/2.2.1)**
>
> Remote transcoder for Plex. Contribute to UnicornTranscoder/UnicornTranscoder development by creating an account on GitHub.

This release supports Plex 1.15.3

# Update notes

- Shutdown your transcoder
- Pull the 2.2.1 version
- npm i
- npm run install
- restart

---

<div class="post-metadata">

**Author:** ![Marooned](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@Marooned](https://forums.plex.tv/u/Marooned)\
**Post date:** [April 18, 2019, 5:29am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/60 "2019-04-18T05:29:23Z")

</div>

After a few days of troubleshooting and trying to get this to work I’ve finally figured it out so I hope this may help someone.  
I followed the install guides from the GitHub: [https://github.com/UnicornTranscoder/UnicornTranscoder](https://github.com/UnicornTranscoder/UnicornTranscoder)

But it didn’t make complete sense. My test was done with 2 cloud servers from Hetzner, so no local internal network. I also wasn’t using any Nginx or Apache proxy, nor was I using a URL, I wanted to test with pure IP configs. I first installed node.js, npm, Plex, then UnicornFFMPEG, then UnicornLoadBalancer on the same system. I then installed the node.js, npm, then UnicornTranscoder on a different system. After these were installed I had a hard time determining the exact syntax required in the config.js files, so here are my examples:

UnicornFFMPEG:  
URL: process.env.LB\_URL || ‘[http://127.0.0.1:3001/](http://127.0.0.1:3001/)’  
(I tested if you actually needed the ending “/” and you don’t but left it since it was in the install guide)

UnicornLoadBalancer:  
This config file is actually located in the “src” directory, the install guide doesn’t state this.  
port: env.int(‘SERVER\_PORT’, 3001),  
public: env.string(‘SERVER\_PUBLIC’, ‘[http://x.x.x.x:3001/](http://x.x.x.x:3001/)’),  
host: env.string(‘SERVER\_HOST’, ‘127.0.0.1’)  
x.x.x.x is the IP of your UnicornLoadBalancer public IP.  
Note: the ending “/” IS required in the public: env.string.  
Then near the bottom put your TranscodingServer under:  
servers: {  
list: env.array(‘CUSTOM\_SERVERS\_LIST’, ‘string’, [‘[http://y.y.y.y:3000](http://y.y.y.y:3000)’])  
y.y.y.y is the IP of your UnicornTranscoder system.  
Note: the ending “/” is NOT required and will work either way. The document doesn’t indicate that single quotes are required around the IP in the brackets. I test with and without the brackets and it still worked.

UnicornTranscoder:  
loadbalancer\_address: env.string(‘LOADBALANCER\_ADDRESS’, ‘[http://x.x.x.x:3001](http://x.x.x.x:3001)’),  
ping\_frequency: env.int (‘PING\_FREQUENCY’, 10),  
instance\_address: env.string(‘INSTANCE\_ADDRESS’, ‘[http://y.y.y.y:3000](http://y.y.y.y:3000)’),  
x.x.x.x is the IP of the UnicornLoadBalancer  
y.y.y.y is the IP of the UnicornTranscoder.  
Note: Do NOT use the ending “/” on either IP, it will fail. The install guide uses an example of hostnames and not IPs so was a tad confusing.  
You also need to run “npm start”, this is also not indicated in the installation guide.

In your Plex Network settings you will want to set the Custom Server Access URL to the UnicornLoadBalancer IP with port, ex.: [http://x.x.x.x:3001](http://x.x.x.x:3001)

The guide recommends blocking port 32400 but it is not required for this to successfully work as long as you configure the Custom Server Access URL and access the Plex server directly at: [http://x.x.x.x:3001](http://x.x.x.x:3001)  
At the moment I haven’t been able to get Plex Remote Access to work properly, but accessing the Plex server using the custom URL works fine.

I hope this helps and now that it’s working it’s pretty awesome.

I’ve tried the docker and kube-plex with not much success and they’re outdated. Once thing they did require was mapped drives but UnicornTranscoder does not, you only need to have the Plex media where your Plex server is. My test was done with a Google Drive and using rclone to mount on the Plex server only and it successfully streamed to the Transcoder on a different system with no media mapped.

---

<div class="post-metadata">

**Author:** ![lweniger](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/lweniger/32/121260_2.png) [@lweniger](https://forums.plex.tv/u/lweniger)\
**Post date:** [April 18, 2019, 6:54am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/61 "2019-04-18T06:54:52Z")

</div>

Great guide. Very useful. Thanks!

---

<div class="post-metadata">

**Author:** ![Maxou44](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/maxou44/32/18226_2.png) [@Maxou44](https://forums.plex.tv/u/Maxou44)\
**Post date:** [April 18, 2019, 9:58am UTC](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679/62 "2019-04-18T09:58:36Z")

</div>

Thanks for the detailed guide, we will improve our documentation with your feedback

UnicornFFMPEG:  
I updated the README, the url MUST contain a slash at the end.

UnicornLoadBalancer:  
The problem here is you edited the configuration file, it’s explained in the README you can use ENV values to configure all the fields, it’s easier for production setup and updates 😉

All values are explained, “slash” requirements are in the README, I don’t know what we can do to improve that…

> <https://github.com/UnicornTranscoder/UnicornLoadBalancer/blob/master/README.md>

CUSTOM\_SERVERS\_LIST value is useless in 99.9% of case, the default value is perfect for your setup.  
If it’s not defined, each transcoder will register itself during its first exchange with the LB (but you can’t launch any streams until at least one transcoder is registered, it can take few seconds, 10 by default). It’s only useful when you don’t want any (10 seconds) downtime during LB updates…

UnicornTranscoder:  
We will update the documentation with slash issues and npm start, it’s not clear, we will fix, sorry for that.

It’s necessary to drop 32400 port, it can work without, but it’s not recommended because when you setup a custom port/url, Plex will add a new url for your server in its list, if when a Plex app ping the server and it take too much time, it will fallback on the 32400 port and all the streams will fail… So please drop the port 🙂

You can mount your files on each transcoder if you prefer, just set the CUSTOM\_DOWNLOAD\_FORWARD value in the LB 🙂

[Previous page](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679.md?page=2)

[Next page](https://forums.plex.tv/t/release-unicorntranscoder-create-a-plex-transcoding-cluster/281679.md?page=4)
