But i want to recieve frame on NVR and i want to know url for connection.
When I try to connect by url rtsp://127.0.0.1:5004 with opencv:
cap = cv2.VideoCapture(‘rtsp://127.0.0.1:5004’)
I get error:
[tcp @ 0x2f0cf80] Connection to tcp://127.0.0.1:5004?timeout=0 failed: Connection refused
How can I find the url to connect to the stream?
Thank you in advance!
UPD: I’m trying to send and recieve frames on the same Jetson Nano, but in different docker containers (run with flag --net=host ).
I found example for rtsp streaming, added 276-283 lines to my code and run pipeline without errors. In second container I run this script:
cap = cv2.VideoCapture('rtsp://localhost:8554/ds-test', cv2.CAP_FFMPEG)
if cap.isOpened():
print('opened')
Why do you think you can send a UDP stream but received it with RTSP in opencv? Do you know the difference between the two protocols? Can you google your problem by yourself?
I run deepstream-test1-rtsp-out in docker, and in second docker video was opened with using VideoCapture. All properties for udpsink and RTSPServer are similar to properties in deepstream-test1-rtsp-out.
deepstream-test1-rtsp-out work proper way, but not my script
when my script is running, cv2.VideoCapture('rtsp://localhost:8554/ds-test', cv2.CAP_FFMPEG) in another container waits about 40secs and doesn’t open.
when script isn’t running, VideoCapture exit immediately.
deepstream-test1-rtsp-out uses .h264 file as source, my script uses buffer, I think it is main difference, that requires additional capsfilter properties
but I can not find structured information about the correct capsfilter setting