Python CLI tool for batch file conversion using multiple FFmpeg workers.
- Multi-format Support: Convert multiple source formats (e.g.,
.wav,.flac) to a target format (e.g.,.mp3). - Concurrent Processing: Leverages multiple FFmpeg workers for faster batch processing.
- Recursive Search: Scan directories and subdirectories for source files.
- In-place Replacement: Option to delete source files after successful conversion.
Ensure you have FFmpeg installed and added to your system PATH.
pip install -r requirements.txtDependencies: rich, ffmpeg-python.
python -m typeconvert [OPTIONS]-i, --input: Input directory.-o, --output: Output directory.-f, --from: List of source extensions to convert (e.g.,wav flac).-t, --to: Target extension (e.g.,mp3).-r, --recursive: Recursively search input directory.--replace: Delete source files after conversion. Safe Mode: Files are moved to a hidden.typeconvert_trashfolder during processing and only permanently deleted if the entire batch completes successfully. Interrupting the process restores them.--dry-run: Simulate the conversion process without modifying any files.-w, --workers: Number of concurrent FFmpeg instances (default: CPU count).
Convert all .wav and .flac files in a folder to .mp3 using 4 workers, recursively, and replace the originals:
python -m typeconvert --input ./music --from wav flac --to mp3 --recursive --replace --workers 4