### Schedule Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Example configuration for a 7-day, 24-hour task scheduling with varying worker limits. ```text Weekdays (Mon-Fri): 00:00-08:00: 4 workers (night processing) 08:00-18:00: 2 workers (daytime, low impact) 18:00-00:00: 6 workers (evening processing) Weekends (Sat-Sun): 00:00-18:00: 1 worker 18:00-00:00: 8 workers (full weekend) ``` -------------------------------- ### Plugin Stack Configuration Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md Shows how to configure the order of plugins within a library's settings. This example prioritizes subtitle removal, then H.264 to H.265 transcoding, and finally adding AAC audio. ```text Library: Movies Stack Order: 1. Remove Subtitles (ID: remove_subs) 2. Transcode H264→H265 (ID: h264_to_h265) 3. Add AAC Audio (ID: add_aac) ``` -------------------------------- ### HandBrake Transcode Command Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Example command for transcoding a video using a HandBrake preset. This specifies input/output files and the desired preset for the conversion. ```bash HandBrakeCLI -i input.mkv -o output.mkv -Z "Very Fast 1080p30" --audio 1,2 --aencoding aac,ac3 ``` -------------------------------- ### Verify MediaInfo Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Verify the MediaInfo tool is installed and accessible by checking its version. ```bash mediainfo --version ``` -------------------------------- ### Install Tools on macOS with Homebrew Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Update Homebrew and install FFmpeg, HandBrake, MkvToolNIX, MediaInfo, Exiftool, and CCExtractor using brew commands. ```bash brew update brew install ffmpeg handbrake mkvtoolnix mediainfo exiftool ccextractor ``` -------------------------------- ### Install Tools on Linux (Ubuntu/Debian) Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Commands to update the package manager and install essential media processing tools including FFmpeg, HandBrake, MkvToolNIX, MediaInfo, Exiftool, and CCExtractor. ```bash sudo apt-get update sudo apt-get install -y ffmpeg sudo apt-get install -y handbrake-cli sudo apt-get install -y mkvtoolnix sudo apt-get install -y mediainfo sudo apt-get install -y exiftool sudo apt-get install -y ccextractor ``` -------------------------------- ### FFmpeg Transcode Command Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Example command for transcoding a video to H.265 using FFmpeg. This includes specifying input/output files, video/audio codecs, and quality settings. ```bash ffmpeg -i input.mkv -c:v libx265 -crf 23 -c:a aac -b:a 128k output.mkv ``` -------------------------------- ### Verify Exiftool Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Confirm Exiftool installation by displaying its version number. ```bash exiftool -ver ``` -------------------------------- ### Enable and Start Tdarr Systemd Service Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Commands to reload systemd, enable the Tdarr service to start on boot, and start the service immediately. ```bash sudo systemctl daemon-reload sudo systemctl enable tdarr sudo systemctl start tdarr ``` -------------------------------- ### Verify HandBrake Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Confirm HandBrake CLI installation by checking its version. ```bash HandBrakeCLI --version ``` -------------------------------- ### Exiftool Metadata Commands Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Example commands for using Exiftool to extract, remove, or view metadata tags within media files. Ensure Exiftool version 12.0 or higher is installed. ```bash # Extract metadata exiftool -Title file.mkv # Remove metadata exiftool -Title= file.mkv # View all metadata exiftool -a file.mkv ``` -------------------------------- ### Verify FFmpeg Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Check if FFmpeg is installed and accessible by running the version command. ```bash ffmpeg -version ``` -------------------------------- ### Verify Tool Installation (Linux/macOS) Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Check if essential tools like ffmpeg or HandBrakeCLI are installed and accessible in your system's PATH. ```bash # Verify tool is installed which ffmpeg which HandBrakeCLI ``` -------------------------------- ### WebUI Startup Log Entry Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Example log entry indicating the WebUI server is listening and connected to Tdarr_Server. ```log [INFO] Tdarr_WebUI - Server listening on http://0.0.0.0:8265 [INFO] Tdarr_WebUI - Connected to Tdarr_Server at http://serverIP:serverPort ``` -------------------------------- ### Configure Hardware Codec for HandBrake Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Example of using hardware acceleration with HandBrake for video encoding. Replace with appropriate codec for your GPU. ```bash # HandBrake: --encoder hevc_nvenc ``` -------------------------------- ### Get Plugin Stack Information Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Fetches details about the plugins configured for a specific library, including their ID, name, filters, and actions. This allows for programmatic inspection of your automation setup. ```json { "plugins": [ { "id": "plugin-1", "name": "Remove Subtitles", "filters": [...], "actions": [...] } ] } ``` -------------------------------- ### Configure FFmpeg Path Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Specify the installation path for the FFmpeg binary. Ensure FFmpeg version 4.0 or higher is used. ```json { "ffmpegPath": "/usr/local/bin/ffmpeg" } ``` -------------------------------- ### Tdarr Startup Binary Tests Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Example log output from Tdarr server startup, indicating successful verification of essential tool paths like HandBrake, FFmpeg, and MkvToolNIX. ```text [Info] Tdarr_Server - Binary test 1: handbrakePath working [INFO] Tdarr_Server - Binary test 2: ffmpegPath working [INFO] Tdarr_Server - Binary test 3: mkvpropeditPath working [INFO] Tdarr_Server - Scanner test 1: FFprobe working [INFO] Tdarr_Server - Scanner test 2: Exiftool working [INFO] Tdarr_Server - Scanner test 3: Mediainfo working [INFO] Tdarr_Server - Scanner test 4: CCExtractor working ``` -------------------------------- ### Configure Tdarr Path Translators Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Example JSON configuration for Tdarr path translators. Ensure 'server' and 'node' paths accurately reflect your setup. ```json { "server": "/mnt/movies", "node": "/mnt/media" } ``` -------------------------------- ### Verify Binary Installation (Linux/macOS) Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Check if essential binaries like ffmpeg or HandBrakeCLI are installed and accessible in your system's PATH. Update the Tdarr configuration with the full path if they are not found. ```bash which ffmpeg which HandBrakeCLI which mkvpropedit ``` -------------------------------- ### Debug Information Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/10-community-resources.md When seeking help, provide this debug information to assist developers in diagnosing issues. Include version, OS, hardware, and a clear description of the problem. ```text Version: 2.78.01 OS: Ubuntu 22.04 x86_64 CPU: Intel i7-9700K GPU: RTX 2080 Issue: Transcode speed is slow Logs: (attached) Reproduction: Select library → click scan → observe low speed ``` -------------------------------- ### Start Tdarr Services Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Start the Tdarr Server, Node, and WebUI services in separate terminals. Ensure each service is running correctly. ```bash ./Tdarr_Server/Tdarr_Server # In another terminal: ./Tdarr_Node/Tdarr_Node # In another terminal: ./Tdarr_WebUI/Tdarr_WebUI ``` -------------------------------- ### Install Tdarr Server with Flatpak Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Install the Tdarr Server application using Flatpak. This is a convenient way to manage Tdarr on systems with Flatpak support. ```bash flatpak install flathub io.tdarr.Tdarr_Server flatpak run io.tdarr.Tdarr_Server ``` -------------------------------- ### Verify MkvToolNIX Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Check the installed version of MkvToolNIX tools, specifically mkvmerge. ```bash mkvmerge --version ``` -------------------------------- ### Custom HandBrake Arguments Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Example of custom arguments for HandBrake, including preset selection, audio track configuration, and encoding settings. ```bash -Z "Very Fast 480p30" --audio stereo --aencode=faac --ab=128 ``` -------------------------------- ### Configure Hardware Codec for FFmpeg Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Example of using hardware acceleration with FFmpeg for video encoding. Replace with appropriate codec for your GPU. ```bash # FFmpeg: -c:v hevc_nvenc or -c:v h264_nvenc ``` -------------------------------- ### Install Tdarr Node with Flatpak Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Install the Tdarr Node application using Flatpak. This command is used for setting up Tdarr nodes in a Flatpak environment. ```bash flatpak install flathub io.tdarr.Tdarr_Node flatpak run io.tdarr.Tdarr_Node ``` -------------------------------- ### Backup Tdarr Server Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Backup the current Tdarr server installation before upgrading. This ensures you have a restore point if needed. ```bash cp -r ./Tdarr_Server ./Tdarr_Server.backup ``` -------------------------------- ### Run Tdarr Updater Source: https://github.com/haveagitgat/tdarr/blob/master/updater/README.md Execute the Tdarr_Updater module to download other Tdarr modules. This is the first step in the installation process. ```bash /Tdarr_Updater ``` -------------------------------- ### Run Basic Tdarr Server Container Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Example command to run a basic Tdarr server container. It maps ports, mounts volumes for configuration and library, and sets the timezone. ```bash docker run -d \ --name tdarr \ -p 8265:8265 \ -p 8266:8266 \ -v /host/server:/app/server \ -v /host/library:/mount \ -e "WEB_UI_PORT=8265" \ -e "SERVER_PORT=8266" \ -e "TZ=Europe/London" \ haveagitgat/tdarr:latest ``` -------------------------------- ### Example Direct Play Optimization Plugin Stack Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md This stack ensures files are H.264, in an MP4 container, with cleaned subtitles and AAC audio. It's designed to optimize for direct play compatibility. ```text Plugin 1: Ensure H.264 video codec Filters: - Codec is NOT h264 Actions: - HandBrake Transcode: H.264, quality 20 Plugin 2: Ensure MP4 container Filters: - Container is NOT mp4 Actions: - Remux: MP4 container Plugin 3: Cleanup subtitles Filters: - Has subtitles Actions: - Remove Subtitles - Remove Closed Captions Plugin 4: Ensure AAC audio Filters: - Does NOT have AAC audio Actions: - Keep One Audio Stream: AAC preferred, English preferred, Stereo ``` -------------------------------- ### Tdarr Desktop Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/01-project-overview.md Example JSON configuration for Tdarr Desktop, specifying which Tdarr modules to run and connection details for the Tdarr Server. ```json { "Tdarr_Node": true, "Tdarr_Server": true, "Tdarr_WebUI": false, "serverIP": "0.0.0.0", "serverPort": 8266 } ``` -------------------------------- ### MediaInfo Example Output Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Sample text output from MediaInfo, providing detailed properties of a media file including format, duration, bitrate, video resolution, and aspect ratio. ```text Complete name : file.mkv Format : Matroska Duration : 1 h 30 min Overall bit rate : 8 567 kb/s Video ID : 1 Codec ID : V_UNCOMPRESSED Format : Raw Codec profile : Intra Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) fps Bit depth : 8 bits Color space : YUV ``` -------------------------------- ### Multiple Library Paths Volume Mounts Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Example of mounting multiple distinct library paths into the container, which can then be configured in the Tdarr WebUI. ```bash -v /host/movies:/mount/movies -v /host/tv:/mount/tv ``` -------------------------------- ### Detailed Schedule Configuration JSON Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/06-workers-scheduling.md Example of a schedule configuration in JSON format, specifying worker counts for different types and days. ```json { "schedule": [ { "day": "monday", "startTime": "00:00", "endTime": "06:00", "transcodeWorkers": 6, "transcodeGPUWorkers": 2, "healthCheckWorkers": 4 } ] } ``` -------------------------------- ### Tdarr Path Translator Example Source: https://github.com/haveagitgat/tdarr/blob/master/updater/README.md Example of path translation configuration within Tdarr Node config. This allows mapping server paths to node paths, useful for Docker or different drive mappings. ```json { "server": "y:/Movies", "node": "z:/Stuff/Movies" } ``` -------------------------------- ### Multi-Library Work Distribution Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/06-workers-scheduling.md Illustrates how the scheduler prioritizes and distributes tasks when multiple libraries have pending files. It selects libraries with the highest load first, then continues in a round-robin fashion. ```plaintext Library 1: 100 files pending Library 2: 50 files pending Library 3: 200 files pending Distribution: - Select Library 3 (highest load) → assign worker - Select Library 1 → assign worker - Select Library 3 → assign worker - Round-robin continues ``` -------------------------------- ### Node Configuration Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/02-configuration.md Configures worker node connections and path translation for distributed processing. Includes settings for node and server communication, tool paths, and path mapping. ```json { "nodeID": "QUkJYfSSD", "nodeIP": "0.0.0.0", "nodePort": "8267", "serverIP": "0.0.0.0", "serverPort": "8266", "handbrakePath": "/path/to/HandBrakeCLI", "ffmpegPath": "/path/to/ffmpeg", "pathTranslators": [ { "server": "/mnt/library", "node": "/media/library" } ] } ``` -------------------------------- ### Configure HandBrake Path Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Specify the installation path for the HandBrakeCLI binary. The default Docker image includes HandBrake 1.7.3. ```json { "handbrakePath": "/usr/local/bin/HandBrakeCLI" } ``` -------------------------------- ### Extract and Run Tdarr Updater Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Download and extract the Tdarr updater for your platform. This command is used for initial setup. ```bash unzip Tdarr_Updater.zip ./Tdarr_Updater # On Windows: .\Tdarr_Updater.exe ``` -------------------------------- ### Sonarr Integration Configuration Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/10-community-resources.md Configure Tdarr to process media indexed by Sonarr by setting matching library paths. This ensures Tdarr standardizes files within Sonarr's managed directories. ```text Sonarr Library: /mnt/tv Tdarr Library: /mnt/tv → Tdarr plugin stack standardizes files ``` -------------------------------- ### FFprobe Example Output Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Sample JSON output from FFprobe, detailing media format information such as duration and size, and stream details including codec and resolution. ```json { "format": { "filename": "file.mkv", "duration": "5400.000000", "size": "5368709120" }, "streams": [ { "index": 0, "codec_type": "video", "codec_name": "h264", "width": 1920, "height": 1080 } ] } ``` -------------------------------- ### Docker Layer Caching Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Illustrates Docker's layer caching mechanism, showing which layers are cached and which are re-downloaded based on changes. ```dockerfile FROM lsiobase/ubuntu:jammy # Cached RUN apt-get install ... # Cached if base unchanged COPY app.zip /app/ # Re-downloaded on version change ``` -------------------------------- ### Run Basic Tdarr Node Container Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Example command to run a basic Tdarr node container. It maps the node port, mounts a library volume, and configures connection details to the server. ```bash docker run -d \ --name tdarr_node \ -p 8267:8267 \ -v /host/library:/mount \ -e "NODE_PORT=8267" \ -e "SERVER_IP=192.168.1.10" \ -e "SERVER_PORT=8266" \ -e "TZ=Europe/London" \ haveagitgat/tdarr_node:latest ``` -------------------------------- ### Tdarr Container Entrypoint Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md The entrypoint command for Tdarr containers, which is '/init'. This script is responsible for starting and managing Tdarr processes using s6-overlay. ```json ENTRYPOINT ["/init"] ``` -------------------------------- ### Run Tdarr Server Container with NVIDIA GPU Support Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Example command to run a Tdarr server container with NVIDIA GPU acceleration enabled. Requires the NVIDIA Container Toolkit. ```bash docker run -d \ --name tdarr \ --gpus all \ --runtime=nvidia \ -p 8265:8265 \ -p 8266:8266 \ -v /host/server:/app/server \ -v /host/library:/mount \ -e "WEB_UI_PORT=8265" \ -e "SERVER_PORT=8266" \ -e "NVIDIA_VISIBLE_DEVICES=all" \ -e "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility" \ haveagitgat/tdarr:latest ``` -------------------------------- ### Run Tddarr Server Source: https://github.com/haveagitgat/tdarr/blob/master/updater/README.md Start the Tdarr_Server module. This is the core of Tdarr and handles all module connections. Ensure HandBrake and FFmpeg paths are correctly configured in the server config. ```bash /Tdarr_Server/Tdarr_Server ``` -------------------------------- ### Run Tdarr Node Source: https://github.com/haveagitgat/tdarr/blob/master/updater/README.md Start the Tdarr_Node module, which is used for encoding. Ensure HandBrake and FFmpeg paths are correctly configured in the node config. ```bash /Tdarr_Node/Tdarr_Node ``` -------------------------------- ### Example Multi-Audio Track Cleanup Plugin Stack Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md This stack prioritizes keeping a single, high-quality audio track (AC3, AAC, English, 5.1, Stereo) and standardizes the remaining audio to AAC. ```text Plugin 1: Keep single audio track Filters: - Always Actions: - Keep One Audio Stream: - Codec Priority: AC3, AAC - Language Priority: English - Channel Priority: 5.1, Stereo - Result: Removes extra language tracks, keeps best audio Plugin 2: Standardize remaining audio Filters: - Audio codec NOT in [aac, ac3] Actions: - Standardise Audio Codec: AAC, 128k, Stereo ``` -------------------------------- ### Get Plugin Stack Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves the list of plugins configured for a specific library, including their ID, name, filters, and actions. ```APIDOC ## GET /api/v1/libraries/{libraryID}/plugins ### Description Retrieves the list of plugins configured for a specific library, including their ID, name, filters, and actions. ### Method GET ### Endpoint /api/v1/libraries/{libraryID}/plugins ### Parameters #### Path Parameters - **libraryID** (string) - Required - The ID of the library to get plugins for. ### Response #### Success Response (200) - **plugins** (array) - An array of plugin objects. - **id** (string) - The unique identifier for the plugin. - **name** (string) - The name of the plugin. - **filters** (array) - A list of filters configured for the plugin. - **actions** (array) - A list of actions configured for the plugin. ``` -------------------------------- ### Backup Docker Container Volumes Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Create a backup of container volumes by running a temporary container that archives the volume data. This example backs up the server volume to a tar.gz file. ```bash docker run --rm \ -v /host/server:/app/server \ -v backup:/backup \ alpine tar czf /backup/server.tar.gz -C /app/server . ``` -------------------------------- ### Radarr Integration Configuration Example Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/10-community-resources.md Integrate Tdarr with Radarr for movie library management. Ensure Tdarr processes movie files by setting the Tdarr library path to match Radarr's. ```text Radarr Library: /mnt/movies Tdarr Library: /mnt/movies → Plugin stack applies to all indexed movies ``` -------------------------------- ### Test Network Connectivity from Docker Container Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Use 'docker exec' to run commands inside a running container. This example tests connectivity to a local service and DNS resolution. ```bash docker exec tdarr curl http://localhost:8266/ping ``` ```bash docker exec tdarr nslookup google.com ``` -------------------------------- ### Example Plugin Log Output Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md This snippet shows a typical log output from a Tdarr plugin, illustrating filter evaluation and action execution. ```log [INFO] Plugin: remove_subs - Evaluating filters [DEBUG] Filter 1 (codec): h264 matches condition NOT h265 [DEBUG] Filter 2 (age): 365 days matches condition older than [INFO] Plugin: remove_subs - All filters matched, executing actions [INFO] Action: Remove Subtitles - Starting [INFO] Action: Remove Subtitles - Complete ``` -------------------------------- ### Mount NFS Share on Node Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Example command to mount a Network File System (NFS) share on the Tdarr node. This is necessary if the node cannot access shared storage directly. ```bash # NFS example: mount -t nfs 192.168.1.10:/export/movies /mnt/movies ``` -------------------------------- ### Tdarr Docker Quick Start Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/README.md This bash command demonstrates how to run Tdarr using Docker. It maps ports, mounts host directories for server data and library access, and uses the latest Tdarr image. ```bash docker run -d \ -p 8265:8265 -p 8266:8266 \ -v /host/server:/app/server \ -v /host/library:/mount \ haveagitgat/tdarr:latest ``` -------------------------------- ### Verify CCExtractor Installation Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Check if CCExtractor is installed and functional by querying its version. ```bash ccextractor --version ``` -------------------------------- ### Hardware Acceleration Not Available Error Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Troubleshoot errors indicating hardware acceleration codecs like NVENC are not available. Verify driver installation, CUDA support, and Docker GPU access. ```bash [ERROR] NVENC codec not available ``` -------------------------------- ### Sample Plex Plugin Stack Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/10-community-resources.md A sample plugin stack configuration for optimizing media files for Plex direct play. It includes steps for transcoding, remuxing, audio standardization, and subtitle removal. ```text 1. Transcode to H.264 (if not already) 2. Remux to MP4 (if not already) 3. Add AAC audio if missing 4. Remove subtitles 5. Remove metadata ``` -------------------------------- ### Web UI Configuration for Remote Server Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/02-configuration.md Example for configuring the Web UI when the Tdarr server is running on a different machine. Ensure serverIP matches the Tdarr_Server's IP address. ```json { "webUIPort": 8265, "serverIP": "192.168.1.100", "serverPort": 8266 } ``` -------------------------------- ### Run Tdarr Server Container with Host Network Mode Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Example command to run a Tdarr server container using host network mode. This offers lower latency but less isolation. ```bash docker run -d \ --name tdarr \ --network host \ -v /host/server:/app/server \ -v /host/library:/mount \ haveagitgat/tdarr:latest ``` -------------------------------- ### HandBrake Intel Quick Sync Video (QSV) Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Enable and configure Intel Quick Sync Video (QSV) for H.265 or H.264 encoding in HandBrake. Ensure QSV is enabled during the HandBrake build process. ```bash --enable-qsv # Enable QSV in build ``` ```bash --encoder qsv_h265 # H.265 ``` ```bash --encoder qsv_h264 # H.264 ``` -------------------------------- ### Example H.264 to H.265 Conversion Plugin Stack Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md This stack converts H.264 files to H.265, removes subtitles, adds AAC audio if missing, and removes metadata. It aims for size reduction and improved compatibility. ```text Plugin 1: Transcode h264 to h265 Filters: - Codec is NOT h265 Actions: - HandBrake Transcode: H.265, quality 20 - Result: ~40-50% size reduction Plugin 2: Remove subtitles Filters: - Has subtitles Actions: - Remove Subtitles - Result: Cleaner file, faster playback Plugin 3: Add AAC audio if missing Filters: - Does NOT have AAC audio Actions: - Add Audio Stream: AAC Stereo, English - Result: Compatibility with more devices Plugin 4: Remove metadata Filters: - Always (unconditional) Actions: - Remove Metadata: title - Result: Prevents Plex from showing annoying titles ``` -------------------------------- ### Example Custom Tdarr Plugin Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/10-community-resources.md An example of a custom Tdarr plugin defined in JSON format. This plugin targets specific codecs and applies a transcode action using ffmpeg. ```json { "name": "My Custom Transcode", "version": "1.0", "filters": [ { "type": "codec", "operator": "is NOT", "value": "h265" } ], "actions": [ { "type": "transcode", "engine": "ffmpeg", "codec": "libx265", "preset": "fast", "quality": 23 } ] } ``` -------------------------------- ### Get Libraries Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves a list of all configured media libraries within Tdarr. ```APIDOC ## GET /api/v1/libraries ### Description Retrieves a list of all configured media libraries within Tdarr. ### Method GET ### Endpoint /api/v1/libraries ### Response #### Success Response (200) - **libraries** (array) - A list of library objects. - **id** (string) - The unique identifier for the library. - **name** (string) - The name of the library. - **path** (string) - The file system path to the library. - **fileCount** (integer) - The total number of files in the library. - **scanProgress** (integer) - The progress of the last library scan (0-100). - **lastScan** (string) - The timestamp of the last library scan in ISO 8601 format. ### Response Example { "libraries": [ { "id": "lib-1", "name": "Movies", "path": "/mnt/movies", "fileCount": 523, "scanProgress": 100, "lastScan": "2026-06-13T10:30:00Z" } ] } ``` -------------------------------- ### Check Docker Container Logs Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Use 'docker logs' to view the logs of a running container. Use '--tail 100' to see the last 100 lines for recent startup output. ```bash docker logs tdarr ``` ```bash docker logs --tail 100 tdarr ``` -------------------------------- ### Get Node Status Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves the status and health information for all connected Tdarr nodes. ```APIDOC ## GET /api/v1/nodes ### Description Retrieves the status and health information for all connected Tdarr nodes. ### Method GET ### Endpoint /api/v1/nodes ### Response #### Success Response (200) - **nodes** (array) - A list of node objects, each containing details about a connected node. - **nodeID** (string) - The unique identifier for the node. - **status** (string) - The connection status of the node (e.g., "connected"). - **workers** (object) - Information about the node's workers. - **cpu** (integer) - Number of CPU workers. - **gpu** (integer) - Number of GPU workers. - **health** (object) - Health metrics of the node. - **cpu** (integer) - CPU utilization percentage. - **memory** (integer) - Memory utilization percentage. - **disk** (integer) - Disk utilization percentage. ### Response Example { "nodes": [ { "nodeID": "Node-1", "status": "connected", "workers": { "cpu": 4, "gpu": 2 }, "health": { "cpu": 45, "memory": 62, "disk": 78 } } ] } ``` -------------------------------- ### Get Library Files Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves a paginated and filterable list of files within a specific library. ```APIDOC ## GET /api/v1/libraries/{libraryID}/files ### Description Retrieves a paginated and filterable list of files within a specific library. ### Method GET ### Endpoint /api/v1/libraries/{libraryID}/files ### Parameters #### Path Parameters - **libraryID** (string) - Required - The ID of the library to retrieve files from. #### Query Parameters - **filter** (string) - Optional - A codec filter expression to narrow down results. - **limit** (integer) - Optional - The maximum number of files to return per page (default 100). - **offset** (integer) - Optional - The number of files to skip for pagination. - **sort** (string) - Optional - The field to sort the results by (e.g., "size", "date", "codec"). ### Response #### Success Response (200) - **files** (array) - A list of file objects matching the query. - **path** (string) - The full path to the media file. - **size** (integer) - The size of the file in bytes. - **codecs** (object) - An object detailing the video and audio codecs. - **video** (string) - The primary video codec. - **audio** (array) - An array of audio codecs present in the file. - **duration** (integer) - The duration of the media in seconds. - **resolution** (string) - The resolution of the video (e.g., "1920x1080"). - **total** (integer) - The total number of files found in the library matching the filter. ### Response Example { "files": [ { "path": "/mnt/movies/file.mkv", "size": 5368709120, "codecs": { "video": "h264", "audio": ["aac", "ac3"] }, "duration": 5400, "resolution": "1920x1080" } ], "total": 523 } ``` -------------------------------- ### Verify Tdarr Server Startup Logs Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Check the Tdarr Server logs for initialization tests to confirm that binary paths and external tools are working correctly. This is a crucial verification step. ```text [Info] Tdarr_Server - Binary test 1: handbrakePath working [INFO] Tdarr_Server - Binary test 2: ffmpegPath working [INFO] Tdarr_Server - Binary test 3: mkvpropeditPath working [INFO] Tdarr_Server - Scanner test 1: FFprobe working [INFO] Tdarr_Server - Scanner test 2: Exiftool working [INFO] Tdarr_Server - Scanner test 3: Mediainfo working [INFO] Tdarr_Server - Scanner test 4: CCExtractor working ``` -------------------------------- ### Worker Stall Detection Log Entry Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/06-workers-scheduling.md Example log messages indicating a worker has stalled and is being restarted. ```text [WARN] Worker transcode-cpu-1 stalled, restarting [INFO] Task reassigned to new worker ``` -------------------------------- ### Verify Tdarr Version from Logs Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Check the Tdarr server log file to confirm the installed version after an upgrade. ```bash grep "Version" /logs/Tdarr_Server.log ``` -------------------------------- ### Add Audio Stream Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md Configure adding a new audio stream with specified language, codec, channels, and source. Use to enrich media with desired audio tracks. ```json { "language": "eng", "codec": "aac", "channels": "stereo" } ``` -------------------------------- ### Tdarr Server Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/01-project-overview.md Example JSON configuration for Tdarr Server, specifying ports and paths for transcoding tools. ```json { "serverPort": "8266", "handbrakePath": "/path/to/HandBrakeCLI", "ffmpegPath": "/path/to/ffmpeg" } ``` -------------------------------- ### WebUI Get Libraries API Response Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md JSON response from the /api/v1/libraries endpoint, listing configured media libraries. ```json { "libraries": [ { "id": "lib-1", "name": "Movies", "path": "/mnt/movies", "fileCount": 523, "scanProgress": 100, "lastScan": "2026-06-13T10:30:00Z" } ] } ``` -------------------------------- ### Set Schedule Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Configures the schedule for automated tasks, specifying days, start and end times, and the number of workers to use. ```APIDOC ## POST /api/v1/schedule ### Description Configures the schedule for automated tasks, specifying days, start and end times, and the number of workers to use. ### Method POST ### Endpoint /api/v1/schedule ### Parameters #### Request Body - **schedule** (array) - Required - An array of schedule objects. - **day** (string) - Required - The day of the week (e.g., 'monday'). - **startTime** (string) - Required - The start time in HH:MM format. - **endTime** (string) - Required - The end time in HH:MM format. - **workers** (integer) - Required - The number of workers to allocate for this schedule. ### Request Example ```json { "schedule": [ { "day": "monday", "startTime": "00:00", "endTime": "08:00", "workers": 4 } ] } ``` ``` -------------------------------- ### Verify GPU Drivers Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/08-troubleshooting.md Check if NVIDIA GPU drivers are installed and recognized by the system. This is crucial for enabling hardware acceleration. ```bash nvidia-smi ``` -------------------------------- ### HandBrake Optimization Presets and Hardware Acceleration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Select HandBrake presets for faster or slower encoding. Enable hardware acceleration using the --encoder flag. ```bash # Faster preset -Z "Very Fast 480p30" ``` ```bash # Slower preset -Z "High Profile" ``` ```bash # Hardware acceleration --encoder hevc_nvenc ``` -------------------------------- ### Get Statistics Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves statistical information about a specific library, including file counts, total size, codecs, and containers. ```APIDOC ## GET /api/v1/libraries/{libraryID}/stats ### Description Retrieves statistical information about a specific library, including file counts, total size, codecs, and containers. ### Method GET ### Endpoint /api/v1/libraries/{libraryID}/stats ### Parameters #### Path Parameters - **libraryID** (string) - Required - The ID of the library to get statistics for. ### Response #### Success Response (200) - **stats** (object) - An object containing various statistics about the library. - **totalFiles** (integer) - The total number of files in the library. - **totalSize** (integer) - The total size of the library in bytes. - **codecs** (object) - An object detailing the distribution of codecs. - **containers** (object) - An object detailing the distribution of container formats. ``` -------------------------------- ### Troubleshooting Worker Not Starting Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/06-workers-scheduling.md Provides commands to check system resources and worker logs when the number of active workers is less than the configured limit. This helps diagnose issues related to insufficient CPU, GPU memory, or system resource limits. ```bash # Check system resources top # Linux Task Manager # Windows # Check worker logs tail -f /logs/Tdarr_Server.log | grep worker ``` -------------------------------- ### WebUI Get Node Status API Response Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md JSON response from the /api/v1/nodes endpoint, detailing connected nodes and their health. ```json { "nodes": [ { "nodeID": "Node-1", "status": "connected", "workers": { "cpu": 4, "gpu": 2 }, "health": { "cpu": 45, "memory": 62, "disk": 78 } } ] } ``` -------------------------------- ### Tdarr WebUI Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/01-project-overview.md Example JSON configuration for Tdarr WebUI, defining its listening port and connection details for the Tdarr Server. ```json { "webUIPort": 8265, "serverIP": "0.0.0.0", "serverPort": 8266 } ``` -------------------------------- ### Custom Plugin Creation: Filters Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md Sets up two filters for a custom plugin: one to check the video codec and another for the file's age. ```text Filter 1: Type: Codec Condition: Is NOT Value: h265 Filter 2: Type: Age Condition: Older than Value: 365 days ``` -------------------------------- ### Get Task Queue Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves information about the current task queue, including the number of pending, active, completed, and failed tasks. ```APIDOC ## GET /api/v1/queue ### Description Retrieves information about the current task queue, including the number of pending, active, completed, and failed tasks. ### Method GET ### Endpoint /api/v1/queue ### Response #### Success Response (200) - **pending** (integer) - The number of tasks currently pending. - **active** (integer) - The number of tasks currently active. - **completed** (integer) - The number of tasks that have been completed. - **failed** (integer) - The number of tasks that have failed. ``` -------------------------------- ### Get Worker Status Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Retrieves the current status of all workers, including their ID, type, current job, progress, and associated node. ```APIDOC ## GET /api/v1/workers ### Description Retrieves the current status of all workers, including their ID, type, current job, progress, and associated node. ### Method GET ### Endpoint /api/v1/workers ### Response #### Success Response (200) - **workers** (array) - An array of worker objects. - **id** (string) - The unique identifier for the worker. - **type** (string) - The type of the worker (e.g., 'transcode-cpu'). - **status** (string) - The current status of the worker (e.g., 'active'). - **currentJob** (string) - The job the worker is currently processing. - **progress** (integer) - The progress of the current job in percentage. - **node** (string) - The node the worker is running on. ``` -------------------------------- ### WebUI Lifecycle Flowchart Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md Visual representation of the Tdarr WebUI startup and operational flow. ```text Tdarr_WebUI starts ↓ Read config from Tdarr_WebUI_Config.json ↓ Bind HTTP server to webUIPort ↓ Establish connection to Tdarr_Server ↓ Serve static UI assets ↓ Listen for API requests from browser ↓ Forward requests to Tdarr_Server ``` -------------------------------- ### Configure Distributed Library Mounting Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Set up path translators in the Node Configuration to map server library paths to different mount points on the node. This is for nodes accessing libraries on different drives or locations. ```json { "nodeID": "Node-2", "nodePort": "8268", "serverIP": "192.168.1.10", "serverPort": "8266", "pathTranslators": [ { "server": "/mnt/movies", "node": "/media/library/movies" }, { "server": "/mnt/tv", "node": "/media/library/tv" } ] } ``` -------------------------------- ### Base Image Build Variables Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Environment variables used during the build of the Tdarr base Docker image. These define paths and versions of installed software. ```bash LIBVA_DRIVERS_PATH="/usr/lib/x86_64-linux-gnu/dri" LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu" NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" NVIDIA_VISIBLE_DEVICES="all" HANDBRAKE=1.7.3 ``` -------------------------------- ### HandBrake Transcode Basic Options Configuration Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/04-plugins.md Configure basic HandBrake transcoding with preset, quality, and video codec settings. Use this for standard transcoding tasks. ```json { "preset": "default", "quality": 20, "videoCodec": "H.265" } ``` -------------------------------- ### Add or Remove Subtitles with MkvToolNIX Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/07-tools-integration.md Utilize mkvmerge to control subtitle streams during the remuxing process. This example excludes all subtitle tracks from the output file. ```bash mkvmerge -o output.mkv --no-subtitles input.mkv ``` -------------------------------- ### WebUI Get Library Files API Response Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/05-webui-api.md JSON response from the /api/v1/libraries/{libraryID}/files endpoint, showing details of files within a library. ```json { "files": [ { "path": "/mnt/movies/file.mkv", "size": 5368709120, "codecs": { "video": "h264", "audio": ["aac", "ac3"] }, "duration": 5400, "resolution": "1920x1080" } ], "total": 523 } ``` -------------------------------- ### Update Running Docker Container Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md To update a running container, pull the new image, stop the old container, and start a new one using the same options. ```bash # Pull new image docker pull haveagitgat/tdarr:latest # Stop old container docker stop tdarr # Start new container with new image docker run -d \ --name tdarr \ ... (same options) haveagitgat/tdarr:latest ``` -------------------------------- ### Tdarr Node Service Script Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/09-docker-reference.md Bash script for running the Tdarr node process. It checks for the server service and starts the Tdarr_Node binary as the Tdarr user. ```bash #!/usr/bin/with-contenv bash cd /app/Tdarr_Node || exit 1 if [ -d "/etc/services.d/tdarr_server" ] && [ "$internalNode" = true ]; then echo "Starting Tdarr_Node" exec s6-setuidgid Tdarr ./Tdarr_Node fi if [ ! -d "/etc/services.d/tdarr_server" ]; then echo "Starting Tdarr_Node" exec s6-setuidgid Tdarr ./Tdarr_Node fi ``` -------------------------------- ### Start Tdarr Docker Container with New Image Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Restart the Tdarr Docker container using the latest image. Existing volumes ensure data persistence. ```bash docker-compose up -d ``` -------------------------------- ### Deploy Tdarr Server with Docker Source: https://github.com/haveagitgat/tdarr/blob/master/_autodocs/03-deployment.md Deploy the Tdarr server using 'docker run', mapping ports and volumes for configuration, libraries, and logs. Environment variables configure ports and timezone. ```bash docker run -d \ --name tdarr_server \ -p 8265:8265 \ -p 8266:8266 \ -p 8267:8267 \ -v /host/server:/app/server \ -v /host/library:/mount \ -v /host/logs:/logs \ -e "WEB_UI_PORT=8265" \ -e "SERVER_PORT=8266" \ -e "NODE_PORT=8267" \ -e "TZ=Europe/London" \ -e "PUID=1000" \ -e "PGID=1000" \ haveagitgat/tdarr:latest ```