Ask Your Question

Revision history [back]

method SETUP failed: 459 Client error

Hello, I am trying to capture a stream from a device in my local network using RTSP and python-opencv. When opening the stream in VLC, everything is working good. However, when I run the following script I get the 459 Client Error.

import cv2
import numpy as np
import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;udp"
vcap = cv2.VideoCapture("rtsp://devscopejetnano-desktop:5050/stream", cv2.CAP_FFMPEG)
print(vcap.isOpened())  
while(1):
    ret, frame = vcap.read()
    if ret == False:
        print("Frame is empty")
        break
    else:
        cv2.imshow('VIDEO', frame)
        cv2.waitKey(1)

I did not find information regarding this error.

Any idea what is going wrong?

Thank you