Reading from IP Camera RTSP Streams

What I want to do

I want to have a security camera system implemented in Rust. My program should be able to read from multiple RTSP URIs and perform machine learning on the stream to detect faces, license plates, etc.

My questions

First off, I have no knowledge of RTSP, RTP, nor any form of media format or how to consume them. I've been trying to read about them to learn but I haven't made much progress.

  1. What would be some good crates to look at to read from an RTSP stream? I've mostly been looking at gstreamer-rtsp, gstreamer-rtp, ffmpeg and ffmpeg-next.
  2. Are there any good examples on GitHub or some blog post that show how to read data from an RTSP stream?

I saw that there were other posts about this but I never saw anything that fully answered my question.

I'm also working on a Rust security camera system, Moonfire NVR. Currently it uses ffmpeg via my own wrapper. Eventually I'd like to use a pure-Rust RTSP client. This one seems most promising but needs RTSP 1.0 support.

Let me know if you'd like to work together! Moonfire NVR doesn't have analytics support (other than some experimental code) but I'd like to change that.

1 Like