High-level RTSP multimedia streaming library, in Rust
See the codeHigh-level RTSP multimedia streaming library, in Rust. Good support for ONVIF RTSP/1.0 IP surveillance cameras, as needed by Moonfire NVR. Works around brokenness in cheap closed-source cameras.
Status: In production use in Moonfire NVR. Many missing features.
Progress:
Help welcome!
Try the mp4 example. It streams from an RTSP server to a .mp4 file until
you hit ctrl-C.
$ cargo run --package client mp4 -- --url rtsp://ip.address.goes.here/ --username admin --password test out.mp4
...
^C
$ cargo run --package client <CMD>
Where CMD:
The client also respects the common RUST_LOG environment variable:
RUST_LOG=client=debug,retina=debug,info will enable debug logging for the
client and retina crates, leaving other Rust crates at info level.
This allows viewing a H.264 video stream from your browser, with the help of
webrtc-rs.
$ cargo run --package webrtc-proxy -- --help
This decodes video from an RTSP source into raw video frames in PPM format
using the ffmpeg-next crate.
This builds on the whole Rust ecosystem. A couple folks have been especially helpful:
sdp-typesh264-readerIt's a working name. Other ideas welcome. I started by looking at dictionary words with the letters R, T, S, and P in order and picking out ones related to video:
$ egrep '^r.*t.*s.*p' /usr/share/dict/words' | |
|---|---|
| retinoscope | close but too long, thus retina |
| retrospect | good name for an NVR, but I already picked Moonfire |
| rotascope | misspelling of "rotascope" (animation tool) or archaic name for "gyroscope"? |
Your choice of MIT or Apache; see LICENSE-MIT.txt or LICENSE-APACHE, respectively.
Rust
100.0%
High-level RTSP multimedia streaming library, in Rust
See the codeHigh-level RTSP multimedia streaming library, in Rust. Good support for ONVIF RTSP/1.0 IP surveillance cameras, as needed by Moonfire NVR. Works around brokenness in cheap closed-source cameras.
Status: In production use in Moonfire NVR. Many missing features.
Progress:
Help welcome!
Try the mp4 example. It streams from an RTSP server to a .mp4 file until
you hit ctrl-C.
$ cargo run --package client mp4 -- --url rtsp://ip.address.goes.here/ --username admin --password test out.mp4
...
^C
$ cargo run --package client <CMD>
Where CMD:
The client also respects the common RUST_LOG environment variable:
RUST_LOG=client=debug,retina=debug,info will enable debug logging for the
client and retina crates, leaving other Rust crates at info level.
This allows viewing a H.264 video stream from your browser, with the help of
webrtc-rs.
$ cargo run --package webrtc-proxy -- --help
This decodes video from an RTSP source into raw video frames in PPM format
using the ffmpeg-next crate.
This builds on the whole Rust ecosystem. A couple folks have been especially helpful:
sdp-typesh264-readerIt's a working name. Other ideas welcome. I started by looking at dictionary words with the letters R, T, S, and P in order and picking out ones related to video:
$ egrep '^r.*t.*s.*p' /usr/share/dict/words' | |
|---|---|
| retinoscope | close but too long, thus retina |
| retrospect | good name for an NVR, but I already picked Moonfire |
| rotascope | misspelling of "rotascope" (animation tool) or archaic name for "gyroscope"? |
Your choice of MIT or Apache; see LICENSE-MIT.txt or LICENSE-APACHE, respectively.
Rust
100.0%