A lightweight Python CLI tool for batch media processing powered by FFmpeg.
- Batch compression, conversion and resizing
- image and video workflows
- FPS modification
- Custom output extensions
-
Python 3.9+
-
Python dependencies
pip install click- FFmpeg installed
https://ffmpeg.org/download.html
Important
FFmpeg must be installed and available in your system PATH.
git clone https://github.com/yourname/mediabatch.git
cd mediabatchpython FFForge.py [ARGS]Warning
Existing files in the output directory will be overwritten.
| Argument | Description |
|---|---|
-i, --input |
Input directory |
-o, --output |
Output directory |
-cP, --compress |
Compress media using max width + compression level |
-cV, --convert |
Convert media to another extension |
-r, --resize |
Resize media using WIDTH:HEIGHT |
-f, --fps |
Change FPS |
-tE, --target-extension |
Force output extension |
python main.py -cP 1920 28
# 1920 --> maximum width; height is calculated automatically
# 28 --> compression levelTip
Use lower compression values for higher quality.
Compresses media while preserving aspect ratio.
python main.py -cV .mp4Converts all compatible files to MP4.
python main.py -r 1280:720Resizes media to 1280x720.
python main.py -f 60Changes output FPS to 60.
python main.py -i ./media -o ./processed -cV .webmIMG_EXTENSIONS = {".jpg", ".jpeg", ".png", ".webp", ".gif"}
VIDEO_EXTENSIONS = {".mp4", ".mkv", ".avi", ".mov", ".webm"}- More options
- Extension filtering
- Recursive directory traversal
- Progress bars
- Much more