Skip to content

Streaming for Python

RTSP, made easy.

Read from a camera, webcam, file, or NumPy frames. Transform video in Python, then publish it locally, across your LAN, or to an existing server.

Python 3.10+  ·  Windows, macOS, and Linux

Quick start Python
uv add easy-rtsp
from easy_rtsp import Stream

stream = Stream.from_webcam(
    0,
    lan_access=True,
).serve("live")

print(stream.lan_viewer_urls)
stream.wait()

One small API

From source to stream

The media plumbing stays out of your application. You choose the input, add the Python you need, and decide where the result should go.

01

Open

RTSP cameras, webcams, video files, or your own BGR NumPy frames.

02

Transform

Chain clear, synchronous frame callbacks with map() when Python owns the processing.

03

Publish

Serve locally, expose a copy-ready LAN URL, relay to RTSP, or publish SRT.

Use the interface you want

CLI or Python

Start a reachable webcam stream from a shell:

easy-rtsp webcam 0 --serve live --lan

Or build a processing pipeline in Python:

Stream.open(camera_url).map(detect).serve("annotated").wait()

Read the getting-started guide →

Built for edge computer vision

A clean handoff to native tools

Keep lightweight transforms in Python, or use RTSP as the boundary to an accelerated media and inference stack.

Small by design. NumPy is the only required Python runtime dependency. FFmpeg performs the media work; MediaMTX is optional and managed for you when you need a local or LAN RTSP server.

See dependencies