Problem with opencv on linux

Asked

Viewed 38 times

1

I’m making a monitoring system with Opencv Python via streaming on my Windos 10 OS runs all correctly by irony on my Linux Mate I get the following error message when I try to run

Nonmatching transport in server reply

follows my code:

import cv2

cap = cv2.VideoCapture("rtsp://192.168.25.179:554/onvif1")

while(cap.isOpened()):
    ret, frame = cap.read()
    #print(frame)
    cv2.imshow('frame', frame)
    if cv2.waitKey(20) & 0xFF == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()
  • And does your Linux have access to rtsp’s network? (access to the IP and port you pointed out)

  • There is another process accessing rtsp at the moment in linux?

1 answer

1

happened to me. it has to do with system variables.

you can start like this:

import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;udp"

cap = cv2.VideoCapture("rtsp://192.168.25.179:554/onvif1", cv2.CAP_FFMPEG)

I advise you to install the full package of v4l2 on linux usually tbm resolves.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.