Configuration File
Camera Workflow supports YAML configuration files for persistent settings. Configuration files are optional but provide a convenient way to set defaults without specifying flags on every run.Default Location
Custom Location
Specify a custom configuration file:Configuration Format
All configuration options use snake_case keys in YAML:~/.media-converter.yaml
Configuration Priority
Settings are applied in order of priority (highest to lowest):- Command-line flags (highest priority)
- Environment variables
- Configuration file
- Default values (lowest priority)
Example Priority Resolution
~/.media-converter.yaml
Configuration Options
Processing Settings
Number of parallel conversion jobs.Maps to flag:
--jobsEnable dry-run mode (preview without converting).Maps to flag:
--dry-runEnable copy-only mode (no conversion).Maps to flag:
--copy-onlyVerify file integrity using checksums.Maps to flag:
--verify-checksumAutomatically enabled when
copy_only is true.Enable JSON output for Tauri integration.Maps to flag:
--json-modeImage Conversion Settings
Output format for photos.Options:
avif, webpMaps to flag: --photo-formatQuality for AVIF images (1-100).Maps to flag:
--photo-quality-avifQuality for WebP images (1-100).Maps to flag:
--photo-quality-webpVideo Conversion Settings
Video codec for output.Options:
h265, h264, av1Maps to flag: --video-codecVideo CRF value (0-51, lower is better).Maps to flag:
--video-crfEnable hardware acceleration for video.Maps to flag:
--video-accelerationOrganization Settings
Organize files by date in output.Maps to flag:
--organize-by-dateKeep original files after conversion.Maps to flag:
--keep-originalsLanguage for month names.Options:
en, fr, es, deMaps to flag: --languageSecurity Settings
Skip disk space verification.Maps to flag:
--skip-disk-checkPhoto conversion timeout in seconds.Maps to flag:
--timeout-photoVideo conversion timeout in seconds.Maps to flag:
--timeout-videoMinimum output size ratio (general).Maps to flag:
--min-output-ratioSet to 0.0 to use format-specific defaults.
Minimum output size ratio for AVIF.Used when
min_output_size_ratio is 0.0.Minimum output size ratio for WebP.Used when
min_output_size_ratio is 0.0.Adaptive Worker Settings
Adaptive worker settings use a nested structure:Enable adaptive worker management.Maps to flag:
--adaptive-workersMinimum concurrent video conversions.Maps to flag:
--adaptive-workers-minMaximum concurrent video conversions.Maps to flag:
--adaptive-workers-maxCPU threshold to reduce workers (%).Maps to flag:
--adaptive-workers-cpu-highCPU threshold to increase workers (%).Maps to flag:
--adaptive-workers-cpu-lowMinimum memory before reducing workers (%).Maps to flag:
--adaptive-workers-mem-lowSeconds between resource checks.Maps to flag:
--adaptive-workers-intervalEnvironment Variables
Camera Workflow automatically reads environment variables through Viper. Any configuration key can be set via environment variable: Format: Uppercase configuration key with underscoresExamples
Nested Configuration
For nested configuration likeadaptive_workers, use dot notation or underscores:
Configuration Examples
High-Quality Archival
~/.media-converter.yaml
Fast Web Optimization
~/.media-converter.yaml
Production Server
~/.media-converter.yaml
Safe Backup Mode
~/.media-converter.yaml
Validation
Configuration is validated at runtime:Automatic Corrections
max_jobs< 1 → set to 1max_jobs> CPU cores → capped at CPU coresmin_output_size_ratio≤ 0 → set to 0.005adaptive_workers.min< 1 → set to 1adaptive_workers.max< min → set to min valueadaptive_workers.cpu_low≥ cpu_high → set to 60% of cpu_high
Flag Conflicts
~/.media-converter.yaml
Troubleshooting
Check Active Configuration
When a config file is found, it’s printed to stderr:Debug Configuration Priority
Configuration Not Loading
- Check file location:
$HOME/.media-converter.yaml - Verify YAML syntax (use online YAML validator)
- Check file permissions: must be readable
- Use
--configflag to specify explicit path
Environment Variables Not Working
- Ensure variables are exported:
export VAR=value - Use correct casing: uppercase with underscores
- Check variable name matches config key
- Environment variables override config file but not flags