Search code examples
pythonpython-3.xprotocolswebcamrtsp

Python RTSP server for a webcams


i need to build a rtsp server for the webcam using python3. Does anybody created and rtsp python server for web cams? Which libraries you used for rtsp server?


Solution

  • Can you use any of existing services like iSpy, ZoneMinder or Shinobi?

    If you want to stick with python, the OpenCV library can easily handle rtsp stuff. (But you need to explain a bit more, what you need to achieve) Here is a simple OpenCV snippet to view an rtsp stream:

    import cv2
    
    video = cv2.VideoCapture("<rtsp stream link>")
    while True:
        ret, frame = video.read()
        cv2.imshow('VIDEO', frame)
        cv2.waitKey(20)