Skip to main content

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:

  1. Converting video frames into high-fidelity ASCII/Half-block characters.
  2. Using a custom LZDX format (Delta-XOR + Zlib) to send only the changes between frames.
  3. 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.py example 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 .lzdx format isn't just a video; it's a bit-perfect reconstruction of your terminal pixels. Great for logging training sessions.
  • Fourier Sharpening: Use the sharpen parameter 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

termvis-0.1.3-cp38-abi3-win_amd64.whl (210.7 kB view details)

Uploaded CPython 3.8+Windows x86-64

termvis-0.1.3-cp38-abi3-manylinux_2_28_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ x86-64

termvis-0.1.3-cp38-abi3-macosx_11_0_arm64.whl (329.2 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file termvis-0.1.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: termvis-0.1.3-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 210.7 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for termvis-0.1.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cb7e4ce8f09895941ab8d80e63fb86e4a2a834d59fed4c0b4eb305e5e3108cb3
MD5 2bb2fc9dcfa8fac3cb39c9fe8f2eca03
BLAKE2b-256 a2a248fb53dd0704df90400c439cc8d3623cfbe755e83f2c36cfc50c7a2e3b0d

See more details on using hashes here.

File details

Details for the file termvis-0.1.3-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for termvis-0.1.3-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2947381884c0165b7ba2b14307ac28f6a5b0bd0e34e1ffdcd5c168a483c0b48f
MD5 028b61205b1cf0a9eba3418c2e30918c
BLAKE2b-256 e3b8dd6cc2914383050f381e372fcfc674ead13fee948f37f41914233a5ad655

See more details on using hashes here.

File details

Details for the file termvis-0.1.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for termvis-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6bb1356b337ee20a0770d7e1e9a7e8542ba8b5949cf47098d855e6a9f70cf6ed
MD5 a5062d047f7a20201f37e77c40e67470
BLAKE2b-256 08cd9630766ccb4e60d5f668e198d6f787ef6098756e5ea3d0a97f093a80865a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page