Skip to content

FrameXtractor is an interactive FFmpeg-based tool to extract video frames in high quality, supporting custom FPS, format, resolution, and output naming.

License

Notifications You must be signed in to change notification settings

Katryoshkh/FrameXtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FrameXtractor

FrameXtractor is an interactive, FFmpeg-based video frame extractor. FrameXtractor produces high-quality frames with customizable FPS, format, resolution, and output naming.

๐Ÿ”น Features

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

๐Ÿ”น Installation

  1. Clone the repository:
git clone https://github.com/Katryoshkh/FrameXtractor.git
cd FrameXtractor
  1. Make the script executable:
chmod +x framextractor.sh
  1. Ensure FFmpeg is installed and accessible:
ffmpeg -version

FFmpeg installation:

Linux (Debian/Ubuntu):

sudo apt install ffmpeg

macOS (Homebrew):

brew install ffmpeg

Android (Termux):

pkg install ffmpeg

Windows: Download binaries from ffmpeg.org

๐Ÿ”น Usage

Run the script:

bash framextractor.sh
./framextractor.sh

You will be prompted to enter:

  1. Video file path
  2. FPS (frames per second) [default: 30]
  3. Image format (png/jpg) [default: png]
  4. Optional scaling (width:height, leave blank for original resolution)
  5. 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.

๐Ÿ”น Notes

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

๐Ÿ”น Tips

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

๐Ÿ”น License

This project is licensed under the Apache-2.0 License.

About

FrameXtractor is an interactive FFmpeg-based tool to extract video frames in high quality, supporting custom FPS, format, resolution, and output naming.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages