{"id":20777154,"url":"https://github.com/plexguide/unraid_intel-arc_deployment","last_synced_at":"2025-04-09T20:03:36.785Z","repository":{"id":252648386,"uuid":"841039872","full_name":"plexguide/Unraid_Intel-ARC_Deployment","owner":"plexguide","description":"Unraid - Comprehensive Guide to Enabling AV1 Encoding, Plex Deployment \u0026 GPU Management with Tdarr on Unraid 7.0+","archived":false,"fork":false,"pushed_at":"2025-04-02T20:57:10.000Z","size":355,"stargazers_count":105,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T20:03:30.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plexguide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-11T13:13:26.000Z","updated_at":"2025-04-09T18:28:40.000Z","dependencies_parsed_at":"2024-08-11T17:28:57.012Z","dependency_job_id":"92d82522-e0bd-45f1-aa6d-bf46b92a04ca","html_url":"https://github.com/plexguide/Unraid_Intel-ARC_Deployment","commit_stats":null,"previous_names":["plexguide/tdarr-av1-scripts","plexguide/unraid_intel-arc_deployment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexguide%2FUnraid_Intel-ARC_Deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexguide%2FUnraid_Intel-ARC_Deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexguide%2FUnraid_Intel-ARC_Deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plexguide%2FUnraid_Intel-ARC_Deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plexguide","download_url":"https://codeload.github.com/plexguide/Unraid_Intel-ARC_Deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103864,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T13:14:19.125Z","updated_at":"2025-04-09T20:03:36.773Z","avatar_url":"https://github.com/plexguide.png","language":"Shell","readme":"# AV1 - Intel ARC Encoding Guide via Unraid + Tdarr Node Scaling/Killer\n\n\u003ch2 align=\"center\"\u003eWant to Help? Click the Star in the Upper-Right Corner! ⭐\u003c/h2\u003e\n\n**NOTE**  \nWe’re using `ghcr.io/haveagitgat/tdarr:2.35.02` instead of `ghcr.io/haveagitgat/tdarr:latest`. \u003cbr\u003e\nThe latest probably works FINE, but just a note!\n\n**Change Log:**\n- **v1-3:** Original AV1 flow, Removed-B Frames, Improved Quality  \n- **v4:** Removed images from files, cutting failure rates from ~25% to 1–2%  \n- **v5:** Enhanced quality and simplified workflow \n- **v6:** Added a Special-ish Variable - If file is still to big, try again at a slightly lower quality\n\n\u003cimg width=\"1124\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4956d1d8-8c82-4f9c-95ac-e2df0bc85fb9\" /\u003e\n\n---\n\n## Introduction\n\nThis guide helps you optimize your media library by encoding to AV1 on Unraid while efficiently sharing GPU resources between Plex and Tdarr. You’ll learn how to:\n\n- Set up Intel ARC GPU support on Unraid.  \n- Configure Tdarr for AV1 encoding.  \n- Manage SABnzbd download speeds based on Plex streams (to prevent buffering).  \n- Automatically pause and resume Tdarr when Plex needs the GPU.  \n\nFollowing these steps will dramatically reduce video file sizes, saving huge amounts of storage, while ensuring Plex always has GPU priority. You’ll also see how to tweak download speeds to avoid streaming slowdowns.\n\n\u003e **Quick Tip:** Always test your AV1 encoding on a small library or a few files. Adjust CRF to balance quality and size before converting your entire collection.\n\n## PayPal Donations – Building My Daughter’s Future\n\nMy 12-year-old daughter loves singing, dancing, and exploring STEM. She’s an A-B honor roll student with big dreams for the future. Any donation you make will go directly toward her college fund, helping her turn those dreams into reality. Thank you for your support!\n\n[![Donate with PayPal button](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate?hosted_button_id=58AYJ68VVMGSC)\n\n---\n\n## Table of Contents\n\n- [Data Savings with AV1 Encoding](#data-savings-with-av1-encoding)\n- [AV1 Drawbacks](#av1-drawbacks)\n- [Upgrading to Unraid 7.0 and Installing Required Plugins](#upgrading-to-unraid-70-and-installing-required-plugins)\n  - [Installing Intel GPU TOP Plugin](#installing-intel-gpu-top-plugin)\n  - [Installing GPU Statistics Plugin](#installing-gpu-statistics-plugin)\n- [Deploying Plex with Intel ARC GPU Support](#deploying-plex-with-intel-arc-gpu-support)\n  - [Adding the Intel ARC GPU to the Plex Docker Template](#adding-the-intel-arc-gpu-to-the-plex-docker-template)\n  - [Configuring Plex Settings](#configuring-plex-settings)\n  - [Verifying GPU Transcoding](#verifying-gpu-transcoding)\n- [Setting Up Tdarr](#setting-up-tdarr)\n  - [Deploying Tdarr Server](#deploying-tdarr-server)\n  - [Tdarr Transcoding Location](#tdarr-transcoding-location)\n  - [Deploying Tdarr Node(s)](#deploying-tdarr-nodes)\n  - [Configuring Tdarr](#configuring-tdarr)\n- [Setting up the AV1 Tdarr Flow](#setting-up-the-av1-tdarr-flow)\n  - [What is the AV1 Flow?](#what-is-the-av1-flow)\n  - [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr)\n- [Setting Up Tdarr Libraries](#setting-up-tdarr-libraries)\n- [Optimizing AV1 Encoding Settings](#optimizing-av1-encoding-settings)\n- [SABNZBD Speed Control - Bonus](#sabnzbd-speed-control---bonus)\n- [Tdarr Node Killer Script](#tdarr-node-killer-script)\n  - [Overview](#overview)\n  - [Script Behavior](#script-behavior)\n  - [Step-by-Step Implementation for Unraid](#step-by-step-implementation-for-unraid)\n  - [Script Behavior After Plex Transcoding Stops](#script-behavior-after-plex-transcoding-stops)\n  - [Troubleshooting Common Issues](#troubleshooting-common-issues)\n- [Experimental: Running the Script on Other Operating Systems](#experimental-running-the-script-on-other-operating-systems)\n  - [Step-by-Step Implementation for Other OSes](#step-by-step-implementation-for-other-oses)\n- [Backup and Recovery Tips](#backup-and-recovery-tips)\n- [Summary](#summary)\n\n---\n\n## Data Savings with AV1 Encoding\n\nAV1 encoding drastically shrinks file sizes. In one example, using three Intel ARC GPUs to encode 10–15% of a large library yielded about **116TB** of savings. For a 300TB media collection, you can potentially reduce it to 75–100TB with careful AV1 conversion.\n\n\u003cimg width=\"373\" alt=\"image\" src=\"https://github.com/user-attachments/assets/09d36726-56d9-4c53-8589-eca2173e7283\"\u003e\n\nI’ve already saved **255TB** and counting!\n\n---\n\n## AV1 Drawbacks\n\nNo codec is perfect. Some devices lack native AV1 decoding, forcing Plex to handle software transcoding. AV1 also requires more resources to encode, which means encoding jobs take longer. For details, check out the [AV1 Drawbacks](https://github.com/plexguide/Unraid_Intel-ARC_Deployment/wiki/AV1-Drawbacks) page.\n\n---\n\n## Upgrading to Unraid 7.0 and Installing Required Plugins\n\nMake sure you’re on Unraid 7.0 or newer, then install the required GPU plugins before using Tdarr or running the Tdarr Node Killer script.\n\n### Installing Intel GPU TOP Plugin\n\nInstall **Intel GPU TOP** (by ich777) from Unraid Community Apps to monitor your Intel ARC GPU’s performance directly on Unraid.\n\n![Intel GPU TOP Plugin](https://i.imgur.com/0bHRqya.png)\n\n### Installing GPU Statistics Plugin\n\nThen install **GPU Statistics** (by b3rs3rk). Combined with Intel GPU TOP, it offers detailed GPU usage data during encoding or transcoding.\n\n![GPU Statistics Plugin](https://i.imgur.com/lJZgPvC.png)\n\nAfter installing both, you’ll see real-time GPU usage:\n\n![GPU Usage Example 1](https://i.imgur.com/toOvgvN.png)  \n![GPU Usage Example 2](https://i.imgur.com/jDbrB5a.png)\n\n---\n\n# Deploying Plex with Intel ARC GPU Support\n\n### Adding the Intel ARC GPU to the Plex Docker Template\n\nIn your Plex Docker template, add the Intel ARC GPU as a device. Plex won’t see the GPU without this.\n\n![Add Intel ARC GPU to Plex Template](https://i.imgur.com/Da4oeGV.png)\n\n### Configuring Plex Settings\n\nEnable hardware transcoding in Plex and HDR tone mapping (if supported). If your server has multiple GPUs, pick the correct one.\n\n\u003cimg width=\"1020\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2ed05f55-ee92-4011-9f6f-99c24b5d1a3f\"\u003e\n\n### Verifying GPU Transcoding\n\nPlay a video that needs transcoding. On Plex’s dashboard, watch the GPU usage. You should see minimal CPU usage and smooth playback. If you have an AV1 file handy, test it to confirm AV1 transcoding works too!\n\n\u003cimg width=\"286\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e182a603-a7b4-4ae3-b5f0-efbac58b505d\" /\u003e\n\n---\n\n# Setting Up Tdarr\n\n**What is Tdarr?**  \nTdarr streamlines media transcoding using a friendly GUI, handling conversions for you without complex command lines. At first, it might feel overwhelming, but once you get the hang of it, it’s incredibly powerful for media optimization.\n\n\u003e If you find this guide helpful, please click the ★ (Star) button above. It shows your support and helps others discover this guide.\n\n## Deploying Tdarr Server\n\nYou’ll see an option to deploy the server and node in a single container. To simplify troubleshooting, **deploy them separately**:\n\n1. Install **Tdarr** (not Tdarr Node) from the Unraid App Store.  \n2. Name it clearly (e.g., “Server” or “TdarrServer”).  \n3. Check that the server IP is correct (usually your Unraid server’s IP).  \n4. Set **Internal Node** to **False** so you can install a separate node container.\n\n\u003cimg width=\"381\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e3f60be8-5c2b-4ea1-8c36-af7e25097603\" /\u003e\n\n\u003cimg width=\"557\" alt=\"image\" src=\"https://github.com/user-attachments/assets/126ff9c9-7b32-4fdf-82cc-864bedf85700\" /\u003e\n\n\u003cimg width=\"688\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b70a2724-b0f7-463e-8da3-c1e7ad3d052b\" /\u003e\n\n## Tdarr Transcoding Location\n\nDecide where to store transcoded files temporarily. For small workloads, an SSD/NVMe cache is enough. If you plan to transcode heavily (multiple streams, multiple GPUs), consider a dedicated NVMe. Avoid HDDs or RAM to reduce bottlenecks and random errors.\n\n\u003e **Important:** High-volume transcoding quickly wears down SSD/NVMe drives. Many users add a lower-end NVMe just for Tdarr. This preserves your main system drives.\n\nFor instance, I use a cheap 512GB NVMe for Tdarr, since Tdarr can easily handle hundreds of terabytes of reads/writes. Doing so keeps my primary NVMe healthier.\n\n\u003cimg width=\"754\" alt=\"image\" src=\"https://github.com/user-attachments/assets/daac629c-3fe9-45e4-89e9-c8e50686e2ea\" /\u003e\n\n## Deploying Tdarr Node(s)\n\nOnce the Tdarr Server is running, install **Tdarr Node** (a separate listing). The server manages libraries and tasks, while the node handles the actual transcoding.\n\n\u003cimg width=\"397\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6b384a42-194d-4089-b1ff-89d6cca77728\" /\u003e\n\n1. Install **Tdarr Node** from the Unraid App Store.  \n2. Name it clearly, like “Node1.” If you have multiple GPUs, install multiple node containers (Node1, Node2, etc.).\n\n\u003cbr\u003e\u003cimg width=\"477\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ce39a4d-1479-433c-b3c8-9eceb4ebf044\" /\u003e\u003cbr\u003e\n\n3. Ensure the server IP and node IP match.\n\n\u003cbr\u003e\u003cimg width=\"749\" alt=\"image\" src=\"https://github.com/user-attachments/assets/736eff11-ec78-441d-9c82-0f11def877bd\" /\u003e\u003cbr\u003e\n\n4. Keep each node’s configs and logs separate.  \n5. Match the transcode cache path to the server’s path. If you have more than one node, label them for clarity.  \n6. Assign the correct GPU to each node. Don’t overlap GPUs if you have multiple nodes.\n\n\u003cbr\u003e\u003cimg width=\"769\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b7a2d3e3-288b-4f16-9424-74a82b8f6451\" /\u003e\u003cbr\u003e\n\n**Identify GPUs** by running:\n\u003cbr\u003e\u003cimg width=\"457\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3e8b0028-c1b2-4517-b42d-731c2b01d7f3\" /\u003e\u003cbr\u003e\n\n\u003e **Warning:** One entry might be your iGPU. Don’t assign your iGPU to a Tdarr node.\n\n**Tip:** Go to Plex → Settings → Transcoding. When you pick a GPU in Plex, the GPU order matches the order from `ls -la /dev/dri`. In the example below, `render129` is the iGPU, so I skip it and use `render130` for Node2 and `render131` for Node3.\n\n\u003cbr\u003e\u003cimg width=\"701\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1dfa28a8-ddd4-4c0b-a1f9-f4ff2b9c5e9b\" /\u003e\u003cbr\u003e\n\n### Configuring Tdarr\n\n1. Go to `http://\u003cyour-unraid-IP\u003e:8265`.  \n2. You should see your nodes listed:\n\n\u003cbr\u003e\u003cimg width=\"409\" alt=\"image\" src=\"https://github.com/user-attachments/assets/db6b2dc8-6fb7-4acf-be86-785705a44961\" /\u003e\u003cbr\u003e\n\n3. For each node, click it and set CPU/GPU worker counts based on your ARC card:\n\n    - **ARC 310/380/500/700**  \n      - Transcode: CPU (0), GPU (2–4)  \n      - Health Check: CPU (2), GPU (0)  \n\n\u003cbr\u003e\u003cimg width=\"548\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8dc965c7-d801-42b3-af1f-c5310e2e2fad\" /\u003e\u003cbr\u003e\n\n4. Click **Options**, scroll to the bottom, and enable “GPU Workers to do CPU Tasks,” then close.\n\n\u003cbr\u003e\u003cimg width=\"431\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3cb3786a-025a-48c6-ba72-c6835effef11\" /\u003e\u003cbr\u003e\n\n5. In the staging section, check **Auto-accept successful transcodes** so Tdarr replaces old files automatically.\n\n\u003cbr\u003e\u003cimg width=\"745\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b78a71c2-71c9-4a01-a5c7-40d34ff26775\" /\u003e\u003cbr\u003e\n\n6. In **Status**, pick the queue order (e.g., largest files first).\n\n\u003cbr\u003e\u003cimg width=\"774\" alt=\"image\" src=\"https://github.com/user-attachments/assets/111cbddd-bfe3-437f-b79e-7fd00ec90c59\" /\u003e\u003cbr\u003e\n\n---\n\n# Setting up the AV1 Tdarr Flow\n\n**Change Log**  \n- **v1:** Original AV1 flow  \n- **v2:** Removed B-frames  \n- **v3:** Improved quality  \n- **v4:** Removed images from files (failure rates ~25% → 1–2%)  \n- **v5:** Better quality, simpler flow\n- **v6:** Added a retry value if file is still to big\n\n**JSON Script:** [av1_flow_v6.json](av1_flow_v5.json)\n\n\u003cimg width=\"1124\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c543f77c-5b1e-4b35-89d4-ab85444dde15\" /\u003e\n\n## What is the AV1 Flow?\n\nThe AV1 Flow is a prebuilt workflow that encodes your media to AV1 for huge storage savings, without requiring expert knowledge of encoding parameters. You must import it before creating your Tdarr libraries.\n\n## Importing the AV1 Flow in Tdarr\n\n1. In Tdarr, go to **Flows**.  \n2. Scroll down and click **Import**.  \n3. Paste the AV1 Flow JSON.  \n4. Apply it to your libraries.\n\n![Adding a New Flow in Tdarr](https://i.imgur.com/nLzQi1b.png)  \n![Scroll to Import Option](https://i.imgur.com/hmYNetQ.png)  \n![Pasting the JSON Content](https://i.imgur.com/Qe13kYg.png)\n\n---\n\n# Optimizing AV1 Encoding Settings\n\nWithin the AV1 flow, adjust **CRF** and **bitrate** to balance quality and size. Make sure you’ve enabled hardware acceleration so the GPU does the heavy lifting. In general:\n\n- **Higher CRF** → Lower quality, smaller files  \n- **Lower CRF** → Higher quality, larger files  \n\nI’ve found the default settings in the AV1 Flow give an excellent quality-to-size ratio. If you want finer control, test small sets of files and tweak CRF/bitrate until you find your sweet spot.\n\n\u003cbr\u003e\u003cimg width=\"828\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8e5474a0-2601-4d11-a716-4bc3168d6636\" /\u003e\u003cbr\u003e\n\u003cbr\u003e\u003cimg width=\"744\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c53b379a-43e2-4d02-bb10-0e6073b53a66\" /\u003e\u003cbr\u003e\n\n---\n\n# Setting Up Tdarr Libraries\n\nLibraries let you specify locations and define how Tdarr processes them. For instance, you might have separate libraries for “tv” and “movies.” Adjust to your setup.\n\n1. Click **Libraries**:  \n\u003cbr\u003e\u003cimg width=\"646\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2bd6102a-9694-42f1-842d-3cc70f087a0f\" /\u003e\u003cbr\u003e\n\n2. Click **Library+**:\n\u003cbr\u003e\u003cimg width=\"130\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f5c6a119-afb6-4f63-8dbc-c2f1db63c019\" /\u003e\u003cbr\u003e\n\n3. Name your new library (e.g., “TV,” “Movies,” etc.).  \n4. Under **Source**, point it to your media folder. Enable [Hourly] scanning to catch new content.\n\n\u003cbr\u003e\u003cimg width=\"909\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2142aa48-a7a8-4e3f-9dcb-d7df3aed5570\" /\u003e\u003cbr\u003e\n\u003cbr\u003e\u003cimg width=\"292\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e5bb4b33-5115-4d65-a4de-7a28d705a0d0\" /\u003e\u003cbr\u003e\n\n5. Under **Transcode Cache**, set the path to `/temp` (or your chosen transcode folder).\n\n\u003cbr\u003e\u003cimg width=\"404\" alt=\"image\" src=\"https://github.com/user-attachments/assets/22f9c1f8-a3d8-49a9-8ce6-678c1de28ce4\" /\u003e\u003cbr\u003e\n\n6. In **Filters**, add `AV1` to “Codecs to Skip,” so you never re-encode existing AV1 files. You can also skip small files if you like.\n\n\u003cbr\u003e\u003cimg width=\"297\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ed82ff6-aa65-4fbe-a576-39810eeed1c3\" /\u003e\u003cbr\u003e\n\n7. In **Transcode Options**, uncheck “Classic Plugins,” go to the **Flows** tab, and pick the AV1 flow. (If you haven’t imported the flow yet, see the [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr) section first.)\n\n\u003cbr\u003e\u003cimg width=\"1004\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a0a4028d-c539-4df9-8e09-4b25a6a2a2a5\" /\u003e\u003cbr\u003e\n\n8. Repeat for all your libraries.  \n9. Perform a **Fresh New Scan** to apply changes.\n\n\u003cbr\u003e\u003cimg width=\"284\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0556d967-8ab3-4628-86d4-12a53a369c0f\" /\u003e\u003cbr\u003e\n\n10. After scanning, the home page should show transcoding activity. If not, re-check your GPU assignments and node settings.\n\n\u003cbr\u003e\u003cimg width=\"1158\" alt=\"image\" src=\"https://github.com/user-attachments/assets/642f3102-7cfa-4c49-b1d0-0f408930f36d\" /\u003e\u003cbr\u003e\n\n11. If you see tons of errors, review your GPU configuration or flow settings.\n\n\u003cbr\u003e\u003cimg width=\"1254\" alt=\"image\" src=\"https://github.com/user-attachments/assets/474ce9bf-d883-4b31-afa7-f0ccb909dd0f\" /\u003e\u003cbr\u003e\n\n---\n\n# Tdarr Node Killer Script\n\n**Change Log**  \n- **v1:** Original script  \n- **v2:** Switched to Tautulli for simpler detection  \n- **v3:** Option to avoid killing Tdarr node on local-only transcodes  \n- **v4:** Added a threshold to kill the Tdarr container only if transcodes exceed (default) 3 sessions  \n- **v5:** Added Tautulli API connectivity check in logs at startup\n- **v6:** Added Optional GPU Job Scaling instead of Killing Tdarr Node  \n\n## Overview\n\nThe Tdarr Node Killer script ensures Plex always has GPU priority. When Plex starts transcoding on the same GPU, the script stops Tdarr. Once Plex stops, it waits a short cooldown and restarts Tdarr.\n\n## Script Behavior\n\n- Stops the Tdarr Node container as soon as Plex begins GPU transcoding.  \n- Waits for Plex transcoding to end, then restarts Tdarr after a short cooldown (e.g., 3 minutes).\n\n**Script (OLD):** [tdarr_node_killer.sh](tdarr_node_killer.sh)\n\u003cbr\u003e**Script (NEW):** [tdarr_node_scaling.sh](tdarr_node_scaling.sh) - ***Instructions Not Updated Yet***\n\nUse **User Scripts** in Unraid to install this script, set it to run on array startup, and keep it running in the background.\n\n\u003cimg width=\"403\" alt=\"image\" src=\"https://github.com/user-attachments/assets/728a6959-cfaf-44e5-8302-ab43372c87a1\"\u003e\n\n## Step-by-Step Implementation for Unraid\n\n1. Confirm Tdarr Node the targetted Node is running when no one’s transcoding in Plex:  \n   \u003cbr\u003e\u003cimg width=\"505\" alt=\"image\" src=\"https://github.com/user-attachments/assets/33afaf9e-107e-4b74-9ce2-05cc818d0666\" /\u003e\u003cbr\u003e\n\n2. The script runs and waits for Plex transcoding activity:  \n   \u003cbr\u003e\u003cimg width=\"616\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0e82792a-9164-45b8-8d52-c7c801cb0c82\" /\u003e\u003cbr\u003e\n\n3. A user begins transcoding in Plex:\n\n   \u003cimg width=\"279\" alt=\"image\" src=\"https://github.com/user-attachments/assets/96d6d64c-4dff-440a-89ae-c978d29766f7\" /\u003e\n\n4A. (Tdarr Scaling) Script detects transcoding threshold set and reduces amount of Tdarr GPU Workers:\n\n   \u003cbr\u003e\u003cimg width=\"438\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7ed827b3-fd50-4b60-9a59-82be72ada416\" /\u003e\u003cbr\u003e\n\n4B. (Tdarr Killer) Script detects transcoding exceeding set threshold and kills Tdarr Node:\n\n   \u003cbr\u003e\u003cimg width=\"557\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8efc5c6a-b01a-4b06-8ea2-3b5d15108cab\" /\u003e\u003cbr\u003e\n   \u003cbr\u003e\u003cimg width=\"322\" alt=\"image\" src=\"https://github.com/user-attachments/assets/68dcc0c5-b347-4bed-86cb-53e58637b48b\" /\u003e\u003cbr\u003e\n\n5. Tdarr Node [N1] is now stopped:\n\n   \u003cbr\u003e\u003cimg width=\"548\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e10fc050-2000-49a6-be46-a49b9a8609e2\" /\u003e\u003cbr\u003e\n\n## Script Behavior After Plex Transcoding Stops\n\nWhen Plex finishes transcoding, the script waits a cooldown (e.g., 180 seconds) and then restarts Tdarr:\n\n1. You’ll see a countdown timer in the logs before it restarts the container.  \n2. Tdarr Node starts again after the countdown:\n\n   \u003cbr\u003e\u003cimg width=\"611\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7ca1d8b0-efac-44ab-9701-24ef525f33c7\"\u003e\u003cbr\u003e\n   \u003cbr\u003e\u003cimg width=\"323\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9730388b-c5e8-42fc-9392-69b58d9554d7\" /\u003e\u003cbr\u003e\n\n3. Tdarr Node is fully online:\n\n   ![Tdarr Node Online](https://i.imgur.com/M1M2vSL.png)\n\n## Troubleshooting Common Issues\n\n- **Plex Not Using GPU?** Re-check your Plex Docker template and transcoding settings.  \n- **Tdarr Not Restarting?** Make sure the script has the right container name, Tautulli API key, and is set to run in the background.  \n- **High CPU Usage?** Some features, like HDR tone mapping, can be CPU-intensive. Ensure your GPU and drivers support it. Update drivers if needed.\n\n---\n\n## Experimental: Running the Script on Other Operating Systems\n\nYou can run this script on other Linux distributions or OSes that support Docker and systemd. The steps are similar: place the script, set permissions, and create a systemd service.\n\n1. **Save the Script**: Save your Tdarr Node Killer Script as `tdarr_node_killer.sh` in `/usr/local/bin/`.\n\n    ```bash\n    sudo nano /usr/local/bin/tdarr_node_killer.sh\n    ```\n\n2. **Set the Proper Permissions**:\n\n    ```bash\n    sudo chmod +x /usr/local/bin/tdarr_node_killer.sh\n    sudo chown root:root /usr/local/bin/tdarr_node_killer.sh\n    ```\n\n3. **Create a Service File**: Create a service file for the script:\n\n    ```bash\n    sudo nano /etc/systemd/system/tdarr_node_killer.service\n    ```\n\n4. **Add the Following Content**:\n\n    ```ini\n    [Unit]\n    Description=Tdarr Node Killer Script\n    After=network.target\n\n    [Service]\n    Type=simple\n    ExecStart=/bin/bash /usr/local/bin/tdarr_node_killer.sh\n    Restart=on-failure\n\n    [Install]\n    WantedBy=multi-user.target\n    ```\n\n5. **Reload Systemd**:\n\n    ```bash\n    sudo systemctl daemon-reload\n    ```\n\n6. **Start and Enable the Service**:\n\n    ```bash\n    sudo systemctl start tdarr_node_killer.service\n    sudo systemctl enable tdarr_node_killer.service\n    ```\n\nThis ensures the script runs automatically and manages your GPU resources even if you’re not on Unraid.\n\n---\n\n## Backup and Recovery Tips\n\nBefore making changes:\n\n- Backup Plex configs (metadata, watch history, etc.).\n- Backup Docker templates so you can quickly restore containers.\n- Backup your Unraid flash drive so you don’t lose your server setup.\n\nTest your backups occasionally to ensure they work when you need them.\n\n---\n\n## Summary\n\nBy setting up AV1 encoding with Intel ARC GPUs, you can achieve massive storage savings and still maintain great quality. Adding the optional Tdarr Node Killer Script ensures Plex always has priority access to the GPU when needed. With careful tuning and a bit of experimentation, you can streamline your server’s performance, reduce storage costs, and keep everyone happy with smooth, high-quality streams.\n\n**Found this useful?** Consider clicking the star (★) button at the top!\n","funding_links":["https://www.paypal.com/donate?hosted_button_id=58AYJ68VVMGSC"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexguide%2Funraid_intel-arc_deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplexguide%2Funraid_intel-arc_deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplexguide%2Funraid_intel-arc_deployment/lists"}