Skip to main content

VTKStreaming

This module provides classes to encode and stream frames from a VTK OpenGL render window using video codecs. It supports video encoding with VP9 (through libvpx) and H.264/H.265 through hardware encoders: NVENC on NVIDIA GPUs, and VideoToolbox on macOS (Apple Silicon and Intel).

Installation

VTKStreaming is available on PyPi on the following platforms:

  • Linux x86_64 for python 3.10 to 3.13 included.
  • Windows x86_64 for python 3.10 to 3.13 included.
  • MacOSX arm64 for python 3.10 to 3.13 included.

It is currently based on VTK 9.6.0.

pip install vtk-streaming

Building from source

There are two build flows:

  • Development build: an editable install into a local virtual environment, built without build isolation. Rebuilds are fast and the generated compile_commands.json stays valid, so clangd/IDE tooling works.
  • Release build: cibuildwheel produces the exact same distributable wheel as CI, in an isolated environment.

Requirements (both flows):

  • Linux: A C++ compiler (GCC 11.4+ or any other compiler supported by VTK.)
  • Windows: MSVC (Visual Studio Build Tools). (ensure visual studio environment is initialized)
  • macOS: Xcode command line tools. (xcode-select --install should have completed successfully)

We recommend uv; it reads the vtk-sdk package index from pyproject.toml, so no extra index flags are needed.

Development build

The editable install runs with --no-build-isolation, so the build requirements (scikit-build-core, vtk-sdk, vtk-sdk-python-wheel-helper) must be present in the environment first, the dev dependency group installs them along with the test dependencies.

Linux/macOS:

uv venv -p 3.13
. .venv/bin/activate
uv pip install --group dev
uv pip install -e . --no-build-isolation

Windows (open a PowerShell with MSVC initialized, e.g. Visual Studio Developer PowerShell):

uv venv -p 3.13
.venv\Scripts\Activate.ps1
uv pip install --group dev
uv pip install -e . --no-build-isolation

After changing C++ sources, rebuild by re-running the editable install:

uv pip install -e . --no-build-isolation

The CMake build tree persists under build/<wheel_tag>/, which keeps generated module headers on disk and compile_commands.json valid.

Run the tests with:

pytest tests/ -v

Release build (reproduce CI artifacts)

Wheels are built with cibuildwheel in an isolated environment; all configuration lives in [tool.cibuildwheel] in pyproject.toml.

Requirements:

  • Linux: Docker (the build runs in a manylinux container).
  • Windows: MSVC (Visual Studio Build Tools). (ensure visual studio environment is initialized)
  • macOS: Xcode command line tools. (xcode-select --install should have completed successfully)

Build a wheel for one Python/platform target:

# Linux
uvx cibuildwheel --only cp310-manylinux_x86_64

# Windows
uvx cibuildwheel --only cp310-win_amd64

# macOS
uvx cibuildwheel --only cp310-macosx_arm64

uvx comes with uv; alternatively pipx run cibuildwheel or if you use pip:

pip install cibuildwheel

# Linux
cibuildwheel --only cp310-manylinux_x86_64

# Windows
cibuildwheel --only cp310-win_amd64

# macOS
cibuildwheel --only cp310-macosx_arm64

Substitute cp310/cp311/cp312/cp313 to target other Python versions. The wheel is written to wheelhouse/ and can be installed directly:

pip install wheelhouse/vtk_streaming-*.whl

Examples

  1. examples/simple_encoder_decoder.py - Live VP9 encode/decode round-trip with two render windows side by side.
  2. examples/resize_encoder_decoder.py - VP9 encode/decode round-trip that survives window resizes.
  3. examples/simple_hardware_encoder_record.py - Record a render window for later playback using whichever hardware H.264 encoder vtkEncoderFactory selects (Apple VideoToolbox on macOS, NVENC on NVIDIA GPUs). This needs ffplay to playback the .h264 file.

Getting help

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.

vtk_streaming-0.4.0-cp313-cp313-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.13Windows x86-64

vtk_streaming-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

vtk_streaming-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

vtk_streaming-0.4.0-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

vtk_streaming-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

