Plex: Guide to Moving Transcoding to RAM


Recommended Posts

On 2/12/2020 at 5:06 AM, Andiroo2 said:

I recently set Plex transcoding to /tmp, verified that the sessions were showing up as expected int he /tmp folder.  Seemed to be working fine, EXCEPT for users on Amazon Fire Sticks.  They are able to browse Plex and select a movie, but as soon as they play it, they get an error "Playback has stopped because the connection to the server has been lost".  I had 2 Fire stick users confirm this today, and at the same house their Rokus and other devices work fine.  When I move transcoding back to the default directories on an SSD, everything works again. 

 

Could the Android clients be managing transcodes differently?  I find this so odd.  

 

Xeon 2699v4, 32GB RAM.  I thought this would be enough but maybe not?

Yeh, I had similar random errors like that too.  I assumed it was space running out but can't be sure.  Quite hard to identify as the stream has usually stopped and the files are cleaned up I guess.

Link to comment

Plex just put out an update - the changeling seems to indicate they've solve the issue, at least for the Nvidia Shield.  If I were you I'd try it out again now and if it doesn't work, go jump on the update link and ask to add to the general builds too.

 

In particular, I'm referring to this:

(DVR) Only require 100 MB of disk space per recording for the transcode session directory. (nvidia-shield-issues#236)

Link to comment
4 minutes ago, boomam said:

when i change the variable in the container for the container path /transcode to be /tmp - 

Error response from daemon: path /tmp is mounted on / but it is not a shared or slave mount.

What was your previous transcode location? What is your current access mode in the path configuration?

Link to comment
Just now, boomam said:

Previous location was an unassigned disk.

Current access mode - i do not know what you mean by this. Please elaborate.

Unassigned disks need to be mounted in RW/Slave mode; /tmp does not.  You probably never changed this setting in the docker edit screen configuration of the volume mapping and still have access mode set to RW/Slave instead of Read/Write.

 

image.png.a71c1d4edfdf20f64ba1a91beab45e11.png

 

  • Thanks 1
Link to comment
12 minutes ago, Hoopster said:

Unassigned disks need to be mounted in RW/Slave mode; /tmp does not.  You probably never changed this setting in the docker edit screen configuration of the volume mapping and still have access mode set to RW/Slave instead of Read/Write.

 

image.png.a71c1d4edfdf20f64ba1a91beab45e11.png

 

Thanks - that was it.

I dont recall ever setting that setting in the past, but hey-ho, its working now, so nice one! 🙂

Link to comment
On 2/11/2020 at 11:06 AM, Andiroo2 said:

I recently set Plex transcoding to /tmp, verified that the sessions were showing up as expected int he /tmp folder.  Seemed to be working fine, EXCEPT for users on Amazon Fire Sticks.  They are able to browse Plex and select a movie, but as soon as they play it, they get an error "Playback has stopped because the connection to the server has been lost".  I had 2 Fire stick users confirm this today, and at the same house their Rokus and other devices work fine.  When I move transcoding back to the default directories on an SSD, everything works again. 

 

Could the Android clients be managing transcodes differently?  I find this so odd.  

 

Xeon 2699v4, 32GB RAM.  I thought this would be enough but maybe not?

So, there may have been an issue with the latest Plex app released for the Fire Stick.  My friends are trying with different settings there to see if they can work around it.  So far, no issues on any other platform (and the RAM vs. SSD transcode doesn't appear to make a difference for this issue after all).  Link for the post I am following: https://www.reddit.com/r/PleX/comments/f5r0ou/4k_with_new_plex_for_firestick_4k_disabled_with/

Link to comment
  • 3 weeks later...

Im not able to get the transcode by RAM working in unraid.

 

When I check the RAM usage streaming a movie the graph is showing that the usage is nearly 0 % of 128GB 

 

My transcoder path in PLEX is: /transcode

 

In Unraid the settings are:

 

Container path: /transcode

Host Path: /tmp

Access mode: Read/write

 

Please help

 

 

Link to comment
On 3/6/2020 at 2:32 PM, sjjellesen said:

Im not able to get the transcode by RAM working in unraid.

 

When I check the RAM usage streaming a movie the graph is showing that the usage is nearly 0 % of 128GB 

 

My transcoder path in PLEX is: /transcode

 

In Unraid the settings are:

 

Container path: /transcode

Host Path: /tmp

Access mode: Read/write

 

Please help

 

 

Your configuration looks correct.

 

Have you checked the /tmp/Trancode/Sessions folder when transcoding is taking place?  Is anything there?

 

My linuxserver.io Plex docker container is configured to transcode to RAM and transcode sessions are created as needed in that folder.

Link to comment
  • 3 weeks later...
40 minutes ago, Ong Hui Hoong said:

i saw a tmp folder (i presume is the RAM),

 

can we just point my plex in transcode setting directly to this /tmp?

I don't know if we can presume that is in RAM or not. If it were /tmp for the host then it would be, but since it is inside the container it might be be stored in the docker image instead of RAM.

 

There is plenty of instruction here for doing it right.

Link to comment

i did what everyone did, do the host path to the /tmp and map to container path (/transcode or something), but it will cause my RAM to use up to 99% then my server crash @_@

 

image.png.8e413bf1785d1362e9dc55367995a457.png

 

i think i have more then enough RAM to do ram transcoding right? i got about 12G of ram standing by.

Edited by Ong Hui Hoong
Link to comment
25 minutes ago, Ong Hui Hoong said:

i did what everyone did, do the host path to the /tmp and map to container path (/transcode or something), but it will cause my RAM to use up to 99% then my server crash @_@

i think i have more then enough RAM to do ram transcoding right? i got about 12G of ram standing by.

Read post from 1812 on page 9 (quote below) for the script to run at startup. Then point the container path to /tmp/PlexRamScratch

The script restricts the size of /tmp/PlexRamScratch to 4GB so you Plex does not use all the RAM.

4G is a good starting point but you can adjust depending on needs.

 

 

Link to comment
7 hours ago, testdasi said:

Read post from 1812 on page 9 (quote below) for the script to run at startup. Then point the container path to /tmp/PlexRamScratch

The script restricts the size of /tmp/PlexRamScratch to 4GB so you Plex does not use all the RAM.

4G is a good starting point but you can adjust depending on needs.

 

 

wow nice, let me test this out, thanks ya :D

Edited by Ong Hui Hoong
Link to comment
7 hours ago, testdasi said:

Read post from 1812 on page 9 (quote below) for the script to run at startup. Then point the container path to /tmp/PlexRamScratch

The script restricts the size of /tmp/PlexRamScratch to 4GB so you Plex does not use all the RAM.

4G is a good starting point but you can adjust depending on needs.

 

 

qustion, can i add this under the /boot/config/go files?

im not very good in linus CLI :(

Link to comment
1 hour ago, Ong Hui Hoong said:

qustion, can i add this under the /boot/config/go files?

im not very good in linus CLI :(

Install User Scripts plugin from the app store

Settings -> User Scripts -> create a new script -> copy paste script to the edit box -> save -> on the schedule box choose at first array start

Link to comment
On 3/28/2020 at 1:59 AM, testdasi said:

Install User Scripts plugin from the app store

Settings -> User Scripts -> create a new script -> copy paste script to the edit box -> save -> on the schedule box choose at first array start

Hi, thanks for the guide! the limited size ram folder created without issue, now just need to wait more people streaming to confirm :)

 

thanks again :D

Link to comment

So I'm trying to get my Plex server (UnRaid Docker) to transcode to ram.. I have installed the CA User Scripts and set up the 4G ramdrive as listed a few posts up and set to start with the array. I just want to make sure all my settings are correct.

 

In the Docker container settings I have the TRANS_DIR variable set to /tmp/PlexRamScratch

In my Plex server settings under Transcoder Settings I have also set the Transcoder temporary directory to /tmp/PlexRamScratch

 

Is that all that should be required?

Link to comment
59 minutes ago, amplified2000 said:

In my Plex server settings under Transcoder Settings I have also set the Transcoder temporary directory to /tmp/PlexRamScratch

/tmp/PlexRamScratch is your host path.  What is your container path set to for TRANS_DIR?

 

In the Plex server Transcoder Settings you specify the container path (/transcode or whatever you defined) NOT the host path.

 

image.png.63f4e4c5e2bd9c8ce22b090428416245.png

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.