Plex: Guide to Moving Transcoding to RAM


Recommended Posts

On 9/19/2020 at 1:22 PM, mgutt said:

New Guide which uses only a limited size of your RAM:

Thank you for the guide. Like the idea of a limited RAM disk.

 

All worked well, except no files are written onto the RAM disk. One thing I noticed, the Docker template now has "Key 1" as a variable "Container Variable: TRANS_DIR" and not transcode anymore. Within Plex the transcode path is still /transcode. Could this be my problem?

 

 

Link to comment
2 hours ago, UnraidDuck said:

Within Plex the transcode path is still /transcode.

As shown in the screenshot the container path /transcode needs to be linked to the hosts ram disk path.

 

If you press the edit button of the path, what is set as container and what as host path? Take a screenshot of you like.

Link to comment
2 minutes ago, mgutt said:

As shown in the screenshot the container path /transcode needs to be linked to the hosts ram disk path.

 

If you press the edit button of the path, what is set as container and what as host path? Take a screenshot of you like.

Maybe that is where the confusion is. There is no /transcode setting like in earlier versions. Key1 is TRANS_DIR, which I assumed is the correct place to set the transcode directory.

 

image.png.5f86e45738d6b274676f6532bc735aa0.png

Link to comment
3 minutes ago, UnraidDuck said:

Maybe that is where the confusion is. There is no /transcode setting like in earlier versions

Well, that likely depends upon which docker container you are using for Plex.  Are you using Binhex or Plex Inc Official container?  I am using the Linuxserver.io Plex container and /transcode is still the setting I use and it works great.  All my transcode files are being created in PlexRamScratch as they should be.

 

image.png.54e1a5b95d40aaf7a6dd8f572166b36b.png

Link to comment
1 minute ago, Hoopster said:

Well, that likely depends upon which docker container you are using for Plex.  Are you using Binhex or Plex Inc Official container?  I am using the Linuxserver.io Plex container and /transcode is still the setting I use and it works great.  All my transcode files are being created in PlexRamScratch as they should be.

I'm using the binhex-plexpass version.

Link to comment
11 minutes ago, UnraidDuck said:

I'm using the binhex-plexpass version.

This is what I have in settings for the binhex-plexpass version.

I just tested and it is transcoding to RAM.

 

Edit:  I just updated a few hours ago so it should be the latest build.

 

2020-12-14 11_54_11-Atlas_UpdateContainer.png

Edited by Burizado
Link to comment
3 minutes ago, Burizado said:

This is what I have in settings for the binhex-plexpass version.

I just tested and it is transcoding to RAM.

 

2020-12-14 11_54_11-Atlas_UpdateContainer.png

Confusing. That does not look like the newest binhex-plexpass edition. Here is the current version, fresh out of the APPS tab. Note that the Key variables are in order 1-4 and Key 1 is named different than yours.

image.thumb.png.138bfd587badb7106452844504b8e803.png

Link to comment

I also use linuxserver and haven't kept up with how people setup ram transcoding on binhex versions. From the default template posted above it looks like the variable is expecting a path that already exists within the container, with the default value being a subfolder of the config folder. So that would be a subfolder of the plex appdata. And I would expect that if you specify a /tmp or /dev folder for that variable, instead of creating a path mapping, it is going to transcode into docker.img.

 

Link to comment
47 minutes ago, UnraidDuck said:

I'm using the binhex-plexpass version.

Here's what the Binhex Plex documentation has to say:

 

Quote

Plex Docker FAQ

Q1. How do i configure Plex to transcode to RAM/Array/Cache?

A1. Below are the different options for setting transcoding for Plex and Plex Pass:-

 

Transcode to RAM - create a new volume mapping, host path /tmp and container path /transcode then define TRANS_DIR so that it points at ram drive e.g.:-

TRANS_DIR=/transcode

/transcode

maps to host path

/tmp

 

Transcode to the array - create a new unRAID user share named 'Transcode' (or whatever you want) and then define TRANS_DIR so that it points at your array e.g.:-

TRANS_DIR=/transcode

/transcode

maps to host path

/mnt/user/Transcode

 

Transcode to cache (preferably cache is SSD not spinner) - define TRANS_DIR so that it points at your cache drive e.g.:-

TRANS_DIR=/transcode

/transcode

maps to host path

/config/tmp

 