vtk_streaming-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vtk_streaming-0.4.0-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

vtk_streaming-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

vtk_streaming-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

vtk_streaming-0.4.0-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

vtk_streaming-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

vtk_streaming-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file vtk_streaming-0.4.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7c5aaf83d2943a5b29e58138abebbfa544b813b7725ad3059e1e0febde62059a
MD5 6dce9e2dbec46252e4fbe0e047c70687
BLAKE2b-256 70d82a247ebfa3a8e5824ed8c7eab508d66feb3e831b1d4dbf6eb846d1a1c3f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5caaec7cb5f57b494aa1b31320dbf163b9f92ee8263eeb2a3a9f1bf03b1b281a
MD5 f111b90be8113bcfb43a9615aa611a03
BLAKE2b-256 1dcacf1d997a6be79f17b1e47580e77bc2ac6a0bb32e0118fca6512dfc68eefa

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b126774dee323c3925a3ea49926c490bce078147be18ddda7fb52c1fc0921f7
MD5 95d9a7e712ba30e06c32f0b3f6481ee9
BLAKE2b-256 23d02b9660ef7b5dc094a00f4b89cb42e6dcea587949dffb36ee8f01167d0150

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f932a719f5caf3a7e306cdb5aceb14c0e18718d68859f6173f108a01fb808ec6
MD5 3e0907221505402c1a9e303024e05b1b
BLAKE2b-256 aa1f129ae7c6026f17392cb7b1a078e45ea915fcab153a3c1ae3b793ee20b5ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 35c3e03f0c0ed7ca724c6d8bb2fa70b454900abc457b86ed517322f9d04427ea
MD5 a8d55c72d57509c50cbb749e87919451
BLAKE2b-256 701b0344af82d0c64cb25dc39d24e695bdd2e431b298cc4d43704fdb59157baf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 925b3da4a321a2885e9e3ed2da555a9c7d46597c7d48b8ef99d03f62c63b4d13
MD5 e2f44bebbe0ba5113f5ea50c45c40366
BLAKE2b-256 67aa4818224e3bc9cf8e2225796d8b8608e9fff634973917832811c25afc2db4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2e8163470c0a8519c4891ba8a0c32eaef83d53a881788e7e471ba959928a0322
MD5 ac6481fe9c579eb054486bb169998323
BLAKE2b-256 ce2f24062c81c713b472829f3828240d55c0d716ed8a59d03499484ddd3d7b7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 afd1b3b13ef8b6d844c87c9b9ddb82f3064f07ca994c3b57588cf30351b04927
MD5 551058fa4f556591ed479f46418af41d
BLAKE2b-256 6ad16e8d27ed757d29be023685d309f3b3649cce8a7ed65e11fb9fe6b2043d74

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3ece8190c06a983cff390dc882d093fcd19ce652c4e9e2a847c6416729ff564
MD5 526bb210aaed0c491ccef035e2390a0f
BLAKE2b-256 4c8743799cc09687eda3868138fb5f7e2e2f7e408ec21e68d0c702f2c0f0a3b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a4bb80c7685e40bf6e550a9c92584bf27e20d3d0cf77c729206179f9ae0a3bbb
MD5 e6d65c3168d6a8cc679486bbef826952
BLAKE2b-256 9ad9e5724d9e8c161a24b565d78b3bf8d8cdb2da38be1a7a688fb8ba9dd6efbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18d647105131c81d39dd1af3c5c3850d6c73a0ad37c3b522497bf1a81f3da4c3
MD5 57f4358b6bddf6406775566f0aa2ff22
BLAKE2b-256 121bfd8fe01a1c881e017d2b3e44cab9df432b699c3e856b85bf2b8f0ec9e47d

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vtk_streaming-0.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vtk_streaming-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8ff8faa275a3fe0f6418fa917c4f0eaadcac65b8ddb185bdf23a5c75d3199de1
MD5 01ee49e4333c30bc6489cd4c6d853a59
BLAKE2b-256 a6a1c0d71b02cc6b3f82f66678a265503e0738df10138ca400762ac6a648e2f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vtk_streaming-0.4.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on Kitware/VTKStreaming

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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