angadsingh / argos

a spacial-temporal pattern detection system for home automation
135 stars 12 forks source link

RTSP Support #4

Closed edalquist closed 3 years ago

edalquist commented 3 years ago

Would it be possible to support RTSP cameras? Many wired/PoE cameras only support RTSP and not RTMP.

angadsingh commented 3 years ago

have you tried capturing an RTSP url with argos?

argos is using a multi-protocol API of OpenCV to capture video - cv2.VideoCapture: https://docs.opencv.org/3.4/d8/dfe/classcv_1_1VideoCapture.html#a949d90b766ba42a6a93fe23a67785951. So it should just work by providing an RTSP url, RTMP url, a video file and myriad other protocols (https://docs.opencv.org/3.4/d4/d15/group__videoio__flags__base.html#ga023786be1ee68a9105bf2e48c700294d)

edalquist commented 3 years ago

Just to confirm this does work. Example URL for a Hikvision camera:

rtmp_stream_url: "rtsp://USERNAME:PASSWORD@192.168.1.2/Streaming/Channels/101?transportmode=unicast&profile=Profile_1",