Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plex: Guide to Moving Transcoding to RAM

Featured Replies

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?

 

 

  • Replies 472
  • Views 380.3k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • By this guide Plex uses your RAM while transcoding which prevents wearing out your SSD.   Edit the Plex Container and enable the "Advanced View":   Add this to "Extra Paramet

  • Yesterday, I was lazy and set only "/dev/shm/plextranscode" as my transcoding path. I checked the path and it was created: ls /dev/shm plextranscode/   But it stays empty while transcoding

  • Yes it is needed as /transcode will be created, even it is not mapped through the containers settings.   So I will hopefully update my guide for the last time ^^ EDIT: Done.

Posted Images

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.

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

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

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.

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

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

5 minutes ago, Burizado said:

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

Note that this doesn't appear to be the default binhex-plexpass template though, since the default template uses a variable instead of a path, and @UnraidDuck also has a variable in the screenshot.

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.

 

/config/transcode seems to translate to /transcode within the root of the docker directory in appdata. In my case (which should be standard) /mnt/user/appdata/binhex-plexpass/transcode.

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

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?

Thanks to @Hoopster Reminder to RTFM, I now have Plex transcoding to the RAM disk.

image.thumb.png.39e700294516b702286818dc13d5c67d.png

  • 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

Did you also add a path mapping for that folder on the template?

1 hour ago, Paddy said:

But seems not working

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

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 ?

4 hours ago, Paddy said:

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

It does not lower CPU load and the RAM usage is correct as well. 1% of 128GB RAM is 1.28GB. Transcode to RAM reduces I/O load and prevents wearing out your SSD. 

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?

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

 

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

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

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.

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.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.