blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.12k stars 1.65k forks source link

Support SRT Stream #2818

Open G2G2G2G opened 2 years ago

G2G2G2G commented 2 years ago

Someone said this, but closed it: https://github.com/blakeblackshear/frigate/issues/2736

Info: https://www.haivision.com/blog/all/rtmp-vs-srt/ https://restream.io/blog/streaming-protocols/ how to: https://stackoverflow.com/questions/62977448/minimal-srt-stream-example-with-ffmpeg

I do not know of any existing cons of SRT, so supporting it would make sense.

If allowed in the config to set srt://x.x.x.x instead of rtmp:// that's pretty much all we'd need from the looks of it.

yury-sannikov commented 2 years ago

In theory, you could try:

camera_name:
  gstreamer:
    inputs:
      - path: srtsrc uri="srt://127.0.0.1:7001" latency=0 name=rtp_stream
        roles:
          - detect
  detect:
    width: 1920
    height: 1080

Though you have to build this branch manually for your platform.

more info: https://gstreamer.freedesktop.org/documentation/srt/srtsrc.html?gi-language=c#srtsrc-page

blakeblackshear commented 2 years ago

I am sure they exist, but I personally have not seen cameras that support srt yet. Which cameras do you know of that support srt?

G2G2G2G commented 2 years ago

This is vs RTMP as in the first post, which is for output from frigate, to view on other systems instead of RTMP? ffmpeg supports SRT fine

frigate is taking RTSP, not RTMP as input... converts to RTMP (and can convert to SRT too, is what I am asking)

blakeblackshear commented 2 years ago

Got it.