High-performance terminal video visualization and recording library.
Project description
TermVis
Watch video streams and monitor your CV models directly over SSH.
High-performance terminal rendering with lossless incremental compression and frequency-domain sharpening. Built with Rust and OpenCV.
Why?
You're working on a remote GPU server via SSH. You have no X11 forwarding, no GUI, and no way to see what your computer vision model is actually looking at. Downloading frames one by one is slow, and streaming high-res video is impossible over a laggy connection.
TermVis solves this by:
- Converting video frames into high-fidelity ASCII/Half-block characters.
- Using a custom LZDX format (Delta-XOR + Zlib) to send only the changes between frames.
- Applying DFT (Fourier) sharpening on the fly so you can actually see details in a 80x24 terminal.
Quick Start
# Get the core engine
pip install maturin
maturin develop --release
# Run a quick camera test
python -c "import termvis; termvis.quick_play(0)"
Key Capabilities
- Headless Remote Desktop: Run the
remote_desktop.pyexample to mirror your physical display into your SSH session. It supports mouse mapping, so clicking in your terminal actually clicks on the remote machine. - Lossless Recording: The
.lzdxformat isn't just a video; it's a bit-perfect reconstruction of your terminal pixels. Great for logging training sessions. - Fourier Sharpening: Use the
sharpenparameter during playback to boost high-frequency details. It makes text and edges pop in terminal resolutions. - Mouse-to-Pixel Mapping: Precise coordinate transformation that lets you build interactive terminal UIs.
Examples
Check the examples/ directory:
basic_demo.py: The "Hello World" of terminal rendering.interactive_painter.py: Test your mouse mapping by drawing on a 1080p canvas using terminal clicks.remote_desktop.py: Control your desktop from a terminal.
Technical Deep Dive
- Rendering: Uses 24-bit ANSI escape codes and the Half-Block (
▀) character to effectively double the vertical resolution. - Compression: Instead of standard video codecs, we XOR consecutive frames and Zlib the result. Since terminal backgrounds are often static, this hits massive compression ratios while remaining CPU efficient.
- Engine: The sampling and bit-mangling are handled by a dedicated Rust crate linked via PyO3.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termvis-0.1.5-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: termvis-0.1.5-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 234.0 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84165f4eb14a87bc03f0eedda1bc63c57e2c88b0f83e33e2db06c2059545171b
|
|
| MD5 |
d47dd7a8caf62f453a8f0bf11409b6a8
|
|
| BLAKE2b-256 |
894439e59d0b10200bd6403651d5318020ef1cd099aac6e996f79eb5fe917e2f
|
File details
Details for the file termvis-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: termvis-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a70d1c3e42150bb1d5bafac8a0d1c447a4b12562ad2c9cfa5a3da79bae9593e
|
|
| MD5 |
253a46200b2effeead0ae94a0f8c7c35
|
|
| BLAKE2b-256 |
0094edbac14f03d696ca41f532dda32b3ea752e15c26689f584181f76daca9dc
|
File details
Details for the file termvis-0.1.5-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: termvis-0.1.5-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 362.7 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3222defb1de570a4b99bcf238cdb92d88fdbe4885cebe693730bab72f400d1ea
|
|
| MD5 |
37108dfbc4ee2cdbc521e039c6c28ffb
|
|
| BLAKE2b-256 |
e97dc44dfda68ef2f4c127306c2f62b67410c619a323b23bd213ff29b4c83eee
|