Hi all,
I’ll take the occasion to present myself since this is my very first post in the forums - great community, people!!!
I have a problem with OpenCV and gstreamer to collect frames from an IP Camera via RTSP.
My need: I need to collect frames from an IP Camera over RTSP using OpenCV (standard JetPack) and Python3.7 using the VideoCapture API.
This is a very straightforward method that I always use with other platforms - it’s a one liner actually:
cap = cv2.VideoCapture("rtsp://*********@<camera_ip>:<camera_port>/<stream_path>")
My problem: I am not able to collect IP camera frames using Python3.7 and OpenCV 4.5.1, but I can do it only with pre-installed Python3.6 + OpenCV
My tests and results: I built OpenCV for Py3.7 following the post here: https://forums.developer.nvidia.com/t/jetson-nano-opencv-4-1-0/77367 and for testing purposes, I’m using the tegra-cam.py script from https://gist.github.com/jkjung-avt/86b60a7723b97da19f7bfa3cb7d2690e
If I try running the script through python3.7 - It fails me:
$python3.7 tegra-cam.py --rtsp --uri rtsp://****:****@192.168.1.65:554/stream2
...... OpenCV version: 4.5.1 / Failed to open camera!
while if I try running the same script using python3.6, it shows me my stream without any problem.
$python3.6 tegra-cam.py --rtsp --uri rtsp://****:****@192.168.1.65:554/stream2
I can see my camera frames with this
How can I enable RTSP frame collection with OpenCV using python3.7??? Has anyone had the same problem?
Thanks