Update README.md

This commit is contained in:
Admin9705
2025-03-13 08:53:21 -04:00
committed by GitHub
parent 28a99d229f
commit 793a1a1825

286
README.md
View File

@@ -1,205 +1,185 @@
<br><img width="457" alt="image" src="https://github.com/user-attachments/assets/3e8b0028-c1b2-4517-b42d-731c2b01d7f3" /><br> # AV1 - Intel ARC Encoding Guide via Unraid + Tdarr Node Killer
> **Warning:** One entry might be your iGPU. Dont assign your iGPU to a Tdarr node. <h2 align="center">Want to Help? Click the Star in the Upper-Right Corner! ⭐</h2>
**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**
Were using `ghcr.io/haveagitgat/tdarr:2.35.02` instead of `ghcr.io/haveagitgat/tdarr:latest`.
<br><img width="701" alt="image" src="https://github.com/user-attachments/assets/1dfa28a8-ddd4-4c0b-a1f9-f4ff2b9c5e9b" /><br> **Change Log:**
### Configuring Tdarr
1. Go to `http://<your-unraid-IP>:8265`.
2. You should see your nodes listed:
<br><img width="409" alt="image" src="https://github.com/user-attachments/assets/db6b2dc8-6fb7-4acf-be86-785705a44961" /><br>
3. For each node, click it and set CPU/GPU worker counts based on your ARC card:
- **ARC A310**
- Transcode: CPU (0), GPU (23)
- Health Check: CPU (2), GPU (0)
- **ARC A380**
- Transcode: CPU (0), GPU (24)
- Health Check: CPU (2), GPU (0)
- **ARC A500/A700**
- Transcode: CPU (0), GPU (25)
- Health Check: CPU (2), GPU (0)
<br><img width="548" alt="image" src="https://github.com/user-attachments/assets/8dc965c7-d801-42b3-af1f-c5310e2e2fad" /><br>
4. Click **Options**, scroll to the bottom, and enable “GPU Workers to do CPU Tasks,” then close.
<br><img width="431" alt="image" src="https://github.com/user-attachments/assets/3cb3786a-025a-48c6-ba72-c6835effef11" /><br>
5. In the staging section, check **Auto-accept successful transcodes** so Tdarr replaces old files automatically.
<br><img width="745" alt="image" src="https://github.com/user-attachments/assets/b78a71c2-71c9-4a01-a5c7-40d34ff26775" /><br>
6. In **Status**, pick the queue order (e.g., largest files first).
<br><img width="774" alt="image" src="https://github.com/user-attachments/assets/111cbddd-bfe3-437f-b79e-7fd00ec90c59" /><br>
---
# Setting up the AV1 Tdarr Flow
**Change Log**
- **v1:** Original AV1 flow - **v1:** Original AV1 flow
- **v2:** Removed B-frames - **v2:** Removed B-frames
- **v3:** Improved quality - **v3:** Improved quality
- **v4:** Removed images from files (failure rates ~25% 12%) - **v4:** Removed images from files, cutting failure rates from ~25% to 12%
- **v5:** Better quality, simpler flow - **v5:** Enhanced quality and simplified workflow
**JSON Script:** [av1_flow_v5.json](av1_flow_v5.json)
<img width="800" alt="image" src="https://github.com/user-attachments/assets/9b884a52-426f-4c35-b843-199bcdc363ec" />
## 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)
--- ---
# Optimizing AV1 Encoding Settings ## Introduction
Within the AV1 flow, adjust **CRF** and **bitrate** to balance quality and size. Make sure youve 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. Youll learn how to:
- **Higher CRF** → Lower quality, smaller files - Set up Intel ARC GPU support on Unraid.
- **Lower CRF** → Higher quality, larger files - 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.
Ive 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. Youll also see how to tweak download speeds to avoid streaming slowdowns.
<br><img width="828" alt="image" src="https://github.com/user-attachments/assets/8e5474a0-2601-4d11-a716-4bc3168d6636" /><br> > **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.
<br><img width="744" alt="image" src="https://github.com/user-attachments/assets/c53b379a-43e2-4d02-bb10-0e6073b53a66" /><br>
--- ---
# 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. - [Data Savings with AV1 Encoding](#data-savings-with-av1-encoding)
- [AV1 Drawbacks](#av1-drawbacks)
1. Click **Libraries**: - [Upgrading to Unraid 7.0 and Installing Required Plugins](#upgrading-to-unraid-70-and-installing-required-plugins)
<br><img width="646" alt="image" src="https://github.com/user-attachments/assets/2bd6102a-9694-42f1-842d-3cc70f087a0f" /><br> - [Installing Intel GPU TOP Plugin](#installing-intel-gpu-top-plugin)
- [Installing GPU Statistics Plugin](#installing-gpu-statistics-plugin)
2. Click **Library+**: - [Deploying Plex with Intel ARC GPU Support](#deploying-plex-with-intel-arc-gpu-support)
<br><img width="130" alt="image" src="https://github.com/user-attachments/assets/f5c6a119-afb6-4f63-8dbc-c2f1db63c019" /><br> - [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)
3. Name your new library (e.g., “TV,” “Movies,” etc.). - [Verifying GPU Transcoding](#verifying-gpu-transcoding)
4. Under **Source**, point it to your media folder. Enable [Hourly] scanning to catch new content. - [Setting Up Tdarr](#setting-up-tdarr)
- [Deploying Tdarr Server](#deploying-tdarr-server)
<br><img width="909" alt="image" src="https://github.com/user-attachments/assets/2142aa48-a7a8-4e3f-9dcb-d7df3aed5570" /><br> - [Tdarr Transcoding Location](#tdarr-transcoding-location)
<br><img width="292" alt="image" src="https://github.com/user-attachments/assets/e5bb4b33-5115-4d65-a4de-7a28d705a0d0" /><br> - [Deploying Tdarr Node(s)](#deploying-tdarr-nodes)
- [Configuring Tdarr](#configuring-tdarr)
5. Under **Transcode Cache**, set the path to `/temp` (or your chosen transcode folder). - [Setting up the AV1 Tdarr Flow](#setting-up-the-av1-tdarr-flow)
- [What is the AV1 Flow?](#what-is-the-av1-flow)
<br><img width="404" alt="image" src="https://github.com/user-attachments/assets/22f9c1f8-a3d8-49a9-8ce6-678c1de28ce4" /><br> - [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr)
- [Setting Up Tdarr Libraries](#setting-up-tdarr-libraries)
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. - [Optimizing AV1 Encoding Settings](#optimizing-av1-encoding-settings)
- [SABNZBD Speed Control - Bonus](#sabnzbd-speed-control---bonus)
<br><img width="297" alt="image" src="https://github.com/user-attachments/assets/8ed82ff6-aa65-4fbe-a576-39810eeed1c3" /><br> - [Tdarr Node Killer Script](#tdarr-node-killer-script)
- [Overview](#overview)
7. In **Transcode Options**, uncheck “Classic Plugins,” go to the **Flows** tab, and pick the AV1 flow. (If you havent imported the flow yet, see the [Importing the AV1 Flow in Tdarr](#importing-the-av1-flow-in-tdarr) section first.) - [Script Behavior](#script-behavior)
- [Step-by-Step Implementation for Unraid](#step-by-step-implementation-for-unraid)
<br><img width="1004" alt="image" src="https://github.com/user-attachments/assets/a0a4028d-c539-4df9-8e09-4b25a6a2a2a5" /><br> - [Script Behavior After Plex Transcoding Stops](#script-behavior-after-plex-transcoding-stops)
- [Troubleshooting Common Issues](#troubleshooting-common-issues)
8. Repeat for all your libraries. - [Experimental: Running the Script on Other Operating Systems](#experimental-running-the-script-on-other-operating-systems)
9. Perform a **Fresh New Scan** to apply changes. - [Step-by-Step Implementation for Other OSes](#step-by-step-implementation-for-other-oses)
- [Backup and Recovery Tips](#backup-and-recovery-tips)
<br><img width="284" alt="image" src="https://github.com/user-attachments/assets/0556d967-8ab3-4628-86d4-12a53a369c0f" /><br> - [Summary](#summary)
10. After scanning, the home page should show transcoding activity. If not, re-check your GPU assignments and node settings.
<br><img width="1158" alt="image" src="https://github.com/user-attachments/assets/642f3102-7cfa-4c49-b1d0-0f408930f36d" /><br>
11. If you see tons of errors, review your GPU configuration or flow settings.
<br><img width="1254" alt="image" src="https://github.com/user-attachments/assets/474ce9bf-d883-4b31-afa7-f0ccb909dd0f" /><br>
--- ---
# SABNZBD Speed Control - Bonus ## Data Savings with AV1 Encoding
You can also tie SABnzbds download speed to Plex streaming demand. By throttling SABnzbd when Plex is active, you minimize buffering. Check out Tautullis 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 1015% of a large library yielded about **116TB** of savings. For a 300TB media collection, you can potentially reduce it to 75100TB with careful AV1 conversion.
<img width="373" alt="image" src="https://github.com/user-attachments/assets/09d36726-56d9-4c53-8589-eca2173e7283">
Ive already saved **255TB** and counting!
--- ---
# Tdarr Node Killer Script ## AV1 Drawbacks
**Change Log** 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.
- **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
## 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 youre 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. ### Installing Intel GPU TOP Plugin
- 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 **Intel GPU TOP** (by ich777) from Unraid Community Apps to monitor your Intel ARC GPUs 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)
<img width="403" alt="image" src="https://github.com/user-attachments/assets/728a6959-cfaf-44e5-8302-ab43372c87a1"> ### 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 ones transcoding in Plex: ![GPU Statistics Plugin](https://i.imgur.com/lJZgPvC.png)
<br><img width="543" alt="image" src="https://github.com/user-attachments/assets/c4d99d6c-e8f9-4d38-a103-f8071f07a4fa" /><br>
2. The script runs and waits for Plex transcoding activity: After installing both, youll see real-time GPU usage:
<br><img width="615" alt="image" src="https://github.com/user-attachments/assets/a0ebab4e-e178-4de3-87f7-00e749cfa6cd"><br>
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
<br><img width="655" alt="image" src="https://github.com/user-attachments/assets/8b9b0cdc-9084-48ed-a1c0-b00e32f51dc6"><br> ### Adding the Intel ARC GPU to the Plex Docker Template
<br><img width="322" alt="image" src="https://github.com/user-attachments/assets/68dcc0c5-b347-4bed-86cb-53e58637b48b" /><br>
5. Tdarr Node [N1] is now stopped: In your Plex Docker template, add the Intel ARC GPU as a device. Plex wont see the GPU without this.
<br><img width="548" alt="image" src="https://github.com/user-attachments/assets/e10fc050-2000-49a6-be46-a49b9a8609e2" /><br> ![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. Youll see a countdown timer in the logs before it restarts the container. <img width="1020" alt="image" src="https://github.com/user-attachments/assets/2ed05f55-ee92-4011-9f6f-99c24b5d1a3f">
2. Tdarr Node starts again after the countdown:
<br><img width="611" alt="image" src="https://github.com/user-attachments/assets/7ca1d8b0-efac-44ab-9701-24ef525f33c7"><br> ### Verifying GPU Transcoding
<br><img width="323" alt="image" src="https://github.com/user-attachments/assets/9730388b-c5e8-42fc-9392-69b58d9554d7" /><br>
3. Tdarr Node is fully online: Play a video that needs transcoding. On Plexs 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) <img width="286" alt="image" src="https://github.com/user-attachments/assets/e182a603-a7b4-4ae3-b5f0-efbac58b505d" />
## 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, its 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
Youll 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 servers IP).
4. Set **Internal Node** to **False** so you can install a separate node container.
<img width="381" alt="image" src="https://github.com/user-attachments/assets/e3f60be8-5c2b-4ea1-8c36-af7e25097603" />
<img width="557" alt="image" src="https://github.com/user-attachments/assets/126ff9c9-7b32-4fdf-82cc-864bedf85700" />
<img width="688" alt="image" src="https://github.com/user-attachments/assets/b70a2724-b0f7-463e-8da3-c1e7ad3d052b" />
## 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.
<img width="754" alt="image" src="https://github.com/user-attachments/assets/daac629c-3fe9-45e4-89e9-c8e50686e2ea" />
## 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.
<img width="397" alt="image" src="https://github.com/user-attachments/assets/6b384a42-194d-4089-b1ff-89d6cca77728" />
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.).
<br><img width="477" alt="image" src="https://github.com/user-attachments/assets/8ce39a4d-1479-433c-b3c8-9eceb4ebf044" /><br>
3. Ensure the server IP and node IP match.
<br><img width="749" alt="image" src="https://github.com/user-attachments/assets/736eff11-ec78-441d-9c82-0f11def877bd" /><br>
4. Keep each nodes configs and logs separate.
5. Match the transcode cache path to the servers path. If you have more than one node, label them for clarity.
6. Assign the correct GPU to each node. Dont overlap GPUs if you have multiple nodes.
<br><img width="769" alt="image" src="https://github.com/user-attachments/assets/b7a2d3e3-288b-4f16-9424-74a82b8f6451" /><br>
**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.
--- ---