Skip to content

Video Streaming Application

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mnit-rtmc/streambed

Repository files navigation

Streambed

Streambed is a real-time streaming service for video surveillance. It handles multiple flows of video, which can be controlled from a separate system using a simple network protocol.

Each flow has a source, which can be RTSP, RTP or HTTP. The flow can optionally be transcoded or have a text overlay applied, then sent to a sink. Typically, RTP on a UDP multicast address is used, to allow many clients to view the video.

Building

Streambed is written in Rust (1.40+), and depends on GStreamer (1.16+).

cargo build --release

The resulting file will be located at ./target/release/streambed

Configuration

The streambed configuration file streambed.muon is in MuON format. On Linux, it is located in the ~/.config/streambed/ directory.

Use streambed --help for instructions on how to configure the service.

Control Protocol

If control-port is specified, streambed listens for connections on that TCP port. No more than a single connection is accepted at a time.

A message consists of a command, followed by any number of parameters, ending with an ASCII group separator U+001D. Each parameter begins with a record separator U+001E followed by the parameter name, a unit separator U+001F, then the value.

Any parameter not specified in a message is left unchanged.

When an IN message is received, it is acknowledged with an OUT response containing the command and no parameters.

Config (IN)

A config message sets global values.

Parameter Description
acceleration Video acceleration method: NONE, VAAPI, or OMX
flows Total number of flows: 0 to 255
grid Flows in window grid: 0 to 16

Flow (IN)

A flow message sets values for one flow.

Parameter Description
number 0 to flows minus one
location source location URI
rtsp-transport ANY, UDP, MCAST, TCP (use TCP when packet loss is high)
source-encoding PNG, MJPEG, MPEG2, MPEG4, H264, VP8, VP9
timeout source timeout in seconds
latency buffering latency in milliseconds
overlay-text overlay text
address sink UDP address
port sink UDP port
sink-encoding only set if different than source-encoding
title-bar HIDE or SHOW
title-accent title bar accent color (rgb hex: 000000 -> black)
font-size title bar font size (pt)
monitor-id title bar monitor ID
camera-id title bar camera ID
title-text title bar text
title-extra title bar extra text
aspect-ratio FILL or PRESERVE
matrix-width 1 to 8
matrix-x 0 to matrix-width minus one
matrix-height 1 to 8
matrix-Y 0 to matrix-height minus one
matrix-hgap 0 to 10000 (hundredths of percent of window)
matrix-vgap 0 to 10000 (hundredths of percent of window)

Status (OUT)

A status message is sent on each flow state change or statistics update.

Parameter Description
number 0 to flows minus one
location source location URI
state STARTING, PLAYING, FAILED
pushed pushed packet count
lost lost packet count
late late packet count

About

Video Streaming Application

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages