WhatsApp Sticker Generator is a desktop application built with Python that allows you to easily create animated stickers for WhatsApp from any video file. It features a user-friendly GUI with drag-and-drop support, video trimming, and automatic compression to ensure your stickers meet WhatsApp's strict file size limits (< 500 KB).
This project simplifies the process of creating high-quality animated WebP stickers. Instead of manually using command-line tools, this app provides:
- Drag & Drop: Simply drop your video file into the app.
- Batch Processing: Process an entire folder of videos in one click.
- Video Preview & Trimming: Choose exactly which part of the video you want to turn into a sticker using an interactive range slider.
- Adaptive Quality Search (v2.0): The app uses mathematical interpolation to find the highest quality that stays under 500 KB with minimal iterations.
- Auto-Cleanup: Only valid stickers are kept in the output folder; oversized or failed files are automatically deleted.
- Interactive Logs: Monitor the rendering and compression process in real-time.
Follow these instructions to set up the project on your local machine.
- Python 3.x: Download Python
- FFmpeg: This tool is required for video processing.
- Windows: Download from ffmpeg.org, extract, and add the
binfolder to your System PATH. - Linux/macOS: Use your package manager (e.g.,
sudo apt install ffmpegorbrew install ffmpeg).
- Windows: Download from ffmpeg.org, extract, and add the
-
Clone the repository:
git clone https://github.com/yusufadji/whatsapp-sticker-generator.git cd whatsapp-sticker-generator -
Set up a Virtual Environment (Recommended):
# Create virtual environment python -m venv venv # Activate virtual environment # On Windows: .\venv\Scripts\activate # On Linux/macOS: source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Import Video: Drag and drop a video file into the "Drag & Drop Video Di Sini" area.
- Select Range: Use the green slider handles to select the start and end points of your sticker. You can preview the frames using the bottom slider.
- Set Initial Quality: Enter a starting quality value (default is 75).
- Render: Click "Render Stiker WA". The app will process the video and automatically try to fit it under 500 KB using the adaptive algorithm.
- Batch Mode: Click "Pilih Folder (Batch)" to select a folder containing multiple videos. The app will process all videos using the same adaptive logic (starting at quality 75).
- Output: Once finished, click "Buka Folder Output" to see your new
.webpstickers.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/yusufadji/whatsapp-sticker-generator