Realtek Ethernet (PSE) shows “connected” for IPv4 manual setting (192.168.0.117) and camera is being correctly powered over cable and is pingable
using
Reolink POE IP camera (A14) – maybe suggest another camera ?
Tested with something like this and it fails
BUT when connected to router (and separately powered) works correctly
import cv2
#print("Before URL")
cap = cv2.VideoCapture('rtsp://admin:[email protected]:554/)
#print("After URL")
while True:
#print('About to start the Read command')
ret, frame = cap.read()
#print('About to show frame of Video.')
cv2.imshow("Capturing",frame)
#print('Running..')
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
alan@orin-nano-JP6:~$ python camtest1.py (camera POE connected to PSE port)
Before URL
[tcp @ 0xaaaae4235f40] Connection to tcp://192.168.0.117:554?timeout=0 failed: Connection refused
[ WARN:[email protected]] global cap_gstreamer.cpp:2784 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not open resource for reading and writing.
[ WARN:[email protected]] global cap_gstreamer.cpp:1679 open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:[email protected]] global cap_gstreamer.cpp:1164 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ERROR:[email protected]] global cap.cpp:164 open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.8.0) /home/ubuntu/opencv_build/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://admin:[email protected]:554/ in function ‘icvExtractPattern’
After URL
About to start the Read command
About to show frame of Video.
Traceback (most recent call last):
File “/home/alan/camtest1.py”, line 12, in
cv2.imshow(“Capturing”,frame)
cv2.error: OpenCV(4.8.0) /home/ubuntu/opencv_build/opencv/modules/highgui/src/window.cpp:971: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow’
alan@orin-nano-JP6:~$ ping 192.168.0.117
PING 192.168.0.117 (192.168.0.117) 56(84) bytes of data.
64 bytes from 192.168.0.117: icmp_seq=1 ttl=64 time=0.056 ms
64 bytes from 192.168.0.117: icmp_seq=2 ttl=64 time=0.086 ms
64 bytes from 192.168.0.117: icmp_seq=3 ttl=64 time=0.090 ms
64 bytes from 192.168.0.117: icmp_seq=4 ttl=64 time=0.072 ms
64 bytes from 192.168.0.117: icmp_seq=5 ttl=64 time=0.067 ms
64 bytes from 192.168.0.117: icmp_seq=6 ttl=64 time=0.083 ms
64 bytes from 192.168.0.117: icmp_seq=7 ttl=64 time=0.087 ms
^C
— 192.168.0.117 ping statistics —
7 packets transmitted, 7 received, 0% packet loss, time 6139ms
rtt min/avg/max/mdev = 0.056/0.077/0.090/0.011 ms