One-command video compression for paper submissions
Compress screen recordings, simulation captures, and experiment videos to H.264 MP4 — so they fit within conference supplementary material size limits.
Many conferences and journals (ICRA, RSS, CoRL, RA-L, etc.) impose strict file-size limits on supplementary videos. Raw screen recordings or simulation captures are often 10–100× too large. VideoComp turns a multi-step FFmpeg pipeline into a single command:
python compress_video.py "my_experiment.webm"
# → ~/Videos/compressedmp4/my_experiment.mp4 (typically 5-20× smaller)Zero pip dependencies — only Python standard library + system FFmpeg.
Option A — conda (recommended)
Installs both Python and FFmpeg in one isolated environment:
conda create -n videocomp python=3 ffmpeg -y
conda activate videocompOption B — system FFmpeg
# Ubuntu / Debian
sudo apt install ffmpeg
# macOS
brew install ffmpeg
# Windows (winget)
winget install FFmpegThen use any Python ≥ 3.6 you already have.
# Single file
python compress_video.py "video.webm"
# Multiple files
python compress_video.py "video1.webm" "video2.mkv" "video3.avi"
# Custom output directory
python compress_video.py -o ./compressed "video.webm"CRF controls the quality–size trade-off (0–51, lower = better quality). Default: 23.
python compress_video.py --crf 18 "video.webm" # high quality, larger file
python compress_video.py --crf 28 "video.webm" # smaller file, still decent| CRF | Quality | Typical Use |
|---|---|---|
| 18 | Near-lossless | High-quality demos, archival |
| 23 | Good (default) | General screen recordings |
| 28 | Medium | Most conference submissions |
| 35+ | Low | Quick preview only |
Slower presets → better compression at the same quality. Default: medium.
python compress_video.py --preset slow "video.webm"Available presets (fast → slow):
ultrafast · superfast · veryfast · faster · fast · medium · slow · slower · veryslow
python compress_video.py --crf 20 --preset slow -o ~/Desktop "experiment.webm"usage: compress_video.py [-h] [-o OUTPUT_DIR] [--crf CRF] [--preset PRESET] input [input ...]
positional arguments:
input Input video file(s)
options:
-h, --help Show this help message and exit
-o, --output-dir DIR Output directory (default: ~/Videos/compressedmp4)
--crf N CRF value 0-51, lower = better quality (default: 23)
--preset P Encoding speed preset (default: medium)
- Start with
--crf 23(default). If the file is still too large, increase to 28 or 30. - Use
--preset slowif you have time — it squeezes out ~10-20% more compression at the same CRF. - Most conferences accept H.264 MP4, which is exactly what this tool outputs.
- Check your conference's size limit (commonly 50 MB or 100 MB) and adjust CRF accordingly.
Issues and PRs are welcome! This is a simple tool — if you have ideas for useful features (e.g. target file-size mode, batch folder processing), feel free to open an issue.