3

Im using python and opencv to open a rtsp url (from camera ip). And get this error:

    [rtsp @ 000002a9841927c0] Nonmatching transport in server reply
    warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:901)
    warning: rtsp://admin:Abc12345@192.168.x.x:554/onvif1 (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:902)

I've already tried this https://stackoverflow.com/a/51486322/11220956, but it's still not working. The rtsp url work well when I use VLC to stream.

Here is some code

capture = cv2.VideoCapture('rtsp://admin:Abc12345@192.168.x.x:554/onvif1')
if capture.isOpened():
    while (True):
        ret, frame = capture.read()
        cv2.imshow('frame', frame)

        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

Rin Nguyen
  • 405
  • 4
  • 11

0 Answers0