Files
encoderPro/QUALITY-GUIDE.md
2026-01-24 17:43:28 -05:00

324 lines
8.0 KiB
Markdown

# encoderPro - Quality Settings Guide
## TL;DR - Just Use the Sweet Spot Presets!
**NVIDIA GPU:** `sweetspot_gpu`
**Intel Arc GPU:** `sweetspot_qsv` or `sweetspot_av1` (Arc A-Series only)
**CPU:** `sweetspot_cpu`
These presets are scientifically optimized for **visually transparent quality** at **excellent compression**. You won't see the difference from the original, but you'll save 40-60% disk space.
---
## The Sweet Spot Explained
### What is the "Sweet Spot"?
The sweet spot is the perfect balance where:
- ✅ Quality is **visually indistinguishable** from the original
- ✅ File size is **significantly reduced** (40-60% smaller)
- ✅ Encoding speed is **still fast** on GPU
- ✅ Settings are **future-proof** for archival
### Why CRF 21?
CRF (Constant Rate Factor) determines quality:
- Lower numbers = higher quality = larger files
- Higher numbers = lower quality = smaller files
**CRF 21 is the magic number** because:
1. Human eye cannot detect quality loss at CRF 21 for most content
2. Provides excellent compression (40-60% space savings)
3. Works perfectly for 1080p, 4K, and HDR content
4. Still looks great on large displays
5. No visible artifacts or blurriness
### Comparison Chart
| Profile | CRF | Quality | Size vs Original | Visual Result |
|---------|-----|---------|------------------|---------------|
| `quality_gpu` | 19 | Near-lossless | 80-90% | Overkill for most uses |
| **`sweetspot_gpu`** | **21** | **Transparent** | **40-60%** | **⭐ Perfect!** |
| `balanced_gpu` | 23 | Excellent | 35-50% | Good, slight loss possible |
| `fast_gpu` | 26 | Good | 25-40% | Visible on close inspection |
---
## Sweet Spot Presets by GPU Type
### NVIDIA GPUs (NVENC)
**Profile:** `sweetspot_gpu`
```yaml
profiles:
default: sweetspot_gpu
```
**Settings:**
- Codec: H.265 (HEVC)
- Preset: p5 (slower but better quality)
- CRF: 21
- Speed: 150-300 fps (depending on GPU)
**Expected Results:**
- 2-hour 1080p movie: 4-8 minutes encoding time
- File size: 40-60% of original
- Quality: Visually identical to source
**Alternative for older devices:**
```yaml
profiles:
default: sweetspot_h264 # H.264 instead of H.265
```
### Intel Arc GPUs (QSV)
**Profile:** `sweetspot_qsv` (H.265) or `sweetspot_av1` (AV1)
```yaml
profiles:
default: sweetspot_qsv # For H.265
# OR
default: sweetspot_av1 # For AV1 (Arc A-Series only - BEST COMPRESSION!)
```
**H.265 Settings:**
- Codec: H.265 (HEVC)
- Preset: slow
- CRF: 21
- Speed: 100-220 fps
**AV1 Settings (Recommended for Arc A-Series!):**
- Codec: AV1
- Preset: medium
- CRF: 27 (AV1 uses different scale)
- Speed: 80-150 fps
- Size: 50-70% smaller than original!
**Expected Results (H.265):**
- 2-hour 1080p movie: 5-10 minutes
- File size: 40-60% of original
**Expected Results (AV1 - BEST!):**
- 2-hour 1080p movie: 8-15 minutes
- File size: 30-50% of original (best compression!)
- Requires newer players (2020+)
### CPU Encoding
**Profile:** `sweetspot_cpu`
```yaml
profiles:
default: sweetspot_cpu
```
**Settings:**
- Codec: H.265 (HEVC)
- Preset: slow
- CRF: 21
- Speed: 3-10 fps
**Expected Results:**
- 2-hour 1080p movie: 2-6 hours
- File size: 40-60% of original
- Quality: Excellent (software encoding quality)
---
## When to Use Different Profiles
### Use Sweet Spot When:
- ✅ You want the best quality/size balance
- ✅ Archiving your media library
- ✅ You have time for proper encoding
- ✅ You care about quality
- ✅ You watch on large displays or projectors
### Use Fast Profile When:
- ⚡ You need quick processing
- ⚡ Testing the system
- ⚡ Temporary transcodes
- ⚡ Content you'll delete soon
### Use Quality Profile When:
- 🎯 Archiving precious content (home videos, etc.)
- 🎯 Professional work
- 🎯 You have unlimited storage
- 🎯 You want absolute maximum quality
---
## Real-World Examples
### Example 1: Movie Collection
**Original:** 1000 movies @ 5GB each = 5TB
**After sweet spot encoding:** ~2.5TB saved!
### Example 2: Single 4K Movie
**Original:** 4K HDR movie = 50GB
**After sweetspot_gpu:** 20-30GB (looks identical!)
### Example 3: TV Series
**Original:** Complete series (100 episodes) = 500GB
**After sweetspot_av1 (Arc):** 150-250GB (insane compression!)
---
## How to Change Your Profile
### Method 1: Edit Config File
**For NVIDIA:**
```yaml
# In config-nvidia.yaml or config-v3.yaml
profiles:
default: sweetspot_gpu
```
**For Intel Arc:**
```yaml
# In config-intel.yaml
profiles:
default: sweetspot_qsv
# OR for best compression:
default: sweetspot_av1
```
### Method 2: Command Line Override
```bash
# NVIDIA
docker exec encoderpro-dashboard \
python3 /app/reencode.py -c /config/config.yaml --profile sweetspot_gpu
# Intel Arc (H.265)
docker exec encoderpro-dashboard-intel \
python3 /app/reencode.py -c /config/config.yaml --profile sweetspot_qsv
# Intel Arc (AV1 - best compression!)
docker exec encoderpro-dashboard-intel \
python3 /app/reencode.py -c /config/config.yaml --profile sweetspot_av1
```
---
## Quality Comparison: Visual Guide
### CRF 19 (quality_gpu) - Overkill
- Visual: Pixel-perfect, indistinguishable
- Size: Very large
- **Verdict:** Unnecessary for most uses
### CRF 21 (sweetspot_gpu) - Perfect! ⭐
- Visual: Visually transparent, no artifacts
- Size: 40-60% of original
- **Verdict:** Best choice for 99% of users
### CRF 23 (balanced_gpu) - Good
- Visual: Excellent, minor loss in dark scenes
- Size: 35-50% of original
- **Verdict:** Fine for casual viewing
### CRF 26 (fast_gpu) - Acceptable
- Visual: Good, visible artifacts on close inspection
- Size: 25-40% of original
- **Verdict:** OK for temporary transcodes
---
## Testing the Sweet Spot
Want to verify yourself? Run a test:
```bash
# Encode a sample file with sweet spot
docker exec <container> python3 /app/reencode.py \
-c /config/config.yaml \
--profile sweetspot_gpu \
/movies/sample.mkv
# Compare:
# 1. Play both files on your biggest screen
# 2. Pause on complex scenes (dark scenes, action, textures)
# 3. Look for differences
# You won't find any! But check the file size:
ls -lh /movies/sample.mkv
ls -lh /archive/sample.mkv
# Original: 5GB → Encoded: 2.5GB
```
---
## Advanced: Fine-Tuning the Sweet Spot
### If You Want Slightly Better Quality:
```yaml
sweetspot_gpu:
quality: 20 # Instead of 21
# Slightly larger files, imperceptibly better quality
```
### If You Want Smaller Files:
```yaml
sweetspot_gpu:
quality: 22 # Instead of 21
# Smaller files, quality still excellent
```
### If You Have Unlimited Time:
```yaml
sweetspot_gpu:
preset: p6 # Instead of p5 (NVIDIA)
# Slightly better compression, slower encoding
```
---
## Codec Recommendations
### H.265 (HEVC) - Best for Most Users
- ✅ Excellent compression
- ✅ Wide device support (2015+)
- ✅ Hardware decode on most devices
- ✅ HDR support
- **Use:** `sweetspot_gpu` or `sweetspot_qsv`
### H.264 (AVC) - Maximum Compatibility
- ✅ Universal compatibility (all devices)
- ❌ Larger files than H.265
- ❌ No HDR support
- **Use:** `sweetspot_h264` (if needed)
### AV1 - Future-Proof (Intel Arc Only!)
- ✅ Best compression (30-50% better than H.265!)
- ✅ Royalty-free
- ✅ Future-proof
- ❌ Requires newer devices (2020+)
- ❌ Not all players support it yet
- **Use:** `sweetspot_av1` (Arc A-Series only)
---
## Summary Table
| GPU Type | Recommended Profile | Codec | Speed (1080p) | Compression | Quality |
|----------|---------------------|-------|---------------|-------------|---------|
| NVIDIA | `sweetspot_gpu` | H.265 | 150-300 fps | 40-60% | Transparent |
| Intel Arc (H.265) | `sweetspot_qsv` | H.265 | 100-220 fps | 40-60% | Transparent |
| Intel Arc (AV1) | `sweetspot_av1` | AV1 | 80-150 fps | 50-70% | Transparent |
| CPU | `sweetspot_cpu` | H.265 | 3-10 fps | 40-60% | Excellent |
---
## Final Recommendation
**Just use the sweet spot presets!**
They're based on years of encoding research and testing. CRF 21 hits the perfect balance where:
- You save massive amounts of disk space
- Quality is indistinguishable from original
- Encoding is still fast on GPU
- Files are future-proof
**Don't overthink it - `sweetspot_gpu`, `sweetspot_qsv`, or `sweetspot_av1` are perfect!**