Introduction
Camera Workflow provides a powerful command-line interface for converting and organizing media files. The CLI is designed to be safe, efficient, and flexible with extensive configuration options.Basic Usage
source- Directory containing media files to convertdestination- Directory where converted files will be saved
Quick Examples
Command Structure
Camera Workflow uses a single root command with numerous flags for customization. The application follows this execution flow:- Initialization - Validates directories and checks dependencies
- Safety Test - Tests conversion on a sample file (unless
--dry-run) - File Discovery - Scans source directory for supported media files
- Parallel Conversion - Processes files using worker pools
- Progress Tracking - Shows real-time progress with ETAs
- Final Report - Displays statistics and cost estimations
Configuration Priority
Settings are applied in the following order (highest priority first):- Command-line flags
- Environment variables
- Configuration file (
~/.media-converter.yaml) - Default values
Output Structure
By default, converted files are organized by date:Dates are extracted from file metadata (EXIF, video metadata), not filesystem timestamps, ensuring accurate chronological organization.
Logging
All operations are logged to{destination}/conversion.log with detailed timing and error information. The log includes:
- Conversion start/end times
- File-by-file processing details
- Error messages and stack traces
- Statistics and performance metrics
Safety Features
Idempotent Operations
The converter is designed to be run multiple times safely:- Already converted files are automatically skipped
- Interrupted conversions can be resumed
- Atomic file operations prevent partial writes
Data Protection
- Original files are preserved by default (
--keep-originals=true) - Processing markers track active conversions
- Automatic recovery from crashes
- Corruption detection and re-conversion
Verification
Before any destructive operation:- Verify output file exists
- Check file integrity
- Validate file size against minimum ratios
Dependencies
Required external tools (checked automatically):- FFmpeg - Video conversion and metadata extraction
- ImageMagick - Image conversion and EXIF data reading
In
--copy-only mode, dependency checks are skipped as no conversion tools are needed.Exit Codes
The CLI uses standard exit codes:0- Success1- Error (configuration, validation, or conversion failure)
JSON Mode
When--json-mode is enabled, the application outputs structured JSON events to stdout for integration with GUI applications:
Next Steps
Commands
Detailed command documentation with examples
Flags Reference
Complete flag documentation with defaults
Configuration
Configuration file format and environment variables