Skip to main content

cvf_runtime

Console Video File runtime — play .cvf files in the terminal.

cvf_runtime reads a .cvf file and plays it frame-by-frame in the terminal. No keybinds, no editing, no interface. Just playback.

Install

pip install cvf_runtime

Installs cuifw automatically (required for rendering).

Usage

Python

import cvf_runtime

cvf_runtime.execute("movie.cvf")

With parameters

cvf_runtime.execute("movie.cvf", loop=True)
cvf_runtime.execute("movie.cvf", speed=2.0)
cvf_runtime.execute("movie.cvf", fps=30)
cvf_runtime.execute("movie.cvf", start=100, end=200)

In the background

import cvf_runtime
import time

handle = cvf_runtime.execute_async("movie.cvf", loop=True)
time.sleep(5)
handle.stop()

API

cvf_runtime.execute(path, loop=False, speed=1.0, fps=None, start=0, end=None)

Play a .cvf file in the terminal. Blocks until finished.

Argument Type Description
path str .cvf file
loop bool Loop forever
speed float Playback speed multiplier
fps int Override fps from file
start int First frame index
end int Last frame index (exclusive)

Returns the number of frames shown.

cvf_runtime.execute_async(path, loop=False, speed=1.0, fps=None, start=0, end=None)

Start a .cvf player in a background Python process.

Returns a handle with:

  • handle.is_playing() — True if still running
  • handle.stop() — graceful stop
  • handle.kill() — force kill
  • handle.wait() — block until done

cvf_runtime.Runtime(path, loop=False, speed=1.0, fps_override=None, start=0, end=None)

Low-level player class.

Methods:

  • run() — play, returns frames shown
  • info() — dict with metadata

Info about a file

import cvf_runtime

r = cvf_runtime.Runtime("movie.cvf")
info = r.info()

print(info["width"], "x", info["height"])
print(info["fps"])
print(info["frames"])
print(info["duration"])
print(info["color_mode"])

Requirements

  • Python 3.7+
  • cuifw (installed automatically)
  • Terminal with UTF-8 support

Supported platforms

Platform Status
Linux ✅
macOS ✅
Windows (Terminal) ✅
Termux ✅
Pydroid 3 ❌ (no ANSI rendering)

Difference from cvf

cvf cvf_runtime
Create video ✅ ❌
Edit video ✅ ❌
Interactive player ✅ ❌
Keybinds ✅ ❌
Background play ⚠️ ✅
Size ~30 KB ~6 KB
Purpose Tool Runtime

cvf — full library for creating and editing .cvf files. cvf_runtime — minimal runtime for playing .cvf files.

License

MIT — see LICENSE.

Author

Suleiman

Changelog

1.0.3

  • Initial release
  • execute() — synchronous playback
  • execute_async() — background playback
  • Runtime — low-level player
  • info() — file metadata
  • Grayscale and TrueColor support

Metadata

Release files for cvf-runtime 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvf-runtime 1.0.5
File Size Uploaded
cvf_runtime-1.0.5.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cvf-runtime 1.0.5
File Interpreter ABI Platform
cvf_runtime-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / cvf_runtime-1.0.5.tar.gz

Download URL cvf_runtime-1.0.5.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8027caf2d543b587274b69e4f590a7d21eddcacc337d47296d5705250a70e87b
BLAKE2b-256 checksum
How to use checksums
ed4b800171fe1ed7d511d13551ef718100f626aeb63aaaba4a905fb7b82909e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / cvf_runtime-1.0.5-py3-none-any.whl

Download URL cvf_runtime-1.0.5-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
670f0ad1d4ccb2f2cd71ba7c70e531f2085954d5336110a9e99618d125826f52
BLAKE2b-256 checksum
How to use checksums
2ed2c85ea23fb929e151e620056931a415179ed4ce406c83710514cb4d57728c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page