Hello,
I am writing a code to read frames from an IP camera using OpenCV in a Jetson Nano Device with L4T R32.7.1 and JetPack 4.6.1. The version of OpenCV is 4.3.0 with Python3.6.9
The code of example that i am using is the following:
import cv2
input_URI = "rtsp://user:psw@IP_address:88/videoMain"
camera = cv2.VideoCapture(input_URI)
while camera.isOpened():
ret, frame = camera.read()
frame_rgba = cv2.cvtColor(frame, cv2.COLOR_BGR2RGBA)
print(frame_rgba)
However, i get the following error.
[ WARN:0] global /tmp/pip-install-acvfpz_0/opencv-python_7732674b1cb7471d8a299216848188a1/opencv/modules/videoio/src/cap_gstreamer.cpp (1759) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Unauthorized
[ WARN:0] global /tmp/pip-install-acvfpz_0/opencv-python_7732674b1cb7471d8a299216848188a1/opencv/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /tmp/pip-install-acvfpz_0/opencv-python_7732674b1cb7471d8a299216848188a1/opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ERROR:0] global /tmp/pip-install-acvfpz_0/opencv-python_7732674b1cb7471d8a299216848188a1/opencv/modules/videoio/src/cap.cpp (142) open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.3.0) /tmp/pip-install-acvfpz_0/opencv-python_7732674b1cb7471d8a299216848188a1/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://usr:psw@IP_address:88/videoMain in function 'icvExtractPattern'
The code is inside a Docker container. Do you know how to fix it? It worked for a previous version of OpenCV but I updated the version and I started to receive this error. I tried to downgrade OpenCV but the error still appears for previous versions. Not sure what should i do.
Thank you