Batch mirror videos horizontally for ML data augmentation. Designed for flipping LCORK7 (left-cork) videos to RCORK7 (right-cork) with sequential TRICK numbering.
- Python 3
- ffmpeg (
brew install ffmpegon macOS)
Place the script in your input directory (e.g. LCORK7/) and run:
# Dry-run: verify mapping without processing
python mirror_lcork7_batch.py --dry-run
# Process videos (skips existing output files)
python mirror_lcork7_batch.py
# Overwrite existing output files
python mirror_lcork7_batch.py --overwrite| Flag | Default | Description |
|---|---|---|
--input-dir |
script directory | Input directory |
--output-dir |
../RCORK7 |
Output directory |
--start-index |
57 | Starting TRICK number |
--pad |
3 | Zero-padding digits |
--dry-run |
— | Print mapping, do not process |
--overwrite |
— | Overwrite existing output files |
Input: TRICK23_LCORK7.mov, TRICK24_LCORK7.mov, …
Output: TRICK057_RCORK7.mov, TRICK058_RCORK7.mov, …
Files are processed in lexicographic order.