From 28a99d229f422cc6c24c6f45e18b7fadf9a01f89 Mon Sep 17 00:00:00 2001
From: Admin9705 <24727006+Admin9705@users.noreply.github.com>
Date: Thu, 13 Mar 2025 08:52:28 -0400
Subject: [PATCH] Update README.md
---
README.md | 355 +++++++++++++-----------------------------------------
1 file changed, 83 insertions(+), 272 deletions(-)
diff --git a/README.md b/README.md
index 57e454a..9458bb9 100644
--- a/README.md
+++ b/README.md
@@ -1,237 +1,43 @@
-# AV1 - Intel ARC Encoding Guide via Unraid + Tdarr Node Killer
-
-
Want to Help? Click the Star in the Upper-Right Corner! ⭐
-
-**NOTE**
-
-This is using `ghcr.io/haveagitgat/tdarr:2.35.02` instead of `ghcr.io/haveagitgat/tdarr:latest`.
-
-**Change Log:**
-- **v1:** Original AV1 flow
-- **v2:** Removed B-frames
-- **v3:** Improved quality
-- **v4:** Removed images from files, reducing failure rates from ~25% to nearly 1-2%
-- **v5:** Better quality improvement and adjusted flow for simplicity
-
----
-
-**Introduction**
-
-This guide shows you how to optimize your media library with AV1 encoding on Unraid while efficiently managing GPU resources shared between Plex and Tdarr. By following these steps, you will reduce video file sizes, save substantial storage space, and ensure Plex always has access to the GPU when it needs it. You will also learn how to pause Tdarr automatically when Plex requires the GPU and then restart Tdarr afterward. Additionally, this guide explains how to adjust SABnzbd download speeds based on Plex streaming activity to prevent buffering.
-
-**What you’ll learn:**
-- How to configure your Intel ARC GPU on Unraid.
-- How to set up and optimize Tdarr for AV1 encoding.
-- How to manage SABnzbd download speeds based on Plex streaming activity.
-- How to use the Tdarr Node Killer script to prioritize Plex GPU usage over Tdarr.
-
-Whether you’re an experienced Unraid user or just beginning, this step-by-step guide will help you achieve better resource management, significant storage savings, and an improved streaming experience.
-
-**QUICK NOTE:** Run a test on a small library or a few files, tweaking the CRF numbers before deploying AV1 on your entire library.
-
----
-
-## Table of Contents
-
-- [Data Savings with AV1 Encoding](#data-savings-with-av1-encoding)
-- [AV1 Drawbacks](#av1-drawbacks)
-- [Upgrading to Unraid 7.0 and Installing Required Plugins](#upgrading-to-unraid-70-and-installing-required-plugins)
- - [Installing Intel GPU TOP Plugin](#installing-intel-gpu-top-plugin)
- - [Installing GPU Statistics Plugin](#installing-gpu-statistics-plugin)
-- [Deploying Plex with Intel ARC GPU Support](#deploying-plex-with-intel-arc-gpu-support)
- - [Adding the Intel ARC GPU to the Plex Docker Template](#adding-the-intel-arc-gpu-to-the-plex-docker-template)
- - [Configuring Plex Settings](#configuring-plex-settings)
- - [Verifying GPU Transcoding](#verifying-gpu-transcoding)
-- [Setting Up Tdarr](#setting-up-tdarr)
- - [Deploying Tdarr Server](#deploying-tdarr-server)
- - [Tdarr Transcoding Location](#tdarr-transcoding-location)
- - [Deploying Tdarr Node(s)](#deploying-tdarr-nodes)
- - [Configuring Tdarr](#configuring-tdarr)
-- [Setting up the AV1 Tdarr Flow](#setting-up-the-av1-tdarr-flow)
- - [What is the AV1 Flow?](#what-is-the-av1-flow)
- - [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr)
-- [Setting Up Tdarr Libraries](#setting-up-tdarr-libraries)
-- [Optimizing AV1 Encoding Settings](#optimizing-av1-encoding-settings)
-- [SABNZBD Speed Control - Bonus](#sabnzbd-speed-control---bonus)
-- [Tdarr Node Killer Script](#tdarr-node-killer-script)
- - [Overview](#overview)
- - [Script Behavior](#script-behavior)
- - [Step-by-Step Implementation for Unraid](#step-by-step-implementation-for-unraid)
- - [Script Behavior After Plex Transcoding Stops](#script-behavior-after-plex-transcoding-stops)
- - [Troubleshooting Common Issues](#troubleshooting-common-issues)
-- [Experimental: Running the Script on Other Operating Systems](#experimental-running-the-script-on-other-operating-systems)
- - [Step-by-Step Implementation for Other OSes](#step-by-step-implementation-for-other-oses)
-- [Backup and Recovery Tips](#backup-and-recovery-tips)
-- [Summary](#summary)
-
----
-
-## Data Savings with AV1 Encoding
-
-AV1 encoding drastically reduces file sizes. Using three Intel ARC GPUs to encode just 10-15% of a large library saved about 116TB. For a 300TB collection, careful AV1 conversion could reduce it to 75-100TB.
-
-
-
-In other words, AV1 can deliver huge storage and cost savings. >>> Currently saved 255TB!
-
----
-
-## AV1 Drawbacks
-
-AV1 is not perfect. Some devices may not support AV1 decoding natively, and AV1 encoding can be more resource-intensive, taking longer to complete. For more details, visit the [AV1 Drawbacks](https://github.com/plexguide/Unraid_Intel-ARC_Deployment/wiki/AV1-Drawbacks) page.
-
----
-
-## Upgrading to Unraid 7.0 and Installing Required Plugins
-
-Ensure you run Unraid 7.0 or newer, and install the required GPU plugins before setting up s or using the Tdarr Node Killer script.
-
-### Installing Intel GPU TOP Plugin
-
-Install **Intel GPU TOP** by ich777 from the Unraid Community Apps. It lets you monitor Intel ARC GPU performance directly in Unraid.
-
-
-
-### Installing GPU Statistics Plugin
-
-Install the **GPU Statistics** plugin by b3rs3rk. With Intel GPU TOP, this provides comprehensive GPU usage details during encoding or transcoding.
-
-
-
-After installing both, you can see real-time GPU usage:
-
-
-
-
----
-
-# Deploying Plex with Intel ARC GPU Support
-
-### Adding the Intel ARC GPU to the Plex Docker Template
-
-In your Plex Docker template, add the Intel ARC GPU as a device. Without this, Plex will not recognize the GPU for hardware acceleration.
-
-
-
-### Configuring Plex Settings
-
-Enable hardware transcoding in Plex and HDR tone mapping (if supported). If multiple GPUs exist, choose the correct one.
-
-
-
-### Verifying GPU Transcoding
-
-Play a media file that requires transcoding. Check Plex’s dashboard and GPU stats. You should see minimal CPU usage and smooth playback. If you have an AV1 file, play that for the test to verify that AV1 transcoding is working also!
-
-
-
----
-
-# Setting Up Tdarr
-
-**What is Tdarr?**
-Tdarr simplifies media transcoding with a user-friendly interface. It automates conversions without you needing complex command-line knowledge. Although it may seem confusing initially, once you understand it, Tdarr becomes an indispensable tool for media optimization.
-
-If you find this guide helpful, consider clicking the ★ (Star) button above. It shows your support and helps others find this resource.
-
-## Deploying Tdarr Server
-
-When installing Tdarr, you may see an option to deploy both the server and node in one container. For easier troubleshooting, deploy them separately.
-
-1. Install **Tdarr** (not Tdarr Node) from the Unraid App Store.
-2. Name it clearly, e.g., “Server” “TServer” “TdarrServer”
-3. Ensure the server IP is correct (usually your Unraid server’s IP).
-4. Set the internal node option to **False**, so you will deploy a separate node container later.
-
-
-
-
-
-
-
-## Tdarr Transcoding Location
-
-Choose a suitable location for transcoding. For occasional use, an SSD/NVMe cache is fine. For heavy use (multiple streams, multiple GPUs), consider a dedicated NVMe. Avoid HDDs or RAM to prevent bottlenecks and errors.
-
-### Warning: Bottlenecks & SSD Wear
-
-Continuous transcoding strains SSD/NVMe drives. Using a dedicated, cost-effective NVMe helps preserve your primary drives’ health.
-
-Note this is optional. I have a cheap 512GB NVME that Tdarr transcodes to. Since Tdarr will transcode 100s of Terabytes of, avoid wearing out your primary SSD/NVME. I had an NVME provide me BAD SMART warning for reliability (due to wear and tear). I still use it, but cautiously (and works fine).
-
-I also personally encountered where Tdarr bottleneck my primary NVME due to the amount of GPU's and Transcodes reading and writing to my primary appdata NVME.
-
-
-
-## Deploying Tdarr Node(s)
-
-After deploying the Tdarr Server, install the **Tdarr Node** (listed separately). The node performs transcoding, while the server manages nodes, libraries, and workflows.
-
-
-
-1. Install **Tdarr Node** from the Unraid App Store.
-2. Give it a clear name, e.g., Node1. For multiple GPUs, deploy more nodes (N1, N2, etc.).
-
-

-3. Ensure the server IP and Node IP match.
-
-

-4. Keep configs/logs organized per node.
-5. Match the transcode cache path from the server’s template. Add node identifiers if using multiple nodes.
-6. Assign the correct GPU to each node. If multiple nodes exist, ensure they do not share the same GPU.
-
-

-
-To identify GPUs:
-* `ls -la /dev/dri/`
-

-**WARNING:** One entry might be your iGPU. Do not assign the iGPU to a Tdarr Node.
+> **Warning:** One entry might be your iGPU. Don’t assign your iGPU to a Tdarr node.
-_Tip:_ Visit your Plex and headover to Transcoding (as shown in the picture) and click your GPU list. The listed order shown in Plex is the same order of the GPUs when typing `ls -la /dev/dri`. In the photo example below, you will notice I skipped render129, which is actually the iGPU.
+**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.

-Plex lists my order of graphics cards as `Intel ARC 380 > Raphel (AMD iGPU) > Intel ARC 380 > Intel ARC 380`. The second one listed on Plex (Raphel - AMD iGPU) is in the same order of `ls -la /dev/dri` as render129. Basically, I skipped that one and used render130 for (Node2) and render131 for N3 (Node3).
-
### Configuring Tdarr
-Go to:
-* http://ip-address:8265
-
-If configured correctly, you will see your nodes:
+1. Go to `http://:8265`.
+2. You should see your nodes listed:

-If you have multiple nodes, repeat the following steps for each:
+3. For each node, click it and set CPU/GPU worker counts based on your ARC card:
-1. Click a Node.
-2. Set the numbers according to your ARC card type:
+ - **ARC A310**
+ - Transcode: CPU (0), GPU (2–3)
+ - Health Check: CPU (2), GPU (0)
-- ARC 310
- - Transcode: CPU (0), GPU (2-3)
- - Healthcheck: CPU (2), GPU (0)
+ - **ARC A380**
+ - Transcode: CPU (0), GPU (2–4)
+ - Health Check: CPU (2), GPU (0)
-- ARC 380
- - Transcode: CPU (0), GPU (2-4)
- - Healthcheck: CPU (2), GPU (0)
-
-- ARC 500/700 Series
- - Transcode: CPU (0), GPU (2-5)
- - Healthcheck: CPU (2), GPU (0)
+ - **ARC A500/A700**
+ - Transcode: CPU (0), GPU (2–5)
+ - Health Check: CPU (2), GPU (0)

-3. Click **Options**, scroll towards the bottom, enable “GPU Workers to do CPU Tasks,” then close the window.
+4. Click **Options**, scroll to the bottom, and enable “GPU Workers to do CPU Tasks,” then close.

-4. In the staging section, check “auto-accept successful transcodes.” Not doing this prevents Tdarr from replacing old files and wastes space.
+5. In the staging section, check **Auto-accept successful transcodes** so Tdarr replaces old files automatically.

-5. Scroll further down to “Status” and adjust the order of transcoding. For example, start with your largest files. Customize as desired.
+6. In **Status**, pick the queue order (e.g., largest files first).

@@ -239,40 +45,42 @@ If you have multiple nodes, repeat the following steps for each:
# Setting up the AV1 Tdarr Flow
-**Change Log:**
-- **v1:** Original AV1 flow
-- **v2:** Removed B-frames
-- **v3:** Improved quality
-- **v4:** Removed images from files, reducing failure rates from ~25% to nearly 1-2%
-- **v5:** Better quality improvement and adjusted flow for simplicity
+**Change Log**
+- **v1:** Original AV1 flow
+- **v2:** Removed B-frames
+- **v3:** Improved quality
+- **v4:** Removed images from files (failure rates ~25% → 1–2%)
+- **v5:** Better quality, simpler flow
**JSON Script:** [av1_flow_v5.json](av1_flow_v5.json)
-### What is the AV1 Flow?
+## What is the AV1 Flow?
-The AV1 Flow is a predefined workflow that transcodes media into AV1, delivering significant space savings without requiring you to master encoding parameters. This step is required prior to setting up the libraries!
+The 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.
-### Importing the AV1 Flow in Tdarr
+## Importing the AV1 Flow in Tdarr
-1. Open the Flows section in Tdarr.
-2. Scroll down and select “Import.”
-3. Paste the AV1 Flow JSON.
+1. In Tdarr, go to **Flows**.
+2. Scroll down and click **Import**.
+3. Paste the AV1 Flow JSON.
4. Apply it to your libraries.



-## Optimizing AV1 Encoding Settings
+---
-Adjust CRF and bitrate in the AV1 flow to balance quality and file size. Ensure hardware acceleration is on so the GPU does most of the work. Test out on a few files to figure out where you like it, but I have discovered over time the set numbers provide the best balance between quality and size.
+# Optimizing AV1 Encoding Settings
-Keep in mind the following:
+Within 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:
-* Bigger Number: Worst Quality, Smaller File
-* Lower Number: Better Quality, Bigger File
+- **Higher CRF** → Lower quality, smaller files
+- **Lower CRF** → Higher quality, larger files
+
+I’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.


@@ -281,114 +89,117 @@ Keep in mind the following:
# Setting Up Tdarr Libraries
-Libraries let you target specific media locations. For simplicity, we’ll use “tv” and “movies” as examples, but you can create as many as needed.
-
-1. Click **Libraries**:
+Libraries 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.
+1. Click **Libraries**:

2. Click **Library+**:
-

-3. Name it “TV” or “Movies.” Repeat these steps for additional libraries.
-4. Under **Source**, set your media path. Also below that, turn on the [hourly] scan to find new items (important).
+3. Name your new library (e.g., “TV,” “Movies,” etc.).
+4. Under **Source**, point it to your media folder. Enable [Hourly] scanning to catch new content.


-5. Under **Transcode Cache**, set the path as shown (e.g., /temp).
+5. Under **Transcode Cache**, set the path to `/temp` (or your chosen transcode folder).

-6. Under **Filters**, add `AV1` to “Codecs to Skip” so you do not re-encode existing AV1 files. You can also skip small files if desired.
+6. 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.

-7. Under **Transcode Options**, deselect classic plugins, select the “Flows” tab, and choose the AV1 flow. If you have not yet imported the AV1 flow, follow the steps in the AV1 Flow section above this section and then return here.
+7. 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.)

-8. Repeat for all your libraries.
-9. Perform a **FRESH NEW SCAN** to apply changes.
+8. Repeat for all your libraries.
+9. Perform a **Fresh New Scan** to apply changes.

-10. Return to the home page. After a few minutes, you should see transcoding activity. If not, review GPU and node assignments.
+10. After scanning, the home page should show transcoding activity. If not, re-check your GPU assignments and node settings.

-11. If errors increase rapidly, double-check configurations or GPU assignments.
+11. If you see tons of errors, review your GPU configuration or flow settings.

---
+# SABNZBD Speed Control - Bonus
+
+You can also tie SABnzbd’s download speed to Plex streaming demand. By throttling SABnzbd when Plex is active, you minimize buffering. Check out Tautulli’s scripts or the SABnzbd API for ways to reduce speed during high stream loads. This is optional but can significantly improve user experience if you often saturate your internet bandwidth with downloads.
+
+---
+
# Tdarr Node Killer Script
-**Change Log:**
+**Change Log**
- **v1:** Original script
-- **v2:** Uses Tautulli for simpler detection
-- **v3:** Added option to NOT kill Tdarr node when transcoding LOCAL ONLY
-- **v4:** Added a threshold transcode number option to kill the tdarr container. Default is 3. (If 2 are watching, it keeps running).
-- **v5:** Added startup verification that it connects to the Tautulli API in the logs when it starts up
+- **v2:** Switched to Tautulli for simpler detection
+- **v3:** Option to avoid killing Tdarr node on local-only transcodes
+- **v4:** Added a threshold to kill the Tdarr container only if transcodes exceed (default) 3 sessions
+- **v5:** Added Tautulli API connectivity check in logs at startup
-### Overview
+## Overview
-The Tdarr Node Killer script ensures Plex gets GPU priority. If Plex and Tdarr share the GPU, the script pauses Tdarr when Plex begins transcoding and restarts it after Plex finishes.
+The 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.
-### Script Behavior
+## Script Behavior
-- When Plex starts transcoding, it stops the Tdarr Node.
-- After Plex stops, it waits a cooldown (e.g., 3 minutes) before restarting Tdarr, preventing rapid cycling.
+- Stops the Tdarr Node container as soon as Plex begins GPU transcoding.
+- Waits for Plex transcoding to end, then restarts Tdarr after a short cooldown (e.g., 3 minutes).
**Script:** [tdarr_node_killer.sh](tdarr_node_killer.sh)
-Install User Scripts, add the script, set it to run at array startup, and run it in the background.
+Use **User Scripts** in Unraid to install this script, set it to run on array startup, and keep it running in the background.
-### Step-by-Step Implementation for Unraid
+## Step-by-Step Implementation for Unraid
-1. Tdarr Node [N1] running, no Plex transcoding:
+1. Confirm Tdarr Node [N1] is running when no one’s transcoding in Plex:

-2. Script monitoring Plex:
+2. The script runs and waits for Plex transcoding activity:

-3. Plex user starts transcoding:
-
+3. A user begins transcoding in Plex:
+

-4. Script detects transcoding & stops Tdarr Node:
+4. The script detects transcoding and stops the Tdarr Node:
+

-

-5. Tdarr Node [N1] completely stopped:
+5. Tdarr Node [N1] is now stopped:
+

-### Script Behavior After Plex Transcoding Stops
+## Script Behavior After Plex Transcoding Stops
-After Plex finishes, the script waits, then restarts Tdarr:
+When Plex finishes transcoding, the script waits a cooldown (e.g., 180 seconds) and then restarts Tdarr:
-1. Countdown 180 seconds before restarting the shutdown docker container.
+1. You’ll see a countdown timer in the logs before it restarts the container.
+2. Tdarr Node starts again after the countdown:
-2. Tdarr Node restarts after cooldown:
-

-

-3. Tdarr Node fully online again:
-
+3. Tdarr Node is fully online:
+

-### Troubleshooting Common Issues
+## Troubleshooting Common Issues
-- **Plex Not Using GPU?** Check Plex Docker template and transcoding settings.
-- **Tdarr Not Restarting?** Verify script, Tautulli API settings, and background execution.
-- **High CPU Usage?** If HDR tone mapping is on, ensure GPU and drivers support it. Update all plugins and drivers.
+- **Plex Not Using GPU?** Re-check your Plex Docker template and transcoding settings.
+- **Tdarr Not Restarting?** Make sure the script has the right container name, Tautulli API key, and is set to run in the background.
+- **High CPU Usage?** Some features, like HDR tone mapping, can be CPU-intensive. Ensure your GPU and drivers support it. Update drivers if needed.
---