Overview
Camera Workflow is designed for high-throughput parallel processing. This guide covers performance optimization techniques, resource management, and tuning guidelines for different hardware configurations.Quick Wins
1. Enable Hardware Acceleration
Dramatic speedup for video conversions (macOS):2. Optimize Worker Count
Balance parallelism with system resources:- Image-heavy batches:
jobs = CPU cores(images are less CPU-intensive) - Video-heavy batches:
jobs = CPU cores / 2(videos saturate CPU) - Mixed batches:
jobs = CPU cores - 2(default, balanced)
3. Use Adaptive Workers for Videos
Automatically scale video concurrency based on system load:Hardware-Specific Tuning
Desktop Workstation (16+ cores, 32+ GB RAM)
Goal: Maximum throughput~/.media-converter.yaml
- Images: 20-40 files/second (JPEG → AVIF)
- Videos: 2-6 concurrent conversions
- Bottleneck: Disk I/O or GPU encoder
Laptop (4-8 cores, 8-16 GB RAM)
Goal: Balance performance with thermal/battery constraints~/.media-converter.yaml
- Images: 8-15 files/second
- Videos: 1-3 concurrent conversions
- Bottleneck: Thermal throttling
Server (32+ cores, 64+ GB RAM, No GPU)
Goal: Maximize software encoding throughput~/.media-converter.yaml
- Images: 40-80 files/second
- Videos: 8-16 concurrent conversions
- Bottleneck: CPU, possibly disk I/O
Format-Specific Optimization
AVIF (Best Compression, Slower)
Characteristics:- Encoding: 2-3x slower than WebP
- File size: 30-50% smaller than WebP
- Best for: Archival, web delivery, bandwidth-limited scenarios
| Quality | Speed | File Size | Visual Quality |
|---|---|---|---|
| 70 | 1.0x | 100% | Excellent |
| 80 | 0.7x | 130% | Near-lossless |
| 90 | 0.4x | 180% | Lossless-like |
WebP (Balanced)
Characteristics:- Encoding: Fast (baseline for comparison)
- File size: Good compression (60-70% of JPEG)
- Best for: General use, compatibility with older browsers
Video Codec Comparison
| Codec | Encoding Speed | Compression | Compatibility | Best Use Case |
|---|---|---|---|---|
| H.264 (libx264) | 1.5x | Good | Universal | Compatibility |
| H.265 (libx265) | 1.0x | Excellent | Modern devices | Balance |
| H.265 (VideoToolbox) | 5.0x | Excellent | Modern devices | Speed (macOS) |
| AV1 (libaom-av1) | 0.1x | Best | Limited | Archival only |
Disk I/O Optimization
Storage Types
Performance Hierarchy:- NVMe SSD: 3000-7000 MB/s (best for working directory)
- SATA SSD: 500-600 MB/s (good for source or destination)
- HDD (7200 RPM): 150-200 MB/s (acceptable for archival destination)
- Network (Gigabit): 100-125 MB/s (bottleneck risk)
- Network (100 Mbps): 10-12 MB/s (severe bottleneck)
Optimal Storage Configuration
Best Performance:Temporary File Location
Conversions write to<output>.tmp before atomic rename. Ensure destination has:
- Free space: 50% of source directory size (safety margin)
- Write speed: Sufficient for concurrent conversions
- Low latency: Local/direct-attached storage preferred
Memory Management
Memory Requirements
Per-Worker Estimates:- Image conversion: 100-300 MB (JPEG/HEIC)
- Image conversion: 500-800 MB (RAW files, 50+ MP)
- Video conversion (hardware): 200-400 MB
- Video conversion (software): 500-1000 MB
Adaptive Worker Memory Protection
Prevent OOM conditions with adaptive workers:- Monitors available memory every 3 seconds
- Reduces video workers if free memory drops below threshold
- Prevents new workers from starting (doesn’t kill existing)
Image conversions are not managed by adaptive workers. Set
--jobs conservatively if processing large RAW files.Monitoring Performance
Real-Time Metrics
The converter logs progress and resource adjustments:Performance Bottleneck Detection
CPU Bottleneck:Benchmark Examples
Test Dataset
- 1000 JPEG images (12-24 MP, 3-8 MB each)
- 50 videos (1080p-4K, 100-500 MB each)
- Total: ~25 GB
Results (M2 MacBook Pro, 10 cores, 16 GB RAM)
Configuration 1: Defaults- Jobs: 8 (auto-detected)
- Video acceleration: Enabled
- Adaptive workers: Disabled
- Time: 18 minutes
- Peak CPU: 95%
- Peak Memory: 8 GB
- Jobs: 10 (images)
- Video acceleration: Enabled
- Adaptive workers: 2-6 (dynamic)
- Time: 14 minutes
- Peak CPU: 85%
- Peak Memory: 7 GB
- Jobs: 8
- Video acceleration: Disabled
- Time: 52 minutes
- Peak CPU: 100%
- Peak Memory: 12 GB
- Output size: 15% larger, visually superior
Advanced Tuning
CPU Affinity (Linux)
Pin conversions to specific CPU cores:Process Priority
Reduce system impact of long conversions:I/O Scheduling (Linux)
Prioritize interactive system responsiveness:Configuration Templates
Maximum Speed (Desktop)
~/.media-converter.yaml
Maximum Quality (Archival)
~/.media-converter.yaml
Balanced (Recommended)
~/.media-converter.yaml
Troubleshooting
Slow Conversion Speed
-
Check hardware acceleration status:
-
Monitor resource usage:
-
Test with single worker:
If single-threaded is slow, issue is encoding efficiency, not parallelism.
System Unresponsive During Conversion
Reduce resource consumption:Out of Memory Errors
Solutions:-
Enable adaptive workers with aggressive memory protection:
-
Reduce parallelism:
-
Process in batches:
Related Configuration
Adaptive Workers
Automatic resource-based concurrency scaling
Hardware Acceleration
GPU-based video encoding for efficiency