Skip to content

Volodishlav/FFmpegForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFmpegForge

A lightweight Python CLI tool for batch media processing powered by FFmpeg.

Features

  • Batch compression, conversion and resizing
  • image and video workflows
  • FPS modification
  • Custom output extensions

Requirements

  • 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.


Installation

git clone https://github.com/yourname/mediabatch.git
cd mediabatch

Usage

python FFForge.py [ARGS]

Warning

Existing files in the output directory will be overwritten.


Args

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

Examples

Compress media

python main.py -cP 1920 28
# 1920 --> maximum width; height is calculated automatically
# 28   --> compression level

Tip

Use lower compression values for higher quality.

Compresses media while preserving aspect ratio.


Convert media format

python main.py -cV .mp4

Converts all compatible files to MP4.


Resize media

python main.py -r 1280:720

Resizes media to 1280x720.


Change FPS

python main.py -f 60

Changes output FPS to 60.


Custom input/output directories

python main.py -i ./media -o ./processed -cV .webm

Supported Extensions

IMG_EXTENSIONS = {".jpg", ".jpeg", ".png", ".webp", ".gif"}
VIDEO_EXTENSIONS = {".mp4", ".mkv", ".avi", ".mov", ".webm"}

Future Improvements

  • More options
  • Extension filtering
  • Recursive directory traversal
  • Progress bars
  • Much more

About

CLI FFmpeg tool written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages