FrameXtractor is an interactive, FFmpeg-based video frame extractor. FrameXtractor produces high-quality frames with customizable FPS, format, resolution, and output naming.
- Extract video frames interactively via the terminal.
- Supports any video format that FFmpeg can read (MP4, MOV, MKV, AVI, etc.).
- Customizable frame rate (FPS) for extraction.
- Supports image formats: PNG (lossless) and JPG (with quality control).
- Optional scaling or keep the original video resolution (1:1).
- Custom output base name, with default pattern if skipped.
- Automatic output folder creation, with auto-increment if folder exists.
- Lightweight Bash script, requires only FFmpeg.
- Clone the repository:
git clone https://github.com/Katryoshkh/FrameXtractor.git
cd FrameXtractor- Make the script executable:
chmod +x framextractor.sh- Ensure FFmpeg is installed and accessible:
ffmpeg -versionFFmpeg installation:
Linux (Debian/Ubuntu):
sudo apt install ffmpegmacOS (Homebrew):
brew install ffmpegAndroid (Termux):
pkg install ffmpegWindows: Download binaries from ffmpeg.org
Run the script:
bash framextractor.sh./framextractor.shYou will be prompted to enter:
- Video file path
- FPS (frames per second) [default: 30]
- Image format (png/jpg) [default: png]
- Optional scaling (width:height, leave blank for original resolution)
- Output base name [default: frame]
The script will display a summary and ask for confirmation before extraction starts.
Example
Enter video file path: /home/user/Videos/sample.mp4
Enter FPS (frames per second) [default: 30]: 60
Choose image format (png/jpg) [default: png]:
Enter scaling (leave blank to keep original resolution):
Enter output base name (default: frame): sample
==========================================================
Input video : /home/user/Videos/sample.mp4
Output dir : /home/user/Videos/frames
FPS : 60
Format : png
Scale : original (1:1)
Output name : sample_%04d.png
==========================================================
Proceed with extraction? (y/n): y
Frames will be saved in the frames/ folder as sample_0001.png, sample_0002.png, etc.
-
Auto-increment output folder: If frames exists, a new folder will be created as frames(1), frames(2), etc.
-
JPEG quality: Only applies to JPG format (2โ31, lower = better).
-
Original resolution: Leave scaling blank to preserve original video dimensions.
-
Supported formats: Any video format FFmpeg can read.
-
For long videos, increase FPS carefully, extracting too many frames can consume large disk space.
-
Use PNG for maximum quality if storage is not an issue.
-
Use custom base names to keep multiple extractions organized.
-
Script works on Linux, macOS, and Android (Termux).
This project is licensed under the Apache-2.0 License.