# 4K HDR Quick Reference Card
## π¬ New Feature Summary
| Feature | Status | Details |
|---------|--------|---------|
| `--r 2160` flag | β
NEW | Enable 4K/HDR mode with source validation |
| HDR detection | β
NEW | Auto-detects BT.2020 + SMPTE2084 color space |
| 8-channel audio | β
NEW | Allowed on 4K (max for 2160p) |
| High bitrate (640k) | β
NEW | Available for 4K multi-channel audio |
| Color profiles | β
NEW | HDR10 flags applied to ffmpeg output |
| Default 4K downscale | β
UNCHANGED | Still downscales to 1080p without flag |
| 720p/1080p audio | β
UNCHANGED | Logic preserved as-is |
---
## β‘ Quick Commands
### Enable 4K Processing
```bash
python main.py "path\to\4k" --r 2160
```
### Test 4K File (15 min)
```bash
python main.py "path\to\4k" --r 2160 --test
```
### Batch Process Mixed Content
```bash
python main.py --paths-file batch.txt
# batch.txt:
# P:\4k_content --r 2160
# P:\1080p_content --r 1080
```
### With CQ Override
```bash
python main.py "path\to\4k" --r 2160 --cq 25
```
---
## π Detection Logic
### When Processing with `--r 2160`
```
Source Resolution | Decision | Output
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β₯ 2160p (4K+) | β
Process 4K | 4K output
< 2160p (1080p, etc) | βοΈ SKIP | Not encoded
```
### HDR Detection
```
Color Space | Transfer | HDR? | Notes
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
BT.2020 | SMPTE2084 (PQ) | β
| HDR10
BT.2020 | Other | β | 4K SDR
rec709 | Any | β | Standard
```
---
## π Audio Channel Limits
```
Resolution β Max Channels β Examples
ββββββββββββββΌβββββββββββββββΌβββββββββββββββββββββββββ
720p β 2 β Stereo only
1080p β 6 β 5.1, 6.0, reduced 7.1β6
4K (2160p) β 8 β 7.1, 8 channels, full
```
---
## πΎ Audio Bitrate Caps
```
Resolution β Stereo (2ch) β Multi-ch (6ch) β Multi-ch (8ch)
ββββββββββββββΌββββββββββββββββΌβββββββββββββββββΌββββββββββββββ
720p β 192 kbps β β β β
1080p β 192 kbps β 448 kbps max β β
4K β 192 kbps β 640 kbps max β 640 kbps max
```
---
## π₯ Encoder Selection (Auto)
```
Source Bit Depth | Selected Encoder | Profile
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β€ 8-bit | AV1 NVENC | 8-bit yuv420p
β₯ 10-bit | HEVC NVENC | 10-bit p010le
```
---
## π HDR Color Profile Application
When HDR detected and source is 4K:
```
ffmpeg flags added:
-color_space bt2020_ncl (BT.2020 color space)
-color_primaries bt2020 (BT.2020 primaries)
-color_trc smpte2084 (PQ tone mapping)
```
Result: **HDR10 compatible output**
---
## β
Validation Flow
```
--r 2160 specified?
β
YES β Check source height β₯ 2160p?
β β
β YES β β
Process as 4K
β β Detect HDR
β β Allow 8ch audio
β β Allow 640kbps
β β
β NO β βοΈ Skip (notify user)
β
NO β Use default/explicit resolution
(backward compatible)
```
---
## π Console Output Signs
### β
4K Processing Active
```
π¬ HDR content detected (BT.2020 + SMPTE2084)
π Target: 2160p (4K passthrough)
ποΈ Stream #0: 8chβ8ch | Output: EAC3 640kbps
πΉ Video: HEVC NVENC | 2160p
HDR color profile: BT.2020 + SMPTE2084 (HDR10)
```
### β οΈ Skipping Non-4K
```
βοΈ Skipping: --r 2160 requested but source is only 1080p (not 4K)
```
### π 4K SDR (No HDR)
```
π Target: 2160p (4K passthrough)
ποΈ Stream #0: 8chβ8ch | Output: EAC3 640kbps
πΉ Video: HEVC NVENC | 2160p
(No HDR color profile message = SDR content)
```
---
## π« Common Mistakes
### β Using `--r 2160` on 1080p
```bash
python main.py "path\to\1080p" --r 2160
# Result: βοΈ Skipped "not 4K"
```
**Fix**: Omit `--r 2160` or use `--r 1080`
### β Expecting automatic 4K
```bash
python main.py "path\to\4k"
# Result: π¬ Encoded as 1080p (default)
```
**Fix**: Add `--r 2160` to enable 4K mode
### β 8-channel on 1080p
```python
# Config allows 640kbps high bitrate
# But 1080p limits to 448kbps + 6ch max
```
**Result**: Automatically downmixed to 6ch at 448kbps
---
## π― Decision Tree
```
Is source 4K?
ββ NO β Use default logic (downscale to 1080p)
ββ YES β Want 4K output?
ββ NO β Omit --r 2160 (downscale to 1080p)
ββ YES β Use --r 2160
ββ Detect HDR color space
ββ Apply HDR profiles (if detected)
ββ Allow 8-channel audio
ββ Allow 640kbps bitrate
ββ β
Encode at 4K
```
---
## π Performance Notes
| Task | Approx Time | Notes |
|------|------------|-------|
| 1080p encode | 30-60 min | Single movie |
| 4K encode | 2-3 hours | 4-6x slower than 1080p |
| 4K test mode | 15 min | First 15 minutes only |
---
## π§ Config Adjustment (Optional)
### For Higher 4K Quality
```xml
23
```
### For Smaller 4K Files
```xml
512000
```
---
## π Documentation Files
| File | Purpose |
|------|---------|
| `IMPLEMENTATION_COMPLETE.md` | Full technical summary |
| `IMPLEMENTATION_SUMMARY_4K_HDR.md` | Feature details |
| `AUDIO_CONFIG_GUIDE.md` | Audio bitrate guide |
| `4K_HDR_CLI_REFERENCE.md` | CLI examples |
| (this file) | Quick reference |
---
## β¨ Key Points to Remember
1. β
**Opt-in**: Use `--r 2160` to enable 4K (not automatic)
2. β
**Validated**: Non-4K sources automatically skipped
3. β
**Smart Audio**: Channels/bitrate auto-optimized per resolution
4. β
**HDR Aware**: Detects & preserves HDR color metadata
5. β
**Compatible**: Works with all existing features
6. β
**No Breaking Changes**: All previous commands work unchanged
---
**Last Updated**: 2026-05-17
**Status**: Production Ready β