Skip to main content

framepipe

Russian: README.ru.md | Русская документация

framepipe is a Python library for decoding and preparing video frames from files and network streams. It uses FFmpeg through a C++ binding and provides CPU arrays or supported GPU-backed frame objects.

Originally built for real-time ML/CV and edge inference, framepipe now also supports more general video pipelines. Its most developed usage pattern remains read-latest-drop: a background decoder publishes the newest frame without building up a queue for a slow consumer. For sequential file processing, use on_demand=True instead.

Documentation version: 0.4.2.dev4 (development). The Reader API and supported combinations may change. VAAPI has received the most attention in development and testing; D3D11VA is experimental and has barely been tested. Prebuilt wheels are currently planned for manylinux only.

What it provides

  • Decoding via HWAccel.SOFTWARE, CUDA, VAAPI, or experimental D3D11VA.
  • PostProcessor.CPU, CUDA, VAAPI, or OPENCL for supported conversion and resizing paths.
  • OutputFormat.BGR24, RGB24, GRAY8, or NATIVE, with MemoryType.CPU / GPU where supported.
  • NumPy arrays for packed CPU output; typed frame objects, DLPack, and native GPU handles on supported paths.
  • Latest-frame background reading and on-demand sequential file reading.

Support depends on the entire decoder -> postprocessor -> format -> memory combination, not just on individual enum values. See the compatibility matrix before selecting a GPU path.

Quick start

Package is available via PyPi

uv add framepipe
# or
pip install framepipe
# or you can download .whl from Releases page 

Sequential processing of a file with the default CPU/BGR output:

from framepipe import Reader

with Reader("video.mp4", name="demo", on_demand=True) as reader:
    while (image := reader.next()) is not None:
        print(image.shape)  # NumPy H x W x 3

For live inference, read_latest() waits for the newest available frame and does not build up an output queue:

from framepipe import Reader

with Reader("rtsp://camera.example/live", name="camera") as reader:
    while reader.is_opened():
        image = reader.read_latest(timeout=1.0)
        if image is not None:
            print(image.shape)

For GPU or NATIVE output, prefer the methods ending in _frame, such as read_latest_frame() and next_frame(). Details: reading models and Reader API.

Documentation

Topic Page
Overview and pipeline Architecture
Supported combinations Compatibility matrix
Decoding HWAccel backends
Conversion and resizing Postprocessors
Frame storage and access Memory types and frames
Format and color handling Pixel formats and color
read / read_new / read_latest / on_demand Reading models
Reader methods and options Reader API

This is a development snapshot, not a claim of universal hardware or codec compatibility. More formats, improved color handling, broader platform testing, and API refinements are planned.

Лицензия

Code is licensed under MPL 2.0 (see LICENSE).

Metadata

Release files for framepipe 0.4.3

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

Built distributions (wheels)

Table of built distributions (wheels) for framepipe 0.4.3
File Actions
framepipe-0.4.3-cp315-cp315-manylinux_2_34_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp315-cp315-manylinux_2_34_x86_64.whl
framepipe-0.4.3-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp314-cp314-manylinux_2_34_x86_64.whl
framepipe-0.4.3-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp313-cp313-manylinux_2_34_x86_64.whl
framepipe-0.4.3-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp312-cp312-manylinux_2_34_x86_64.whl
framepipe-0.4.3-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp311-cp311-manylinux_2_34_x86_64.whl
framepipe-0.4.3-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for framepipe-0.4.3-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 73.1 MB

Release files / framepipe-0.4.3-cp315-cp315-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp315-cp315-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.15 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
c0445d445b3ea36a0ee97bc4bade0e15018d2c1454b196d536a457ea7277ba93
BLAKE2b-256 checksum
How to use checksums
8f3b0ea7c3e315937846c29e5c554d2715fa78f13c20535c285a416ca329a758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / framepipe-0.4.3-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp314-cp314-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
358fab530397acf2acb8f5718e5e41aaf32cdda427345f9834dc47dfc3a4fbc7
BLAKE2b-256 checksum
How to use checksums
6be4ad6df333e4bb8d034a48cd09deb0130cac94e0b45ee5df37fbf3cce65bf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / framepipe-0.4.3-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp313-cp313-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
8c3993cdf876cb03fe8d726b1a0817c56cbbcddab601565cdeb317ba922911f2
BLAKE2b-256 checksum
How to use checksums
b0e397f9e0e2558d7b8f7e1ea68fabe22eadbae94cb9a2f9cedd108b62762404
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / framepipe-0.4.3-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp312-cp312-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
e0e5c09c1db5d38fb159dd8058a28ab1d7cdcc27fc6e1dedc01f1a50118d9920
BLAKE2b-256 checksum
How to use checksums
703184f71643989254b2de44039ae0d8495dd0368f1e5a7cbef64d2fe10265c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / framepipe-0.4.3-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp311-cp311-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
acedd2f58b7dc2f85e29ec82ef16baa18b383650a75be6650e75bd7f1c4a254a
BLAKE2b-256 checksum
How to use checksums
eda367144268345d82969a4e5cab721dea3bb17843c2fa4135eaa5245ebaebb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / framepipe-0.4.3-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL framepipe-0.4.3-cp310-cp310-manylinux_2_34_x86_64.whl
Size 12.2 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
538bfe87c20ed13d77ab9ffb78f61f92517f6070de76bcbf75110cb0aab025a1
BLAKE2b-256 checksum
How to use checksums
569076714482eb7b5f4ee6849532cfebd4173426937fcb87a1c0fa69c43ce8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for framepipe 0.4.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.4.3 This release

6 release files No provenance

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