According to those instructions from Binhex, it should still be /transcode in Plex if everything else is configured as per his documentation (assuming nothing has changed and is "undocumented").

Link to comment
16 minutes ago, Hoopster said:

Here's what the Binhex Plex documentation has to say:

Ok, looks like the TRANS_DIR values aren't really paths. Instead these are "switches" to select between three predefined paths.

 

So the solution would be to set TRANS_DIR to /tmp

 

Does Binhex generate an additional subfolder in /tmp if this setting is used?

Link to comment
  • 2 weeks later...

Hi everyone, looking for solution how to set up transcoding to the ram without docker. My server has 128GB ram and I wanna use it this for transcoding. I set folder and set trancoding in plex web:

sudo mkdir /mnt/plexdisk
sudo mount -t tmpfs -o rw,size=50G tmpfs /mnt/plexdisk

Set the Transcoder temporary directory to /mnt/plexdisk

But seems not working. Can someone help me?

I use only command.

 

df.jpg

ram.jpg

Link to comment
44 minutes ago, mgutt said:

Your screenshots shows 3.9G usage, so why do you think that? PS you need only 2 to 8G. Plex purges the folder automatically. 

Well u have right but not much productive... look on this:

transcoding.jpg

 

cpu.jpg

 

plexstatus2.jpg

 

webplex.jpg

 

Still high usage CPU not RAM not as I expected, why ?

Link to comment

I find that when I use RAM transcode (to /tmp) on 4K video files, I use a TON of RAM.  I have a 10th gen intel quick sync and I can transcode 4K files for users that don’t have 4K TVs.  I have 48GB of RAM, and i sit around 50% utilized when idle.  When I transcode a 4K file, I routinely get to 99% RAM and then panic. Plex/Docker can then crash. 

 

Is it expected that transcoding a 4K file uses that much space in the transcode directory?

Link to comment
9 hours ago, Andiroo2 said:

I find that when I use RAM transcode (to /tmp) on 4K video files, I use a TON of RAM.

That's the reason why you should limit the RAM path to 4 or 8GB. Even your server can crash.

 

Plex uses as much space for the temporary transcoding files as available. This has nothing to do with 4K. The same would happen if multiple clients transcode 1080p streams. Plex preserves so much files so the user is able to jump back on the timeline without the need to re-transcode. But as this is a rare case, you can limit the RAM usage without problems. Plex starts cleaning when there is no space left. In theory you could even limit it to 100MB (don't do it, causes juddering ;) ).

 

  • Thanks 1
Link to comment
10 hours ago, mgutt said:

That's the reason why you should limit the RAM path to 4 or 8GB. Even your server can crash.

 

Plex uses as much space for the temporary transcoding files as available. This has nothing to do with 4K. The same would happen if multiple clients transcode 1080p streams. Plex preserves so much files so the user is able to jump back on the timeline without the need to re-transcode. But as this is a rare case, you can limit the RAM usage without problems. Plex starts cleaning when there is no space left. In theory you could even limit it to 100MB (don't do it, causes juddering ;) ).

 

That makes so much sense.  Thanks for the info!

 

Now to read back and figure out how to do it...

Link to comment
7 hours ago, SPOautos said:

Do you guys find that RAM trsnscoding affects being able to easily move through the timeline?

It will never be "fast", even with RAM transcoding. The only fast options are direct stream/play or pre-transcoding to a lower quality version so it can directly play it.

 

Netflix & Co pre-transcode all movies in all qualities. Of course this needs a massive amount of space.

Link to comment
On 1/2/2021 at 3:23 PM, mgutt said:

It will never be "fast", even with RAM transcoding. The only fast options are direct stream/play or pre-transcoding to a lower quality version so it can directly play it.

 

Netflix & Co pre-transcode all movies in all qualities. Of course this needs a massive amount of space.

 

I've started using Kodi at the house and Plex just for mobile. It seems odd to me that Kodi can direct play pretty much every movie I have, no matter the format, and Plex has to transcode just about all of them. Since Kodi can direct play them all, I can move the timeline forward and backward as far as I want and it starts playing instantly. I wish I could get Plex to behave that way....i was hoping the RAM transcoding would help in this regard but it really didn't....it may have helped slightly but moving the timeline is still not a very useable experience.  Oh well, its nice for mobile and letting friends/family use it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.