From 793a1a1825249040a24745d660d3340daa5ddc54 Mon Sep 17 00:00:00 2001 From: Admin9705 <24727006+Admin9705@users.noreply.github.com> Date: Thu, 13 Mar 2025 08:53:21 -0400 Subject: [PATCH] Update README.md --- README.md | 286 +++++++++++++++++++++++++----------------------------- 1 file changed, 133 insertions(+), 153 deletions(-) diff --git a/README.md b/README.md index 9458bb9..f14bd48 100644 --- a/README.md +++ b/README.md @@ -1,205 +1,185 @@ -
image
+# AV1 - Intel ARC Encoding Guide via Unraid + Tdarr Node Killer -> **Warning:** One entry might be your iGPU. Don’t assign your iGPU to a Tdarr node. +

Want to Help? Click the Star in the Upper-Right Corner! ⭐

-**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. +**NOTE** +We’re using `ghcr.io/haveagitgat/tdarr:2.35.02` instead of `ghcr.io/haveagitgat/tdarr:latest`. -
image
- -### Configuring Tdarr - -1. Go to `http://:8265`. -2. You should see your nodes listed: - -
image
- -3. For each node, click it and set CPU/GPU worker counts based on your ARC card: - - - **ARC A310** - - Transcode: CPU (0), GPU (2–3) - - Health Check: CPU (2), GPU (0) - - - **ARC A380** - - Transcode: CPU (0), GPU (2–4) - - Health Check: CPU (2), GPU (0) - - - **ARC A500/A700** - - Transcode: CPU (0), GPU (2–5) - - Health Check: CPU (2), GPU (0) - -
image
- -4. Click **Options**, scroll to the bottom, and enable “GPU Workers to do CPU Tasks,” then close. - -
image
- -5. In the staging section, check **Auto-accept successful transcodes** so Tdarr replaces old files automatically. - -
image
- -6. In **Status**, pick the queue order (e.g., largest files first). - -
image
- ---- - -# Setting up the AV1 Tdarr Flow - -**Change Log** +**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) - -image - -## What is the AV1 Flow? - -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 - -1. In Tdarr, go to **Flows**. -2. Scroll down and click **Import**. -3. Paste the AV1 Flow JSON. -4. Apply it to your libraries. - -![Adding a New Flow in Tdarr](https://i.imgur.com/nLzQi1b.png) -![Scroll to Import Option](https://i.imgur.com/hmYNetQ.png) -![Pasting the JSON Content](https://i.imgur.com/Qe13kYg.png) +- **v4:** Removed images from files, cutting failure rates from ~25% to 1–2% +- **v5:** Enhanced quality and simplified workflow --- -# Optimizing AV1 Encoding Settings +## Introduction -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: +This 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: -- **Higher CRF** → Lower quality, smaller files -- **Lower CRF** → Higher quality, larger files +- Set up Intel ARC GPU support on Unraid. +- Configure Tdarr for AV1 encoding. +- Manage SABnzbd download speeds based on Plex streams (to prevent buffering). +- Automatically pause and resume Tdarr when Plex needs the GPU. -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. +Following 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. -
image
-
image
+> **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. --- -# Setting Up Tdarr Libraries +## Table of Contents -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**: -
image
- -2. Click **Library+**: -
image
- -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. - -
image
-
image
- -5. Under **Transcode Cache**, set the path to `/temp` (or your chosen transcode folder). - -
image
- -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. - -
image
- -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.) - -
image
- -8. Repeat for all your libraries. -9. Perform a **Fresh New Scan** to apply changes. - -
image
- -10. After scanning, the home page should show transcoding activity. If not, re-check your GPU assignments and node settings. - -
image
- -11. If you see tons of errors, review your GPU configuration or flow settings. - -
image
+- [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) --- -# SABNZBD Speed Control - Bonus +## Data Savings with AV1 Encoding -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. +AV1 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. + +image + +I’ve already saved **255TB** and counting! --- -# Tdarr Node Killer Script +## AV1 Drawbacks -**Change Log** -- **v1:** Original script -- **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 +No 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. -## Overview +--- -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. +## Upgrading to Unraid 7.0 and Installing Required Plugins -## Script Behavior +Make 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. -- 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). +### Installing Intel GPU TOP Plugin -**Script:** [tdarr_node_killer.sh](tdarr_node_killer.sh) +Install **Intel GPU TOP** (by ich777) from Unraid Community Apps to monitor your Intel ARC GPU’s performance directly on Unraid. -Use **User Scripts** in Unraid to install this script, set it to run on array startup, and keep it running in the background. +![Intel GPU TOP Plugin](https://i.imgur.com/0bHRqya.png) -image +### Installing GPU Statistics Plugin -## Step-by-Step Implementation for Unraid +Then install **GPU Statistics** (by b3rs3rk). Combined with Intel GPU TOP, it offers detailed GPU usage data during encoding or transcoding. -1. Confirm Tdarr Node [N1] is running when no one’s transcoding in Plex: -
image
+![GPU Statistics Plugin](https://i.imgur.com/lJZgPvC.png) -2. The script runs and waits for Plex transcoding activity: -
image
+After installing both, you’ll see real-time GPU usage: -3. A user begins transcoding in Plex: +![GPU Usage Example 1](https://i.imgur.com/toOvgvN.png) +![GPU Usage Example 2](https://i.imgur.com/jDbrB5a.png) - ![Plex User Starts Transcoding](https://i.imgur.com/AT6hCUV.png) +--- -4. The script detects transcoding and stops the Tdarr Node: +# Deploying Plex with Intel ARC GPU Support -
image
-
image
+### Adding the Intel ARC GPU to the Plex Docker Template -5. Tdarr Node [N1] is now stopped: +In your Plex Docker template, add the Intel ARC GPU as a device. Plex won’t see the GPU without this. -
image
+![Add Intel ARC GPU to Plex Template](https://i.imgur.com/Da4oeGV.png) -## Script Behavior After Plex Transcoding Stops +### Configuring Plex Settings -When Plex finishes transcoding, the script waits a cooldown (e.g., 180 seconds) and then restarts Tdarr: +Enable hardware transcoding in Plex and HDR tone mapping (if supported). If your server has multiple GPUs, pick the correct one. -1. You’ll see a countdown timer in the logs before it restarts the container. -2. Tdarr Node starts again after the countdown: +image -
image
-
image
+### Verifying GPU Transcoding -3. Tdarr Node is fully online: +Play 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! - ![Tdarr Node Online](https://i.imgur.com/M1M2vSL.png) +image -## Troubleshooting Common Issues +--- + +# Setting Up Tdarr + +**What is Tdarr?** +Tdarr 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. + +> If you find this guide helpful, please click the ★ (Star) button above. It shows your support and helps others discover this guide. + +## Deploying Tdarr Server + +You’ll see an option to deploy the server and node in a single container. To simplify troubleshooting, **deploy them separately**: + +1. Install **Tdarr** (not Tdarr Node) from the Unraid App Store. +2. Name it clearly (e.g., “Server” or “TdarrServer”). +3. Check that the server IP is correct (usually your Unraid server’s IP). +4. Set **Internal Node** to **False** so you can install a separate node container. + +image + +image + +image + +## Tdarr Transcoding Location + +Decide 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. + +> **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. + +For 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. + +image + +## Deploying Tdarr Node(s) + +Once the Tdarr Server is running, install **Tdarr Node** (a separate listing). The server manages libraries and tasks, while the node handles the actual transcoding. + +image + +1. Install **Tdarr Node** from the Unraid App Store. +2. Name it clearly, like “Node1.” If you have multiple GPUs, install multiple node containers (Node1, Node2, etc.). + +
image
+ +3. Ensure the server IP and node IP match. + +
image
+ +4. Keep each node’s configs and logs separate. +5. Match the transcode cache path to the server’s path. If you have more than one node, label them for clarity. +6. Assign the correct GPU to each node. Don’t overlap GPUs if you have multiple nodes. + +
image
+ +**Identify GPUs** by running: -- **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. ---