A fast, lightweight, and user-friendly GUI application built with Python and CustomTkinter. It utilizes the sheer power of FFmpeg to drastically compress your videos, often reducing file sizes by up to 90% without any noticeable loss in visual quality!
| Compressing a batch | Finished |
|---|---|
![]() |
![]() |
- Modern GUI: A sleek Dark Mode interface built using
CustomTkinter. Simple and responsive. - Bilingual UI (VI/EN): Switch the whole interface between Vietnamese and English on the fly from the language menu; your choice is remembered.
- Drag & Drop: Drop one or more video files straight onto the list, no need to open a dialog. Non-video files are filtered out automatically.
- Batch Compression: Select multiple videos at once and the app compresses them one after another, reporting overall progress and a final summary (e.g. "3/3 done"). Files that fail validation are skipped and logged, so one bad file won't stop the whole batch.
- Per-File Size Report: Each video in the list shows its original size, then updates to
before ➡️ after (-NN%)the moment that file finishes, on top of the overall savings summary. - Scrollable File List: Every selected video appears in a scrollable list with a live, color-coded status (waiting / compressing / done / failed / skipped), so you can see exactly where each file is in a batch.
- Custom Output Folder: Save compressed files to a folder you choose, or keep the default of saving next to the source. Your choice is remembered.
- Remembers Your Choices: Your codec, CRF, 720p option, output folder, and last-used folder are saved to a local
config.jsonand restored next time you open the app, no need to reconfigure. - Codec Choice: Pick between H.265 (
libx265) for the deepest compression or H.264 (libx264) for the widest device/player compatibility. - GPU Acceleration (NVIDIA): If a working NVENC encoder is detected on your machine, extra H.265/H.264 GPU options appear for dramatically faster encoding. Availability is verified by a real test-encode at startup, so dead options never show up.
- Per-File Remove: Each row has an ✕ button to drop a single file from the list (disabled while a batch is running) without clearing everything.
- Bigger-Output Warning: If a compressed file ends up the same size or larger than the source (rare, e.g. already-optimized clips), its size label turns amber with a ⚠ and the percentage it grew by.
- Speed Preset: Choose any FFmpeg preset from
ultrafasttoveryslowto trade encoding time for compression efficiency (defaults tofast). - Two Compression Modes:
- Quality (CRF): dial in a constant-quality factor with the slider.
- Target Size (MB): type the size you want each video to end up at (e.g. 25 MB for Discord) and the app runs a 2-pass encode to hit it. The required video bitrate is computed from the video duration automatically.
- Trim Before Compressing: optionally cut each video to a time range (
From/Toinhh:mm:ss) so you only encode the part you need. - Audio Control: choose the output audio bitrate (96k/128k/192k/256k) or keep the original audio stream untouched.
- Lossless-like Quality: Uses highly efficient modern codecs to minimize file size while preserving stunning visual details.
- Customizable Compression: Includes an interactive slider to dial in the perfect CRF (Constant Rate Factor) value, giving you total control over the balance between compression strength and output quality (Defaults to a recommended 28).
- Cancel Anytime: A dedicated cancel button stops the running encode immediately and cleans up the unfinished output file.
- Input Validation: Before encoding, each file is checked with
ffprobeto confirm it exists, isn't empty, and actually contains a video stream, surfacing a clear error instead of a cryptic FFmpeg failure. - Extreme Compression Mode: Check the "Force 720p HD" option to rapidly scale down huge 4K or 1080p videos to 720p, achieving unparalleled file size reduction while maintaining the exact aspect ratio.
- Smart Audio Handling: Compresses embedded audio utilizing the
AACcodec to ensure maximum space-saving efficiency. - Real-Time Progress & ETA: A live progress bar shows the exact completion percentage while encoding, alongside an estimated time remaining. Progress is calculated by reading FFmpeg's
-progressoutput against the video's total duration (viaffprobe). For batches, the bar reflects overall progress across all files. - Overwrite-Safe Output: Never silently clobbers existing files. If
video_da_nen.mp4already exists, the app automatically saves tovideo_da_nen (1).mp4,(2), and so on. - Full Error Logging: When FFmpeg fails, the complete error output is written to
video_compressor_error.lognext to your source file, while the UI shows a clean summary. Makes debugging painless. - Auto-Portable FFmpeg: Integrates
static_ffmpegto automatically handle downloading and linking the required FFmpeg binaries onto your machine so you don't have to fiddle with System Environment Variables. - Fast and Non-Blocking: Processes the intensive FFmpeg operations in a background thread, preventing the application UI from freezing. It updates you in real-time and opens the output folder immediately upon finish.
- Cross-Platform Folder Open: Automatically opens the output folder when done on Windows, macOS, and Linux.
Ensure you have Python 3.10+ installed.
-
Clone the repository:
git clone https://github.com/tridpt/VideoCompressor.git cd VideoCompressor -
Install dependencies:
pip install -r requirements.txt
-
Run the App:
python main.py
A PyInstaller spec is included that bundles customtkinter, tkinterdnd2, and
static_ffmpeg so the result runs without a Python install:
pyinstaller SuperVideoCompressor.spec --noconfirmThe executable is produced in dist/SuperVideoCompressor.exe.
- Click Chọn Video (Select Video) and browse for one or more
.mp4,.mkv,.mov, or.avifiles, or simply drag & drop them onto the list. You can select multiple videos to compress them as a batch. - Pick a codec: H.265 for the smallest files, or H.264 for the broadest compatibility, and a preset (
ultrafast…veryslow) to balance speed against compression. - Choose a mode:
- Quality (CRF): use the slider. Lower value = larger files & better quality; higher value = stronger compression. 28 is the sweet spot.
- Target Size (MB): type how big each output should be; the app runs a 2-pass encode to reach it.
- Optional: Select the 720p downscaler if you're compressing massive videos to send via email or Discord.
- Optional: Tick Cắt video / Trim video and enter a
From/Torange to compress only part of the clip, and pick an audio bitrate (or keep the original). - Optional: Click Chọn thư mục (Choose Folder) to save the results somewhere specific, or leave it on the default (next to the source files).
- Hit BẮT ĐẦU NÉN VIDEO (START) and watch the progress bar and ETA, plus each file's before/after size as it finishes. You can press HỦY (Cancel) at any time to stop. The output folder opens automatically when finished.
Tip: Use the language menu in the top-right to switch the interface between Tiếng Việt and English at any time.
Developed by Trần Đức Trí. Created to solve the hassle of memorizing long FFmpeg command lines for simple video crunching tasks.
For architecture, code internals, and contribution guidelines, see the technical documentation (DOCS.md).

