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, and 3.13)

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.1.2"

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.1.2) 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.

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 Distribution

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

openfilter-1.2.1-py3-none-any.whl (207.6 kB view details)

Uploaded Python 3

File details

Details for the file openfilter-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: openfilter-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 207.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for openfilter-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fe428b19111922389778461474dcbffc09a184c8bfe06cc545dd909366f773a
MD5 c63996cd03ecd908b016035060639f60
BLAKE2b-256 e3c781d9e4c27107609df39bd0a93d7a84ab30e6fdce7d8fbba77517910cb44e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.0

1 file

1.2.2

1 file

This release

1.2.1 This release

1 file

1.2.0

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.0

1 file

0.2.1

1 file

0.1.30

1 file

0.1.29

1 file

0.1.28

1 file

0.1.27

1 file

0.1.26

1 file

0.1.25

1 file

0.1.24

1 file

0.1.23

1 file

0.1.22

1 file

0.1.21

1 file

0.1.20

1 file

0.1.19

1 file

0.1.18

1 file

0.1.17

1 file

0.1.16

1 file

0.1.15

1 file

0.1.14

1 file

0.1.10

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.5

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

Supported by

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