Hardware Command โ
The hardware
command provides universal GPU detection, automatic driver installation, and intelligent hardware optimization for maximum transcoding performance across NVIDIA RTX, AMD VAAPI, Intel QuickSync, and Raspberry Pi VideoCore.
Usage โ
bash
usenet hardware <action> [options]
Actions โ
Action | Description | Example |
---|---|---|
list | Show hardware capabilities and recommendations | usenet hardware list |
optimize | Generate hardware-optimized configurations | usenet hardware optimize --auto |
install-drivers | Auto-install optimal GPU drivers | usenet hardware install-drivers |
benchmark | Test transcoding performance | usenet hardware benchmark |
profile | Manage performance profiles | usenet hardware profile balanced |
Hardware Detection โ
Show Capabilities โ
bash
usenet hardware list
Example output for NVIDIA RTX system:
bash
๐ HARDWARE CAPABILITIES DETECTED
๐ GPU: NVIDIA GeForce RTX 4090
โข NVENC/NVDEC: โ Available (AV1, HEVC, H.264)
โข CUDA Cores: 16,384
โข VRAM: 24GB GDDR6X
โข Driver: 545.29.06 โ Optimal
โข Docker: nvidia-docker2 โ Installed
๐ง CPU: Intel Core i9-13900K
โข Cores: 24 (8P + 16E)
โข Threads: 32
โข Quick Sync: โ Available (AV1, HEVC, H.264)
โข AVX-512: โ Supported
๐พ Memory: 64GB DDR5-5600
โข Available: 48GB (75%)
โข Suitable for: Dedicated performance profile
๐ PERFORMANCE OPTIMIZATION OPPORTUNITIES:
โ
4K HEVC transcoding: 60+ FPS (vs 2-5 FPS CPU-only)
โ
Simultaneous streams: 8+ concurrent 4K transcodes
โ
AV1 encoding: 50% smaller files than H.264
โ
HDR tone mapping: Real-time HDR10 to SDR conversion
โ
Power efficiency: 50W GPU vs 200W CPU transcoding
๐ก RECOMMENDATIONS:
โข Use 'dedicated' performance profile for maximum throughput
โข Enable hardware transcoding in Jellyfin and Tdarr
โข Consider AV1 encoding for storage efficiency
Example output for AMD system:
bash
๐ HARDWARE CAPABILITIES DETECTED
๐ฅ GPU: AMD Radeon RX 7900 XTX
โข VAAPI/AMF: โ Available (HEVC, H.264)
โข Compute Units: 96
โข VRAM: 24GB GDDR6
โข Driver: AMDGPU 23.20 โ Current
โข VA-API: libva โ Configured
๐ง CPU: AMD Ryzen 9 7950X
โข Cores: 16
โข Threads: 32
โข Architecture: Zen 4
โข Integrated Graphics: None
๐พ Memory: 32GB DDR5-5200
โข Available: 24GB (75%)
โข Suitable for: High performance profile
โก PERFORMANCE OPTIMIZATION OPPORTUNITIES:
โ
Hardware HEVC encoding: 10x faster than CPU
โ
VAAPI acceleration: Energy-efficient transcoding
โ
Dual-stream processing: Encode while serving
โ
HDR10 passthrough: Preserve HDR metadata
๐ก RECOMMENDATIONS:
โข Install mesa-va-drivers for optimal VAAPI support
โข Use 'high' performance profile for best balance
โข Enable AMF encoding in supported applications
Driver Installation โ
Automatic Driver Installation โ
bash
usenet hardware install-drivers
NVIDIA systems:
bash
๐ง Installing NVIDIA drivers...
๐ฆ Detecting system:
โข OS: Ubuntu 22.04 LTS
โข Kernel: 6.2.0-39-generic
โข GPU: RTX 4090
๐ Installing optimal drivers:
โ nvidia-driver-545 (latest stable)
โ nvidia-docker2 (container support)
โ nvidia-cuda-toolkit (development tools)
โ๏ธ Configuring Docker integration:
โ /etc/docker/daemon.json updated
โ Docker service restarted
โ nvidia-docker runtime available
๐งช Testing installation:
โ nvidia-smi responds correctly
โ NVENC/NVDEC capabilities detected
โ Docker GPU access confirmed
โ
Installation complete! Reboot recommended.
AMD systems:
bash
๐ง Installing AMD drivers...
๐ฆ Detecting system:
โข OS: Ubuntu 22.04 LTS
โข GPU: RX 7900 XTX
๐ Installing optimal drivers:
โ mesa-va-drivers (VAAPI support)
โ libva-dev (development headers)
โ vainfo (testing utility)
โ๏ธ Configuring VA-API:
โ /etc/environment updated
โ User added to video group
โ Device permissions configured
๐งช Testing installation:
โ vainfo shows available profiles
โ Hardware acceleration verified
โ VAAPI encoding confirmed
โ
Installation complete!
Manual Driver Options โ
bash
# Install specific driver version
usenet hardware install-drivers --version 545.29.06
# Install with development tools
usenet hardware install-drivers --include-dev
# Test installation without installing
usenet hardware install-drivers --dry-run
Performance Optimization โ
Generate Optimized Configurations โ
bash
usenet hardware optimize --auto
Generated optimizations:
- docker-compose.optimized.yml - Hardware-tuned service configurations
- jellyfin.xml - Transcoding settings for detected GPU
- tdarr_configs.json - Optimized transcoding profiles
- ffmpeg_profiles/ - Hardware-specific encoding presets
Performance Profiles โ
bash
# Set specific performance profile
usenet hardware profile dedicated
# List available profiles
usenet hardware profile list
# Show current profile
usenet hardware profile
Profile | CPU Usage | RAM Allocation | GPU Usage | Use Case |
---|---|---|---|---|
light | 25% | 4GB | Optional | Development, testing |
balanced | 50% | 8GB | Yes | Home server (default) |
high | 75% | 16GB | Yes | Dedicated media server |
dedicated | 100% | All available | Yes | Media center appliance |
Custom Optimization โ
bash
# Optimize for specific services
usenet hardware optimize --services jellyfin,tdarr
# Optimize for specific codec
usenet hardware optimize --codec hevc
# Generate profiles for all codecs
usenet hardware optimize --all-codecs
Performance Benchmarking โ
Transcoding Benchmarks โ
bash
usenet hardware benchmark
Example benchmark results:
bash
๐งช TRANSCODING PERFORMANCE BENCHMARK
Test Configuration:
โข Source: 4K HEVC 10-bit HDR (50 Mbps)
โข Target: 1080p H.264 8-bit SDR (8 Mbps)
โข Duration: 60 seconds
๐ Results:
CPU-Only Transcoding:
โฑ๏ธ Time: 180 seconds (0.33x realtime)
โก Power: ~200W
๐ก๏ธ Temperature: 85ยฐC
๐ CPU Usage: 100%
GPU-Accelerated (NVENC):
โฑ๏ธ Time: 30 seconds (2.0x realtime)
โก Power: ~50W total
๐ก๏ธ Temperature: 65ยฐC
๐ GPU Usage: 45%
Improvement:
๐ Speed: 6x faster
๐ก Power: 75% reduction
โ๏ธ Temperature: 20ยฐC cooler
Custom Benchmark Tests โ
bash
# Test specific codec
usenet hardware benchmark --codec hevc
# Test multiple concurrent streams
usenet hardware benchmark --streams 4
# Test different resolutions
usenet hardware benchmark --resolution 1080p,4k
Hardware Configurations โ
Generated Docker Compose โ
docker-compose.optimized.yml (NVIDIA example):
yaml
services:
jellyfin:
deploy:
resources:
limits:
memory: 8G
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
volumes:
- ./config/jellyfin_hw.xml:/config/encoding.xml:ro
tdarr:
deploy:
resources:
limits:
memory: 16G
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- serverIP=0.0.0.0
- serverPort=8266
- webUIPort=8265
- internalNode=true
- nodeID=MainNode
Jellyfin Hardware Transcoding โ
Generated config/jellyfin_hw.xml:
xml
<EncodingOptions>
<HardwareAccelerationType>nvenc</HardwareAccelerationType>
<EnableHardwareDecoding>true</EnableHardwareDecoding>
<EnableHardwareEncoding>true</EnableHardwareEncoding>
<EnableToneMappingDecodingWithNvenc>true</EnableToneMappingDecodingWithNvenc>
<AllowHardwareSubtitleExtraction>true</AllowHardwareSubtitleExtraction>
<H264Crf>23</H264Crf>
<H265Crf>28</H265Crf>
<DeinterlaceMethod>yadif</DeinterlaceMethod>
<EnableDecodingColorDepth10Hevc>true</EnableDecodingColorDepth10Hevc>
<EnableEnhancedNvdecDecoder>true</EnableEnhancedNvdecDecoder>
</EncodingOptions>
Multi-GPU Support โ
GPU Selection โ
bash
# List available GPUs
usenet hardware list --gpus
# Optimize for specific GPU
usenet hardware optimize --gpu 0
# Use multiple GPUs
usenet hardware optimize --gpu all
Multi-GPU allocation:
bash
๐ง Multiple GPUs detected:
GPU 0: NVIDIA RTX 4090 (24GB) - Primary transcoding
GPU 1: NVIDIA RTX 3080 (10GB) - Secondary transcoding
Service allocation:
โข Jellyfin: GPU 0 (primary streaming)
โข Tdarr: GPU 1 (background processing)
โข Handbrake: GPU 0 (manual encoding)
Advanced Features โ
Custom FFmpeg Profiles โ
bash
# Generate custom encoding profiles
usenet hardware generate-profiles --quality high --efficiency balanced
# Create profile for specific use case
usenet hardware generate-profiles --profile "4k-archive" \
--input-format "hevc" \
--output-format "av1" \
--crf 28 \
--preset slow
Hardware Monitoring โ
bash
# Real-time hardware monitoring during transcoding
usenet hardware monitor
# Monitor specific metrics
usenet hardware monitor --metrics gpu-util,temp,power
# Log monitoring data
usenet hardware monitor --log /var/log/hardware-monitor.log
Power Management โ
bash
# Set GPU power limits (NVIDIA)
usenet hardware power-limit --gpu 0 --watts 300
# Enable GPU boost
usenet hardware boost enable
# Set performance mode
usenet hardware performance-mode max
Examples โ
bash
# Detect hardware capabilities
usenet hardware list
# Install optimal drivers
usenet hardware install-drivers
# Generate optimized configs
usenet hardware optimize --auto
# Set high performance profile
usenet hardware profile high
# Benchmark performance
usenet hardware benchmark
bash
# Check VAAPI support
usenet hardware list
# Install VAAPI drivers
usenet hardware install-drivers
# Optimize for AMD hardware
usenet hardware optimize --amd
# Test hardware acceleration
usenet hardware benchmark --codec hevc
bash
# Detect QuickSync capabilities
usenet hardware list --intel
# Install Intel media drivers
usenet hardware install-drivers --intel
# Optimize for QuickSync
usenet hardware optimize --quicksync
# Set balanced profile (recommended for Intel)
usenet hardware profile balanced
bash
# Detect VideoCore capabilities
usenet hardware list
# Enable GPU memory split
usenet hardware configure --pi --gpu-mem 128
# Optimize for low power
usenet hardware profile light
# Test hardware decode
usenet hardware benchmark --pi-test
Troubleshooting โ
Common Issues โ
GPU not detected:
bash
# Check driver installation
nvidia-smi # NVIDIA
vainfo # AMD
intel_gpu_top # Intel
# Reinstall drivers
usenet hardware install-drivers --force
Docker GPU access denied:
bash
# Check nvidia-docker installation
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
# Fix permissions
sudo usermod -aG docker $USER
sudo systemctl restart docker
Poor transcoding performance:
bash
# Check hardware utilization
usenet hardware monitor
# Verify optimal profile
usenet hardware profile dedicated
# Check thermal throttling
usenet hardware temperature
Hardware Logs โ
bash
# View hardware optimization logs
usenet logs hardware
# Debug driver installation
usenet hardware install-drivers --verbose
# Monitor real-time GPU usage
usenet hardware monitor --live
Performance Analysis โ
bash
# Analyze transcoding bottlenecks
usenet hardware analyze
# Compare profiles
usenet hardware benchmark --compare-profiles
# Export performance report
usenet hardware report --export performance.json
Cross-Platform Support โ
Platform-Specific Optimizations โ
Ubuntu/Debian:
bash
# APT-based driver installation
usenet hardware install-drivers --apt
# Enable restricted repositories
usenet hardware enable-repos --non-free
CentOS/RHEL:
bash
# YUM/DNF-based installation
usenet hardware install-drivers --yum
# Enable EPEL repository
usenet hardware enable-repos --epel
Arch Linux:
bash
# Pacman-based installation
usenet hardware install-drivers --pacman
# Enable AUR packages
usenet hardware enable-repos --aur
Container Runtimes โ
bash
# Configure for Podman
usenet hardware configure --runtime podman
# Configure for containerd
usenet hardware configure --runtime containerd
# Configure for Docker with BuildKit
usenet hardware configure --buildkit