twat-video
twat-video is the video domain plugin for the twat ecosystem. It provides reusable, testable ffmpeg command wrappers and a thin adapter layer for AI video generation via twat_genai.
Requirements
- Python 3.10+
ffmpegandffprobeonPATHfor real media processing
Tests exercise command construction with dry_run=True and do not require media binaries.
Installation
pip install twat-video
Python API
from twat_video import (
crop_scale, change_fps, split_segment, reverse_video,
merge_by_gap, import_audio, extract_subtitles, repair_srt_text,
add_grain, add_reverb, ken_burns, probe_video, VideoClip,
)
# Crop and scale in one pass
crop_scale("input.mp4", "square.mp4", crop="1080:1080:420:0", scale="720:720")
# Extract a segment without re-encoding
split_segment("input.mp4", "clip.mp4", start=12.5, duration=4.0)
# Replace audio track
import_audio("silent.mp4", "voice.wav", "dubbed.mp4")
All functions accept dry_run=True — returns a CommandResult with the constructed command without invoking ffmpeg.
CLI
python -m twat_video --help
python -m twat_video crop-scale in.mp4 out.mp4 --crop 1080:1080:420:0 --dry-run
python -m twat_video fps in.mp4 out.mp4 24 --dry-run
python -m twat_video split in.mp4 clip.mp4 --start 1.5 --duration 3 --dry-run
python -m twat_video import-audio silent.mp4 voice.wav dubbed.mp4 --dry-run
python -m twat_video ken-burns still.png out.mp4 --duration 5 --dry-run
python -m twat_video probe video.mp4
Available subcommands: version, crop-scale, fps, split, reverse, import-audio, extract-subtitles, ken-burns, grain, reverb, concat, probe, genai.
AI video boundary
generate_video() imports twat_genai at runtime and delegates to its video generation API — no provider SDKs are bundled. Install twat-genai and configure a provider separately.
twat plugin registration
Registered under the video key in the twat.plugins entry-point group.
License
MIT
Metadata
Release files for twat-video 2.7.8
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 |
|---|---|---|---|---|
| twat_video-2.7.8.tar.gz | 1.1 MB | With provenance | Details for twat_video-2.7.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| twat_video-2.7.8-py3-none-any.whl | Python 3 | none | any | Details for twat_video-2.7.8-py3-none-any.whl |
Total release size: 1.1 MB
Release files / twat_video-2.7.8.tar.gz
| Download URL | twat_video-2.7.8.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a5fc95546c0b8d9f62847774bcd477375c0a9649f0d1e5b31f3ba27ab2d53d8
|
|
BLAKE2b-256 checksum How to use checksums |
93150bcdcdf9f83edb4fd75bc5fd0109464e4a066b09e0497d8f337388960bc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logRelease files / twat_video-2.7.8-py3-none-any.whl
| Download URL | twat_video-2.7.8-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7b91bb2c08dd7ac07aa8aa9590ac8cc2f98bc688c639156f171da95d66c6c04
|
|
BLAKE2b-256 checksum How to use checksums |
b4938346c9e66c2fe2bfdab2f5241796b880bdf35a72acbb249be68bc65bfeae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logSecurity for twat-video 2.7.8
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for twat_video-2.7.8.tar.gz
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 Nov 18, 2026.
Transparency logA 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.