A small Rust/GStreamer streamer for Owncast. It keeps one RTMP connection open while switching between a generated lobby and queued videos.
- 1920x1080 H.264 video at 30 fps
- AAC audio with an 80 Hz high-pass filter and dynamic compression
- Preferred English audio
- Embedded non-SDH English subtitles, with external subtitles used only as a fallback
- Continuous lobby and playlist handoffs without reconnecting viewers
- Persistent editable playlist with automatic track advancement
- Repeatable startup queue entries and an in-terminal file chooser
- Previous and next track controls
- Pause with a frozen movie frame and silence while the RTMP stream stays live
- 30-second forward and backward seeking
- Amber projection-console TUI with playback status, gain, and stereo peak meters
- Owncast title updates through a native Rust HTTP client
- Clean lifecycle messages
- Rust 1.92 or newer
- GStreamer 1.28 development files
- GStreamer base, good, bad, ugly, and libav plugins
- Owncast reachable over RTMP and its integration API
The stream key and title integration token are read from:
/opt/owncast/stream-key
/opt/owncast/title-token
cargo build --release --locked
sudo install -m 0755 target/release/owncast-stream /usr/local/bin/owncast-streamowncast-stream [OPTIONS] VIDEO [SUBTITLES] [TITLE]
owncast-stream movie-one.mkv --queue movie-two.mkv --queue movie-three.mkvBy default, the streamer publishes to the local Owncast instance and reads its credentials from the files listed above. To publish to a remote instance, provide its RTMP publish URL, stream-title integration endpoint, and credentials:
owncast-stream \
--rtmp-url rtmp://owncast.example/live \
--api-url https://owncast.example/api/integrations/streamtitle \
--stream-key "$STREAM_KEY" \
--api-key "$TITLE_TOKEN" \
movie.mkvThe RTMP URL should omit the stream key; owncast-stream appends the value of
--stream-key. All four options may also be used independently, so a remote
server can still use credentials read from the default files.
The external subtitle file is used only when the video has no non-SDH embedded English subtitle stream.
Controls:
- Enter starts the first pending track from the lobby.
- Space pauses or resumes playback.
- Left and Right seek backward or forward 30 seconds.
- Up and Down adjust gain by 1 dB from -12 dB to +12 dB.
pandnrestart the previous or next track.aopens the file chooser; use Up/Down, Enter, Backspace, and Esc to browse.- Tab focuses playlist editing. Shift+Up/Down moves an unlocked entry, and
Delete or
dremoves it. qor Ctrl-C quits.
The playing row is locked while other entries can be reordered or removed. Tracks advance automatically. When the last track ends, the streamer returns to the lobby and keeps the Owncast connection and TUI alive; adding another video makes it available to start from the lobby.
The stereo VU meter shows the post-gain signal from -60 dB to 0 dB. Peak markers hold for 3 seconds, then decay at 12 dB per second.
When TITLE is omitted, the title comes from embedded media metadata, then a
cleaned filename from torrent-name-parser, then the raw filename stem.
cargo test
cargo clippy --all-targets -- -D warnings