elamine2uk Posted May 16, 2023 Share Posted May 16, 2023 Hi there, sharing experience and a guide on how i got this working.. Unraid version: 6.12.0-rc5 Hardware: ASROCK X670E PRO RS + AMD Ryzen 9 7900 + DDR5 + Cache NMVE I have been trying to get the plex container to transcode using hw but was not succesful until I found somebody in Reddit referencing this dockerfile in github. This is the first time I build an image so after few tinkering I think I got it to work. Here are the steps I used incase anybody see this relevant. Github: skjnldsv/docker-plex As I said, this is my first time I build an image. I went into plex and created a text file dockerfileplex.txt and copied the code in github into it. I could see in the dockefile the person is loading the standard plex image but with a series of modules, libraries....I am not an expert on docker so dont understand 100% I used the following CLI command to build the image: docker build - < dockerfileplex.txt After few minutes, the image is created and you are given an image id: in my case this was: 07804fbb5c05 Then I used the usual code I use with the standard plex docker to create a new container but referencing the image I just created before: in my case this was: docker run -d \ --name=plex-amd \ --net=host \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ -e VERSION=docker \ -e PLEX_CLAIM= `claim-GLgDsgXXXXXXXXXXX_` \ -v /mnt/cache/appdata/plex-amd:/config \ -v /mnt/user/Media:/media \ --device=/dev/dri:/dev/dri \ --restart unless-stopped \ 07804fbb5c05 You can see the new plex container in the list of containers in unraid and you can stop start restart as usual. once this was up and the setup of the server is up, hw transcoding is working and I managed to get 3/4 streams working on the same time. I installed AMD Radeontop tool and I show below the usage of the iGPU for transcoding...when that picture was taken only one stream was on. Ig any question, please comment and will do my best to guide on the process above. 2 1 Quote Link to comment
Apollopayne35 Posted July 15, 2023 Share Posted July 15, 2023 (edited) Please could you simplify your instructions? I have a 5700g and wanting to set a Plex docker with it for transcoding. I’ve never created a docker container this way. Only from the community applications Edited July 15, 2023 by Apollopayne35 Quote Link to comment
Mindaboveall Posted July 19, 2023 Share Posted July 19, 2023 On 7/14/2023 at 8:18 PM, Apollopayne35 said: Please could you simplify your instructions? I have a 5700g and wanting to set a Plex docker with it for transcoding. I’ve never created a docker container this way. Only from the community applications All you have to do is open up the console on your unraid server and type: docker build https://raw.githubusercontent.com/skjnldsv/docker-plex/master/Dockerfile That command will run for a bit and at the end it'll say: Successfully built <IMAGE ID> Once you see that, copy that image ID and open up your existing Plex container and replace the repository with that new image ID. Alternatively, you can hit "Add Container" and select the profile of your Plex install and simply change the name to something else (I added GPU). The only other thing you need to do is add the following to Extra Parameters (advanced editing): --device='/dev/dri:/dev/dri' It should start up just like normal and work out of the box. I have an MSI Vega 56 that is currently transcoding three streams. Big thanks to OP for turning me onto this. Quote Link to comment
Mindaboveall Posted July 20, 2023 Share Posted July 20, 2023 (edited) Just a small update, I've pushed the image to dockerhub and it's available here for those looking to use this: https://hub.docker.com/r/mindaboveall/plex-amd Just open your current Plex container and swap the repo out with mindaboveall/plex-amd:latest and add --device=/dev/dri:/dev/dri to your Extra Parameters and you're good to go. Will be sporadically updated until I get the time to set something more robust up. Edited July 20, 2023 by Mindaboveall Quote Link to comment
Mindaboveall Posted July 28, 2023 Share Posted July 28, 2023 Well it was a really solid two weeks but Plex Media Server now supports AMD GPUs so this is all no longer needed. Thus ends my foray into docker building. Quote Link to comment
Combat_Archer Posted August 10, 2023 Share Posted August 10, 2023 Mindaboveall, I'm a newbie at Unraid, and just switched over from VM Virtual Box for my Plex server, for the reason of using my Radeon 7900 to transcode since VM Box doesn't allow GPU passthrough. I have my Plex (Pass) server up and running on Unraid, and I have the "Enable hardware transcoding" selected in plex, but I am still not getting the GPU to transcode. Your last post said Plex now supports AMD GUPs, can you point me in the right direction to where I can find out how to get this set up? Thanks! 1 Quote Link to comment
Nofences Posted August 20, 2023 Share Posted August 20, 2023 (edited) On 8/10/2023 at 10:33 AM, Combat_Archer said: Mindaboveall, I'm a newbie at Unraid, and just switched over from VM Virtual Box for my Plex server, for the reason of using my Radeon 7900 to transcode since VM Box doesn't allow GPU passthrough. I have my Plex (Pass) server up and running on Unraid, and I have the "Enable hardware transcoding" selected in plex, but I am still not getting the GPU to transcode. Your last post said Plex now supports AMD GUPs, can you point me in the right direction to where I can find out how to get this set up? Thanks! I figured this out based on the info above, first, make sure you have the Radeon-Top plugin installed and working. Install the "Official" Plex docker, I was unable to get this to work with Binhex or Linuxserver (possible the AMD drivers are not installed). On the install template page, click "Add another Path, Port, Variable, Label, or Device", change config type to Device, give it a name (I used AMD GPU), for value enter "/dev/dri:/dev/dri" (without quotes). Complete the remaining setup (specify your local media folder and set a transcode directory, preferrably a location on your cache pool) and click apply to create the docker. After setup, dont forget to enable hardware transcoding (requires plex pass) in the plex settings. This is working great with my Ryzen 5 5500U with Radeon iGPU. I was able to test 4 simultaneous HW transcodes (1080p HEVC to SD). Edited September 20, 2023 by Nofences Incorrect plugin name Quote Link to comment
stanek7110 Posted September 10, 2023 Share Posted September 10, 2023 On 8/20/2023 at 8:49 PM, Nofences said: I figured this out based on the info above, first, make sure you have the AMD-Top plugin installed and working. Install the "Official" Plex docker, I was unable to get this to work with Binhex or Linuxserver (possible the AMD drivers are not installed). On the install template page, click "Add another Path, Port, Variable, Label, or Device", change config type to Device, give it a name (I used AMD GPU), for value enter "/dev/dri:/dev/dri" (without quotes). Complete the remaining setup (specify your local media folder and set a transcode directory, preferrably a location on your cache pool) and click apply to create the docker. After setup, dont forget to enable hardware transcoding (requires plex pass) in the plex settings. This is working great with my Ryzen 5 5500U with Radeon iGPU. I was able to test 4 simultaneous HW transcodes (1080p HEVC to SD). Firstly I can't seem to find AMD-Top. Secondly i did everything else and now can select my GPU as a transcoder device, but now all my streams buffer super hard every 5 seconds. im using an RX 580 8GB. Am I doing something wrong? Quote Link to comment
Nofences Posted September 11, 2023 Share Posted September 11, 2023 13 hours ago, stanek7110 said: Firstly I can't seem to find AMD-Top. Secondly i did everything else and now can select my GPU as a transcoder device, but now all my streams buffer super hard every 5 seconds. im using an RX 580 8GB. Am I doing something wrong? Apologies, the plugin is actually called Radeon Top, not AMD. Install the plugin and restart. Quote Link to comment
stanek7110 Posted September 11, 2023 Share Posted September 11, 2023 13 hours ago, Nofences said: Apologies, the plugin is actually called Radeon Top, not AMD. Install the plugin and restart. I do have that plugin. I think i figured out the issue. All my movies were in 4k and i think the rx 580 was struggling with the 4k. once i dropped them down to 1080p it seems to handle it much better. still seems like the max remote streams i can get is 3 without buffering. btw all movies are YTS all below 3mbps. Quote Link to comment
jace055 Posted September 19, 2023 Share Posted September 19, 2023 On 7/27/2023 at 10:17 PM, Mindaboveall said: Well it was a really solid two weeks but Plex Media Server now supports AMD GPUs so this is all no longer needed. Thus ends my foray into docker building. Care to share how you got this working? I just upgraded from an old intel to the 7900 and transcoding pegs out all cores with no hit on the iGPU. I had things working with the intel. Quote Link to comment
Nofences Posted September 20, 2023 Share Posted September 20, 2023 (edited) 6 hours ago, jace055 said: Care to share how you got this working? I just upgraded from an old intel to the 7900 and transcoding pegs out all cores with no hit on the iGPU. I had things working with the intel. See my post above from Aug 20, it has instructions for enabling HW transcoding using official Plex container and AMD GPU. Edited September 20, 2023 by Nofences Quote Link to comment
jace055 Posted September 21, 2023 Share Posted September 21, 2023 On 9/19/2023 at 10:33 PM, Nofences said: See my post above from Aug 20, it has instructions for enabling HW transcoding using official Plex container and AMD GPU. Thank you. I still can't seem to get this to work. I am on the latest original Plex docker. I assume the GPU plugin is working but I can't get it to move. With Intel, it really moved. How is your 4k transcode performance? Converting 1080 to anything else barley shows a bump on the processor but one 4k transcode will immediately eat 75% on all cores for a few minutes before settling to 30%. Quote Link to comment
Nofences Posted September 22, 2023 Share Posted September 22, 2023 (edited) So here are my results converting 4K to 1080P Single Transcode Multiple Transcodes You are correct, CPU did increase, while GPU did not, but all three report HW transcoding and this is from an ADM Ryzen 5 5500U with Radeon iGPU This was with the three transcodes above all running. If your GPU is older, not sure what is officially supported by Plex. Might be worth a look through their forums for your GPU and see what other's experience with it is. Edited October 4, 2023 by Nofences Corrected grammar for clarity Quote Link to comment
jace055 Posted September 28, 2023 Share Posted September 28, 2023 @Nofences thank you for the information! I played with this all weekend. Unloading dockers and reloading along with changing configurations. No luck. Today I noticed there was an update to plex server. I’m now on 7557 and everything is working! I can transcode 4K down to almost nothing with no hit on the CPU. The APU is doing the work and the plug-in reports it correctly. tldr: Update plex for the fix. I have a ryzen 9 7900 processor. 1 Quote Link to comment
Hiko0 Posted October 2, 2023 Share Posted October 2, 2023 @jace055 As this is huge news for all AMD-users, could you maybe also post some screenshots on what you were transcoding and how this was affecting your system's resources? Quote Link to comment
matew Posted October 2, 2023 Share Posted October 2, 2023 Hello, @jace055 - was anything published by plex in e.g. release notes, saying that amd iGPUs are finally fully supported? Many thanks. Quote Link to comment
jace055 Posted October 3, 2023 Share Posted October 3, 2023 17 hours ago, Hiko0 said: @jace055 As this is huge news for all AMD-users, could you maybe also post some screenshots on what you were transcoding and how this was affecting your system's resources? I’ll post some up in a day or so. Currently in the middle of a parity check and I’d like to let it finish before I play around with anything. 15 hours ago, matew said: Hello, @jace055 - was anything published by plex in e.g. release notes, saying that amd iGPUs are finally fully supported? Many thanks. On the plex forums there is a thread of all the plex server change logs. I think the relevant bit is “(Transcoder) Certain newer AMD GPU models couldn’t be used for hardware transcoding on Linux (#14416)” in post 596. https://forums.plex.tv/t/plex-media-server/30447/600 Looking at the last handful of updates it looks like they have been working on AMD transcoding for a while. Although tin 7571 it looks like they are attempting to fix it again. I’m going to stay on 7557 since I have it working as expected. 1 Quote Link to comment
animeking1987 Posted October 3, 2023 Share Posted October 3, 2023 (edited) @Nofences I have followed your instructions for setting up the AMD transcoding and mine is still not HW transcoding. I have a AMD Ryzen 7 5700 @ 3700 MHz and I still get this when I Transcode. I have installed the Top plugin as well as add the variable device: Edited October 3, 2023 by animeking1987 Quote Link to comment
Nofences Posted October 4, 2023 Share Posted October 4, 2023 11 hours ago, animeking1987 said: @Nofences I have followed your instructions for setting up the AMD transcoding and mine is still not HW transcoding. I have a AMD Ryzen 7 5700 @ 3700 MHz and I still get this when I Transcode. I have installed the Top plugin as well as add the variable device: Are you using the "Official" Plex container? I was unable to get it to work using LSIO or Binhex Plex containers. Did you enable HW transcoding in the Plex settings? Can you post a picture of the container settings? I will try to help as much as possible, but can only really share what worked for me. Quote Link to comment
jace055 Posted October 4, 2023 Share Posted October 4, 2023 (edited) @Hiko0 Below are some screenshots from a little testing today. I have a 7900 (non X) on an MSIX670 mobo. I run a bare metal VM passed through with an iNvidia graphics card. When idle the processor hovers around 5%. I am running Plex official docker v1.32.6.7557 This is 4 4K streams transcoded down to various bitrates. 2 Streams were being played in browser on the VM. The others were on different devices. Edited October 4, 2023 by jace055 1 Quote Link to comment
Hiko0 Posted October 7, 2023 Share Posted October 7, 2023 (edited) @jace055 Looking great! Thanks for sharing the screenshots! Does anyone know what comparable 4K tone-mapping numbers (CPU & GPU load) are on a modern Intel/nVidia transcoding server? Edited October 7, 2023 by Hiko0 Quote Link to comment
nfinete Posted October 10, 2023 Share Posted October 10, 2023 On 10/3/2023 at 12:59 PM, animeking1987 said: @Nofences I have followed your instructions for setting up the AMD transcoding and mine is still not HW transcoding. I have a AMD Ryzen 7 5700 @ 3700 MHz and I still get this when I Transcode. I have installed the Top plugin as well as add the variable device: Are you running a 5700 or a 5700g? The non g version doesn't have an iGPU. Quote Link to comment
matew Posted October 10, 2023 Share Posted October 10, 2023 (edited) @jace055 11% GPU utilization seems to me pretty low, are we sure that plex is not utilizing the CPU somehow as well? Edited October 11, 2023 by matew Quote Link to comment
jace055 Posted October 17, 2023 Share Posted October 17, 2023 On 10/10/2023 at 5:45 PM, matew said: @jace055 11% GPU utilization seems to me pretty low, are we sure that plex is not utilizing the CPU somehow as well? It does seem low to me as well. My main win/takeaway is the processor doesn't jump to 70-80% utilization when I start a single 4k transcode. So the GPU is doing something. I assumed the built in codec doesn't use much processing power from the processor itself and is offloading the workload to the dedicated chips. Quote Link to comment
Recommended Posts
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.