https://github.com/valentin-guillet/gifextractor
Python tool to visually extract GIF from MP4 files
https://github.com/valentin-guillet/gifextractor
gif gif-extractor python3 python3-script
Last synced: 12 months ago
JSON representation
Python tool to visually extract GIF from MP4 files
- Host: GitHub
- URL: https://github.com/valentin-guillet/gifextractor
- Owner: Valentin-Guillet
- Created: 2025-02-18T13:28:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T13:41:39.000Z (over 1 year ago)
- Last Synced: 2025-02-18T14:34:10.856Z (over 1 year ago)
- Topics: gif, gif-extractor, python3, python3-script
- Language: Python
- Homepage:
- Size: 641 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GIF Extractor
GIF Extractor is a GUI application that allows users to extract GIFs from MP4 videos easily. It provides an intuitive interface for selecting a crop region, marking start and end frames, and exporting the selected clip as a GIF using FFmpeg.

## Features
- Video playback with seeking and playback speed adjustments.
- Selection overlay for defining the cropped region.
- GIF preview functionality before export.
- Keyboard shortcuts for quick operations.
- Built with PyQt6 for the GUI and FFmpeg for video processing.
## Installation
### Prerequisites
Ensure you have the following installed on your system:
- **Python 3** (recommended version 3.8 or later)
- **FFmpeg** (required for video processing)
- **PyQt6** (for the graphical user interface)
- **gifsicle** (optional: for gif optimization)
## Usage
Run the script with an optional video file as an argument:
```sh
python gif_extractor.py [videoPath]
```
If no video path is provided, you can open a file from within the application.
## Keyboard Shortcuts
- **Ctrl + O**: Open a video
- **Space / K**: Play/Pause
- **J / Left Arrow**: Seek backward 3 seconds
- **L / Right Arrow**: Seek forward 3 seconds
- **S**: Mark start frame
- **E**: Mark end frame
- **A**: Go to start frame
- **D**: Go to end frame
- **P**: Toggle GIF preview
- **X / Ctrl + S**: Save GIF
- **Q**: Quit
- **?**: Show help
## Saving GIFs
1. Open a video file.
2. Use `S` and `E` to mark the start and end of your desired GIF.
3. Optionally select a cropped region using the mouse.
4. Press `X` or `Ctrl + S` to save the GIF.
The application uses FFmpeg to generate GIFs and optimizes them using `gifsicle` (if available).