CLIPR
CLIPR stands for Clip Improvement, Processing, and Reframing.
CLIPR is a Python video-processing library built around local ffmpeg, with a clean API for splitting, enhancing, reframing, and batch-processing videos.
For portrait outputs like Reels and TikTok, CLIPR reframes footage into the target canvas instead of simply rotating the whole source video.
It supports:
- Splitting one video into
30s,60s, and90schunks - Batch processing a whole directory of videos
- Smart social presets for YouTube, Instagram Reels, TikTok, WhatsApp, and presentations
- Trim and crop operations
- Audio enhancement with normalization, denoise, and volume adjustment
- Orientation changes for portrait, landscape, and rotation modes
- Progress tracking callbacks and a CLI percentage bar for long-running jobs
Why CLIPR
The name reflects the core workflow:
Cfor ClipLfor LifecycleIfor ImprovementPfor ProcessingRfor Reframing
Installation
Install ffmpeg, then install the package:
pip install -e .
Quick Python Example
from pathlib import Path
from clipr import (
AudioEnhancementSettings,
EnhancementSettings,
ProcessingOptions,
SocialPreset,
TrimSettings,
batch_process_directory,
make_4k_widescreen,
make_instagram_reel,
process_video,
split_video,
)
def show_progress(percent: float, message: str) -> None:
print(message)
split_video(
Path("sample.mp4"),
segment_lengths=(30, 60, 90),
output_dir=Path("output/segments"),
progress_callback=show_progress,
)
process_video(
Path("sample.mp4"),
Path("output/reel.mp4"),
options=ProcessingOptions(
enhancement=EnhancementSettings(),
audio=AudioEnhancementSettings(normalize=True, denoise=True),
trim=TrimSettings(start_time=5, duration=20),
social_preset=SocialPreset.INSTAGRAM_REEL,
),
progress_callback=show_progress,
)
batch_process_directory(
Path("sample_videos"),
Path("output/batch"),
options=ProcessingOptions(
enhancement=EnhancementSettings(),
audio=AudioEnhancementSettings(normalize=True),
social_preset=SocialPreset.WHATSAPP,
),
progress_callback=show_progress,
)
make_4k_widescreen(
Path("sample.mp4"),
Path("output/movie_4k.mp4"),
progress_callback=show_progress,
)
make_instagram_reel(
Path("sample.mp4"),
Path("output/reel_ready.mp4"),
progress_callback=show_progress,
)
There is also a runnable example in examples/example_usage.py.
Convenience Helpers
make_4k_widescreen(...): crops to widescreen, enhances video, upscales to3840x2160, and improves audiomake_instagram_reel(...): reframes to a vertical1080x1920canvas, enhances audio/video, and applies Reel-friendly defaults
CLI
Split video
clipr split sample.mp4 --durations 30 60 90 --output-dir output --show-progress
Full single-video processing
clipr process sample.mp4 output/reel.mp4 \
--social-preset instagram_reel \
--start-time 5 \
--duration 20 \
--audio-denoise \
--show-progress
Batch processing
clipr batch sample_videos output/batch \
--social-preset whatsapp \
--duration 30 \
--show-progress
When --show-progress is enabled, CLIPR prints a live percentage bar in the terminal while ffmpeg is processing.
Social Presets
youtube: 1920x1080 landscape outputinstagram_reel: 1080x1920 portrait canvas that preserves the original frametiktok: 1080x1920 portrait canvas with preserved framing and audio denoisewhatsapp: lighter 720x1280 portrait canvas for sharingpresentation: 1920x1080 landscape output with slightly boosted audio
Example File To Test
After install, place a sample video as sample.mp4 in the project root and optionally add more videos in sample_videos/.
Run:
PYTHONPATH=src python3 examples/example_usage.py
Development
PYTHONPATH=src python3 -m unittest discover -s tests
Publishing
PyPI release settings live in publish.toml.
The repository includes .github/workflows/publish.yml, which builds and publishes the package to PyPI when you publish a GitHub Release.
Before the first release:
- Create the PyPI project
clipr-video. - Configure GitHub trusted publishing on PyPI for this repository.
- Push a git tag and publish a GitHub Release.
Metadata
Release files for clipr-video 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clipr_video-0.1.1.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clipr_video-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.2 kB
Release files / clipr_video-0.1.1.tar.gz
| Download URL | clipr_video-0.1.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feec277c359b28510c09b9e3beda8eee47fc81ff9347c0bbe33e3a8fda60466e
|
|
BLAKE2b-256 checksum How to use checksums |
8ce2ef4bdb35e874e8652dd5bf7550eb89f8283bfa3d3e529c8a484af14064f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 14, 2026.
Transparency logRelease files / clipr_video-0.1.1-py3-none-any.whl
| Download URL | clipr_video-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c78a05b69a23c6a34bc47ce33aecf2dac626e42b0e423af0b28c9d021f51bbb
|
|
BLAKE2b-256 checksum How to use checksums |
799529935f6c505737d18bebfe9db99341f9f47b45f322aba8a8be541ca2d9bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 14, 2026.
Transparency log