Global Flags
These flags are available for the root command.Configuration
Path to configuration file.Default:
$HOME/.media-converter.yamlExample:Core Flags
Show what would be converted without actually converting.Alias:
-nWhen enabled:- Scans source directory
- Shows file counts and estimated processing time
- No files are created or modified
- Skips dependency checks
Keep original files after conversion.Alias:
-kWhen disabled (false):- Original files are deleted after successful conversion
- Triple verification before deletion:
- Output file exists
- Integrity check passes
- Size validation succeeds
Number of parallel conversion jobs.Alias:
-jRange: 1 to CPU coresBehavior:- Default:
runtime.NumCPU() - 2 - Automatically capped at CPU core count
- Minimum value is 1
Copy files without conversion (archive mode).When enabled:
- Files are copied without modification
- Automatically enables
--verify-checksum - Incompatible with all conversion flags
- Skips dependency checks (FFmpeg, ImageMagick not required)
Verify file integrity using checksums.Behavior:
- Automatically enabled when
--copy-onlyis used - Calculates checksums before and after operations
- Validates file integrity during copy operations
Enable JSON output for Tauri integration.When enabled:
- Outputs structured JSON events to stdout
- Silences standard CLI output
- Disables colored output
- Designed for programmatic consumption
start- Conversion startedprogress- File progress updatecomplete- File completederror- Error occurredsummary- Final statistics
Image Conversion Flags
Output format for photos.Options:
avif, webpSupported Input Formats:jpg,jpeg,heic,heifcr2,arw,nef,dng(RAW formats)tiff,tif,png,raw,bmp,gif,webp
Quality for AVIF images.Range: 1-100 (higher is better quality)Recommendations:
95-100: Archival quality80-90: High quality (default)70-80: Good quality, smaller files50-70: Web optimization
Quality for WebP images.Range: 1-100 (higher is better quality)Recommendations:
90-100: Near-lossless80-90: High quality (default)70-80: Good balance60-70: Web-optimized
Video Conversion Flags
Video codec for output.Options:
h265, h264, av1Supported Input Formats:mov,mp4,avi,mkv,m4vmts,m2ts,mpg,mpegwmv,flv,3gp,3gpp
h265: Best balance of quality, compression, and compatibilityh264: Maximum compatibility, larger filesav1: Best compression, slower encoding, limited hardware support
Video CRF (Constant Rate Factor) value.Range: 0-51 (lower is better quality)Recommendations:
18-22: Very high quality, large files23-28: High quality (default)28-32: Good quality, smaller files32+: Lower quality, maximum compression
Enable hardware acceleration for video conversion.Behavior:
- Automatically detects available hardware encoders
- Falls back to software encoding if unavailable
- Significantly faster conversion on supported hardware
- NVIDIA NVENC
- Intel Quick Sync
- AMD VCE
- Apple VideoToolbox (macOS)
Adaptive Worker Flags
Enable adaptive worker management for video conversions.Behavior:
- Dynamically adjusts worker count based on system resources
- Monitors CPU and memory utilization
- Scales workers between min and max values
- Checks system resources at regular intervals
Minimum concurrent video conversions in adaptive mode.Range: 1 to
--adaptive-workers-maxExample:Maximum concurrent video conversions in adaptive mode.Range:
--adaptive-workers-min to --jobsBehavior:- Automatically capped at
--jobsvalue - Must be >=
--adaptive-workers-min
CPU utilization threshold to reduce workers (percentage).Range: 0.0-100.0When CPU usage exceeds this threshold, worker count is reduced.Example:
CPU utilization threshold to increase workers (percentage).Range: 0.0 to
--adaptive-workers-cpu-highWhen CPU usage falls below this threshold, worker count is increased.Behavior:- Must be less than
--adaptive-workers-cpu-high - Auto-calculated as 60% of cpu-high if invalid
Minimum available memory percentage before reducing workers.Range: 0.0-100.0When available memory falls below this percentage, worker count is reduced.Example:
Seconds between adaptive worker checks.Range: 1+ secondsBehavior:
- System resources checked at this interval
- Lower values = more responsive but higher overhead
- Higher values = less overhead but slower adaptation
Organization Flags
Organize files by date in output directory.Alias: Date Extraction:
-oDirectory Structure:- EXIF data for photos
- Video metadata for videos
- File modification time as fallback
Language for month names in date organization.Options:
en, fr, es, deExamples:en:01-January,02-Februaryfr:01-Janvier,02-Févrieres:01-Enero,02-Febrerode:01-Januar,02-Februar
Security Flags
Timeout for photo conversion in seconds.Default: 300 seconds (5 minutes)Behavior:
- Conversion process killed if timeout exceeded
- File marked as failed
- Prevents hanging conversions
Timeout for video conversion in seconds.Default: 1800 seconds (30 minutes)Behavior:
- Conversion process killed if timeout exceeded
- File marked as failed
- Prevents hanging conversions
Minimum output size ratio compared to input.Default: 0.0 (uses format-specific defaults)Format-Specific Defaults:
- AVIF: 0.001 (0.1% of original)
- WebP: 0.003 (0.3% of original)
- General: 0.005 (0.5% of original)
- Prevents corrupted or empty output files
- Conversion fails if output is too small
- Use 0.0 to apply format-specific defaults
Skip destination disk space verification.Warning: Use with cautionBehavior:
- Bypasses disk space checks before conversion
- May result in failed conversions if disk full
- Useful for network drives or special filesystems
Flag Compatibility
Copy-Only Mode
When--copy-only is enabled, these flags are incompatible:
--photo-format--photo-quality-avif--photo-quality-webp--video-codec--video-crf--video-acceleration--adaptive-workers--adaptive-workers-min--adaptive-workers-max--adaptive-workers-cpu-high--adaptive-workers-cpu-low--adaptive-workers-mem-low--adaptive-workers-interval