Skip to main content

OpenFilter Logo OpenFilter

PyPI version Python versions License: Apache 2.0 Build Status

OpenFilter is an open-source runtime and framework for building image and video processing pipelines out of small, composable components called filters. It handles the setup, serialization, and communication between filters — including frame synchronization, side-channel paths, load balancing, and telemetry — so you can focus on the processing itself, in plain Python.

A filter is a component that originates, processes, or exports a stream of frames and/or data. You chain filters into a pipeline (with many-to-many topologies), and the runtime keeps frames that enter together synchronized through to the output. Develop and test filters locally as ordinary Python processes, then ship each one as a Docker image.

Pipeline diagram: rendered on the GitHub README.

Homepage: openfilter.io · Package: PyPI · Images: Docker Hub

Jump to:


Features

  • Pluggable, reusable filters that you compose into pipelines
  • Develop and test filters locally, in pure Python
  • Automatic frame synchronization across many-to-many pipeline topologies
  • Built-in I/O and visualization filters (VideoIn/VideoOut, ImageIn/ImageOut, Webvis, REST, MQTTOut, Recorder)
  • Parallel processing via load-balanced filter branches and unsynchronized side-channel paths
  • Built-in observability: OpenTelemetry tracing, OpenLineage lineage events, and per-frame metrics

Requirements

  • Python 3.10 or newer (tested on 3.10, 3.11, 3.12, 3.13, and 3.14)

Installation

Install OpenFilter with all built-in utility-filter dependencies:

pip install openfilter[all]

Install directly from GitHub:

pip install "openfilter[all] @ git+https://github.com/PlainsightAI/openfilter.git@main"

Install a specific version:

pip install "openfilter[all] @ git+https://github.com/PlainsightAI/openfilter.git@v1.4.0"

Editable install for development:

git clone https://github.com/PlainsightAI/openfilter.git
cd openfilter
make install

Run a published Docker image

Each built-in filter is also published as a Docker image (see Built-in filters):

docker run -e FILTER_SOURCES="file:///video.mp4!loop" \
           -e FILTER_OUTPUTS="tcp://*:5550" \
           -v ./video.mp4:/video.mp4:ro \
           plainsightai/openfilter-video-in:latest

Quick Start

Here is a minimal example that plays a video and visualizes it in the browser:

from openfilter.filter_runtime.filter import Filter
from openfilter.filter_runtime.filters.video_in import VideoIn
from openfilter.filter_runtime.filters.webvis import Webvis

if __name__ == '__main__':
    Filter.run_multi([
        (VideoIn, dict(sources='file://video.mp4', outputs='tcp://*')),
        (Webvis,  dict(sources='tcp://localhost')),
    ])

Run it with:

python script.py

Then open http://localhost:8000 to see your video stream.

Alternatively, use the CLI:

openfilter run - VideoIn --sources 'file://video.mp4!loop' - Webvis

These examples expect a video.mp4 in the current directory. A sample video ships with the repository at examples/hello-world/example_video.mp4 — copy it to video.mp4, or point --sources at that path.


Built-in filters

OpenFilter ships a set of ready-to-use filters. Run openfilter info <Filter> for a filter's configuration options.

Filter Purpose Reference
VideoIn Read video from files, URLs, or streams docs
VideoOut Write frames to a video file docs
ImageIn Read images from local paths, S3, or GCS docs
ImageOut Write frames as image files docs
Webvis View a pipeline live in the browser docs
REST Expose pipeline data over an HTTP endpoint docs
MQTTOut Publish frames and data to an MQTT broker docs
Recorder Record pipeline frame data to disk (JSON/CSV) docs
Util Diagnostic and utility helpers docs

Each I/O filter is also published as a Docker image at plainsightai/openfilter-<name> (multi-arch amd64 + arm64), tagged with both the version (for example 1.4.0) and latest. Each installs openfilter[extra]=={version} from PyPI:

Image Filter Extra
plainsightai/openfilter-video-in VideoIn video_in
plainsightai/openfilter-video-out VideoOut video_out
plainsightai/openfilter-image-in ImageIn image_in
plainsightai/openfilter-image-out ImageOut image_out
plainsightai/openfilter-mqtt-out MQTTOut mqtt_out
plainsightai/openfilter-recorder Recorder recorder
plainsightai/openfilter-rest REST rest
plainsightai/openfilter-webvis Webvis webvis

Examples

Explore real-world examples covering:

  • Frame-by-frame video processing
  • Writing frames to JPEG or output video
  • Dual-video pipelines with multiple topics
  • Load balancing using multiple filter processes
  • Publishing data over MQTT
  • Ephemeral side-channel processing
  • S3 integration for cloud video processing
  • Fully declarative and class-based configuration

Runnable demos live in the examples/ directory, and every topic above is walked through in the Overview.


Documentation


Telemetry & privacy

When a filter starts, OpenFilter emits a single anonymous usage-analytics event — the filter's class name — via Scarf, which helps the maintainers understand adoption. Beyond that class name, OpenFilter sends no frame data, pipeline configuration, or personal information. Opt out at any time by setting an environment variable:

export DO_NOT_TRACK=true

Ecosystem

OpenFilter is the open-source runtime and filter framework, released under Apache 2.0. Related projects:

Plainsight (plainsight.ai) offers a commercial managed platform built on OpenFilter for teams that want hosted deployment and support.


Contributing

We welcome contributions of all kinds — new filters, bug fixes, or documentation improvements.

See the contributing guide for development setup, coding conventions, DCO sign-off, and the release process. If you run into a problem, open an issue.


License

Apache License 2.0. See LICENSE for the full text.

Metadata

Release files for openfilter 1.4.0

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

Built distribution (wheel)

Table of built distributions (wheels) for openfilter 1.4.0
File Interpreter ABI Platform
openfilter-1.4.0-py3-none-any.whl Python 3 none any Details

Release files / openfilter-1.4.0-py3-none-any.whl

Download URL openfilter-1.4.0-py3-none-any.whl
Size 219.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c5c36f922d7668b5f4cf3b5061ebbd4d4d60636aac5b5a427d107b994f2353e
BLAKE2b-256 checksum
How to use checksums
6fa84456b0c0e9a299e7d11428735f89cefb6519243b15a9a08a66abad0a8c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

1.5.1

1 release file

1.5.0

1 release file

This release

1.4.0 This release

1 release file

1.3.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.2.1

1 release file

0.1.30

1 release file

0.1.29

1 release file

0.1.28

1 release file

0.1.27

1 release file

0.1.26

1 release file

0.1.25

1 release file

0.1.24

1 release file

0.1.23

1 release file

0.1.22

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.5

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

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