vexy-vid
High-performance video cropping and trimming CLI tool with automatic detection.
Documentation: https://vexy.dev/vexy-vid/
Features
- Crop — crop video to specific dimensions with alignment control
- Trim — remove edges from video (like reversed CSS padding)
- Scale — resize video after cropping/trimming
- Automatic letterbox (black bar) detection and removal
- Automatic subtitle region detection and removal
- Hardware-accelerated encoding with automatic fallback
- PyAV-based frame extraction (50-100% faster than OpenCV)
- Numba-optimized pixel analysis (10-50x speedup)
- Parallel frame processing with buffer pooling
Requirements
- Python 3.10+
- ffmpeg binary installed on your system (
brew install ffmpeg/apt install ffmpeg)
Note: ffmpeg is a system dependency and cannot be installed via pip. All other dependencies are installed automatically.
Installation
# Install with uv (recommended)
uv pip install vexy-vid
# Or with pip
pip install vexy-vid
# Development install
uv pip install -e ".[dev]"
Usage
Crop — crop to specific dimensions
# Crop to exact pixels
vexy-vid crop --crop 1280x720 --input video.mp4
# Crop to aspect ratio
vexy-vid crop --crop 16:9 --Halign 0 --Valign 100 --input video.mp4
# Crop to percentage
vexy-vid crop --crop 50%x50% --input video.mp4
# Crop and scale
vexy-vid crop --crop 16:9 --scale 1920x1080 --input video.mp4
Trim — remove edges
# Remove pixels from edges
vexy-vid trim --top 100 --bottom 50 --input video.mp4
# Remove percentage from sides
vexy-vid trim --left 10% --right 10% --input video.mp4
# Auto-detect and remove letterbox bars
vexy-vid trim --Letterbox --input video.mp4
# Auto-detect and remove subtitle region
vexy-vid trim --subtitles --bottom 20 --input video.mp4
# Trim and scale
vexy-vid trim --Letterbox --scale 1920x1080 --input video.mp4
Common flags
| Flag | Description |
|---|---|
--input / -i |
Input video path (or pipe via stdin) |
--output / -o |
Output video path (auto-generated if omitted) |
--quality / -q |
Encoding quality: 0 (fast), 1 (balanced), 2 (quality) |
--verbose / -v |
Enable verbose logging |
Size spec formats (for --crop and --scale)
| Format | Example | Description |
|---|---|---|
WxH |
1280x720 |
Exact pixel dimensions |
W:H |
16:9 |
Aspect ratio |
P%xP% |
50%x50% |
Percentage of original |
Wx |
1280x |
Width only (height = 100%) |
xH |
x720 |
Height only (width = 100%) |
| Mixed | 1280x50% |
Pixels and percentage |
Performance
Optimizations over the original implementation:
- PyAV multi-threaded decoding — 50-100% faster frame extraction
- Hardware encoder detection — 300-500% encoding speedup (NVENC, QSV, AMF)
- Producer-consumer pipeline — 200-400% parallel processing improvement
- Buffer pool memory management — 25-50% reduced allocation overhead
- Numba SIMD pixel operations — 10-50x analysis speedup
- Intelligent caching — instant reprocessing of identical videos
Documentation
Full documentation — CLI reference, automatic detection, hardware encoding,
architecture and troubleshooting — is at https://vexy.dev/vexy-vid/ (sources in
src_docs/md/).
Development
uv venv && uv pip install -e ".[dev]"
pytest tests/ # integration tests skip without ffmpeg
ruff check src/ tests/ && ruff format src/ tests/
See CLAUDE.md and AGENTS.md for architecture and
the load-bearing details behind the ffmpeg integration.
License
Metadata
Release files for vexy-vid 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vexy_vid-1.0.6.tar.gz | 22.9 kB | Without provenance | Details for vexy_vid-1.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vexy_vid-1.0.6-py3-none-any.whl | Python 3 | none | any | Details for vexy_vid-1.0.6-py3-none-any.whl |
Total release size: 49.6 kB
Release files / vexy_vid-1.0.6.tar.gz
| Download URL | vexy_vid-1.0.6.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30ba1dd17bf6719263cca794728c15a07d9435081e8af711e488d5f058a67d9c
|
|
BLAKE2b-256 checksum How to use checksums |
7c1414a7dc0eb6e98d27274d65b88739e48a231bd171e545079b23d8497abb6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vexy_vid-1.0.6-py3-none-any.whl
| Download URL | vexy_vid-1.0.6-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e138eef15ec190a9355673ce905c8754df15011173aa311a3c70f09a299ba59
|
|
BLAKE2b-256 checksum How to use checksums |
83a294fe4686236a3783db10b1e6d5aee72e4a0e85056dbf8b0b314e624c9fa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for vexy-vid 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.