Plex Remote Transcoder - A distributed transcoding backend for Plex

so setup to machines, and not working. Is there way like logs or something to look into what i did wrong?

@segator said:
Main Plex Server(VPS only 1€/Month) mounting hubic 12.5TB (4€/Month) transcoding remotely to 10 servers also from (VPS 1€ for everyone,yes its enough power to do 1 transcoding, and every of the VPS mounting also hubic, this reduce a lot bandwitch between transcoder and main)

Multiple transcoding server(scalable) + large media library for only 14€ month :slight_smile:

This very similar to how I use Plex as well and is the reason I started this project in the first place. In my setup, however, the transcoder slaves are paid for hourly and are created on demand (only when transcoding is required). A setup like this can significantly reduce monthly costs, but of course is more difficult to setup.

are you using amazon WS for transcoding? how do you setup to create on demand? do you add some script to remote transcode to call amazon WS API? how much cost to you every transcode?

@segator said:
are you using amazon WS for transcoding? how do you setup to create on demand? do you add some script to remote transcode to call amazon WS API? how much cost to you every transcode?

I’ve been working with DigitalOcean, not AWS, but in theory you could use any provided that has an API for creating nodes on demand. The cheapest DO node costs $.0075/hour, so a few hours of transcoding at a time only costs a few cents.

could you share with us your script/s to automatic create the VM deploy all required files launch the transcoder and finally remove the vm, thanks it is amazing!

@wnielson said:

@segator said:
are you using amazon WS for transcoding? how do you setup to create on demand? do you add some script to remote transcode to call amazon WS API? how much cost to you every transcode?

I’ve been working with DigitalOcean, not AWS, but in theory you could use any provided that has an API for creating nodes on demand. The cheapest DO node costs $.0075/hour, so a few hours of transcoding at a time only costs a few cents.

Hi Wnielson,

So i tried setting this up tonight with a master vps running ubuntu server 1404 and slave running the same, both have a windows network share mounted in the same location.

I am running into some issues, when i try and transcode i can see on the slave that the master is sshing into the server, but then nothing more happens, the video is endlessly “loading” and the transcoder never launches on the slave.

Any idea whats causing it? Any idea where i can debug this?

Regards

EDIT;
Managed to resolve this

@Suspense said:
EDIT;
Managed to resolve this

Great, glad you got it working. Anything to share that might help others?

@wnielson said:

@Suspense said:
EDIT;
Managed to resolve this

Great, glad you got it working. Anything to share that might help others?

Not 100% sure if it actually was the fix, but mounting cifs shared required sudo apt-get install cifs-utils
Aswell as the config file edited on both the master and the slave

/etc/nsswitch.conf

hosts: files mdns4_minimal [NOTFOUND=return] dns → hosts: files mdns4_minimal [NOTFOUND=return] wins dns

I was able to access the windows share on the slave even without this change to the conf, but it was loading endlessly.

On my last test where i gave the slave this same edit, i was able to load balance properly!.

Regards

it works very well but i saw some weird things, for example
sometimes when remote transcoding try to do the encode dont try to take the file from the local system it try to get from main server by http download. its not a problem but if we could do that always take the file from the main we could remove the NFS media library share

@segator said:
it works very well but i saw some weird things, for example
sometimes when remote transcoding try to do the encode dont try to take the file from the local system it try to get from main server by http download. its not a problem but if we could do that always take the file from the main we could remove the NFS media library share

In theory that is not a bad idea. Off the top of my head, I’m not sure how easy it is to reverse a full file path to a PMS URL for a given file. If there is a relatively straightforward way to do this that would be awesome because then we could drop the NFS requirement.

@segator said:
■■■■■■■ AWESOME!!

Main Plex Server(VPS only 1€/Month) mounting hubic 12.5TB (4€/Month) transcoding remotely to 10 servers also from (VPS 1€ for everyone,yes its enough power to do 1 transcoding, and every of the VPS mounting also hubic, this reduce a lot bandwitch between transcoder and main)

Multiple transcoding server(scalable) + large media library for only 14€ month :slight_smile:

Care to share some more info on that? How many stream have you had going at once max?

@stevenwebb said:

@segator said:
■■■■■■■ AWESOME!!

Main Plex Server(VPS only 1€/Month) mounting hubic 12.5TB (4€/Month) transcoding remotely to 10 servers also from (VPS 1€ for everyone,yes its enough power to do 1 transcoding, and every of the VPS mounting also hubic, this reduce a lot bandwitch between transcoder and main)

Multiple transcoding server(scalable) + large media library for only 14€ month :slight_smile:

Care to share some more info on that? How many stream have you had going at once max?

I’d also be interested!

I’m investigating how this can be achieved on windows. In anyone wants to help that would be great.

@matdesmarais said:
I’m investigating how this can be achieved on windows. In anyone wants to help that would be great.

I’m in. How many machines do we need? :slight_smile:

@matdesmarais said:
I’m investigating how this can be achieved on windows. In anyone wants to help that would be great.

what do you need?

Well i tryed it in digitalocean, but it too slow to deploy new nodes on digitalocean(30-90 seconds) and for this reason plex get timeout before it could start transcoding on the VPS

@segator said:
Well i tryed it in digitalocean, but it too slow to deploy new nodes on digitalocean(30-90 seconds) and for this reason plex get timeout before it could start transcoding on the VPS

That’s right, you can’t count on a droplet being created fast enough. The solution is to start a new droplet, but have the transcoding start on the head node. Once the new droplet is booted, you have to kill the transcoder process. PMS will then attempt to automatically respawn the transcoder, continuing where it left off, but this time the newly booted node is used. As long as the transcoder has buffered enough of the stream on the head node, then user will not notice any skipping when the job is killed and then restarted.

This sounds a little complicated, but it is relatively straightforward to script together. I’ve been planning on releasing the code I have, but it needs to be cleaned up a bit before.

Make this work for windows and i will donate 50 Euro!

Edit: make it 100Euro if its just connect with username and offsite transcoding, like another town, in Sweden every geek got atleast 100/100.

I don’t mind testing it for windows as well, let me know what you guys need. If this does end up working are people hoping to install PMS on many low end remote servers to keep the cost low? Ideally I do want to host my PMS offsite but getting something to keep PMS running smoothly would cost alot inreagrds to CPU.

@an3k @saitoh183 I have a exe drop in replacement for plexnewtranscoder.exe that currently captures all flags passed to it and dumps them to a log text file for analysis, then it spawns a separate request to the original plexnewtranscoder.exe, the process starts but data is not updated back to the server and thus playback does not start. I am not familiar enough with the inner working of the transcoder so i am not sure what other calls are made after the initial request. I assume the plex server is going to keep pinging the transcoder after the initial call but I am struggling to see it. Are either of you familiar with the inner workings of the transcoder?