Closed Adidushi closed 3 years ago
Hello @Adidushi, the error what(): Could not capture frame!
makes me think that it's just the OpenCV backend not able to grab an image.
I invite you to try the test script https://github.com/ros-drivers/video_stream_opencv/blob/master/scripts/test_video_resource.py with your rtsp URL and see if you find the same behavior. As you may see, the script is minimal, if it crashes in the same fashion, it means the OpenCV backend is not able to handle that stream (at least without setting more options to the stream? but I am not familiar with what options a rtsp stream provider may have).
If this doesn't work, I would try to use gstreamer to decode your stream. I found this link that has an example of a client commandline (under RTSP clients): https://developer.ridgerun.com/wiki/index.php?title=GstRtspSink_-_Live_File_Streaming Another example here: https://github.com/google-coral/examples-camera/issues/16
If that works, you may want to look into using gscam http://wiki.ros.org/gscam with your custom gstreamer configuration string
Good luck! (And please, reply here with your findings so the community benefits from them if you have the time).
Hi, the issue was that my RTSP stream wasn't very stable. I ended up writing a custom script that just restarts the node whenever it crashes.
Thanks!
I am trying to stream an ip camera over rtsp using video_stream_opencv. I have been able to successfully visualize the camera using VLC with the command:
vlc --network-caching=500 rtsp://admin:admin@10.201.41.101:5541
However any attempts to stream the camera with video_stream has failed. Here is the result of attempting to run video_stream_opencv:
Changing the FPS and buffer size seem to change the frequency of it but I'm unsure as to what is happening.