Using openCVGrabber to read a RTSP stream #3317
-
|
Hi! I am aware that there are more modern ways to instance devices (a.k.a. yarpdev --device openCVGrabber --movie "rtsp://127.0.0.1:554/stream"Resulting in: [WARNING] |yarp.os.MultiNamespace| YARP name server(s) not configured, ports will be anonymous
[WARNING] |yarp.os.MultiNamespace| check your namespace and settings with 'yarp detect'
[DEBUG] |yarp.dev.PolyDriver|openCVGrabber| Parameters are (attached_device openCVGrabber) (device deviceBundler) (movie "rtsp://127.0.0.1:554/stream") (single_threaded 1) (wrapper_device frameGrabber_nws_yarp)
[INFO] |yarp.device.DeviceBundler| Parameter 'wrapper_device' using value: frameGrabber_nws_yarp
[INFO] |yarp.device.DeviceBundler| Parameter 'attached_device' using value: openCVGrabber
[INFO] |yarp.device.DeviceBundler| Parameter 'doNotAttach' using DEFAULT value: false
[INFO] |yarp.device.DeviceBundler| Opening device: frameGrabber_nws_yarp
[DEBUG] |yarp.dev.PolyDriver|frameGrabber_nws_yarp| Parameters are (device frameGrabber_nws_yarp) (movie "rtsp://127.0.0.1:554/stream") (single_threaded 1)
[INFO] |yarp.device.FrameGrabber_nws_yarp| Parameter 'period' using DEFAULT value: 0.033
[INFO] |yarp.device.FrameGrabber_nws_yarp| Parameter 'name' using DEFAULT value: /grabber
[INFO] |yarp.device.FrameGrabber_nws_yarp| Parameter 'capabilities' using DEFAULT value: COLOR
[INFO] |yarp.device.FrameGrabber_nws_yarp| Parameter 'no_drop' using DEFAULT value: true
[INFO] |yarp.os.Port|/grabber/rpc| Anonymous port active at tcp://172.17.0.2:38541/
[INFO] |yarp.os.Port|/grabber| Anonymous port active at tcp://172.17.0.2:41229/
[INFO] |yarp.device.frameGrabber_nws_yarp| Running, waiting for attach...
[INFO] |yarp.dev.PolyDriver|frameGrabber_nws_yarp| Created wrapper <frameGrabber_nws_yarp>. See C++ class FrameGrabber_nws_yarp for documentation.
[INFO] |yarp.device.DeviceBundler| Opening device: openCVGrabber
[DEBUG] |yarp.dev.PolyDriver|openCVGrabber| Parameters are (device openCVGrabber) (movie "rtsp://127.0.0.1:554/stream") (single_threaded 1)
[INFO] |yarp.device.OpenCVGrabber| Parameter 'movie' using value: rtsp://127.0.0.1:554/stream
[INFO] |yarp.device.OpenCVGrabber| Parameter 'loop' using DEFAULT value: false
[INFO] |yarp.device.OpenCVGrabber| Parameter 'camera' using DEFAULT value: 0
[INFO] |yarp.device.OpenCVGrabber| Parameter 'framerate' using DEFAULT value: -1
[INFO] |yarp.device.OpenCVGrabber| Parameter 'width' using DEFAULT value: 0
[INFO] |yarp.device.OpenCVGrabber| Parameter 'height' using DEFAULT value: 0
[INFO] |yarp.device.OpenCVGrabber| Parameter 'flip_x' using DEFAULT value: false
[INFO] |yarp.device.OpenCVGrabber| Parameter 'flip_y' using DEFAULT value: false
[INFO] |yarp.device.OpenCVGrabber| Parameter 'transpose' using DEFAULT value: false
[tcp @ 0x55b525ef4f80] Connection to tcp://127.0.0.1:554?timeout=0 failed: Connection refused
[ERROR] |yarp.device.openCVGrabber| Unable to open file 'rtsp://127.0.0.1:554/stream' for capture!
[ERROR] |yarp.dev.PolyDriver|openCVGrabber| Driver <openCVGrabber> was found but could not open
[ERROR] |yarp.device.DeviceBundler| Unable to open subdevice:openCVGrabber
[ERROR] |yarp.dev.PolyDriver|openCVGrabber| Driver <deviceBundler> was found but could not open
[ERROR] |yarp.dev.Drivers|openCVGrabber| yarpdev: ***ERROR*** device not available.
[INFO] |yarp.dev.Drivers|openCVGrabber| + Suggestions:
[INFO] |yarp.dev.Drivers|openCVGrabber| openCVGrabber
[INFO] |yarp.dev.Drivers|openCVGrabber| openCVWriter
[INFO] |yarp.dev.Drivers|openCVGrabber| + Do "yarpdev --list" to see list of supported devices.The Any ideas before messing with code and/or abandoning this endeavor? Cheers and kind regards! PS: Creating an RTSP server is pretty easy, see https://www.obsbot.com/es/blog/video-production/rtsp-stream-vlc or even easier via command line on Linux (several options including vlc). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Fixed! The issue was on my side, sorry! YARP was inside a Docker container, so there must have been some routing issues I have to fix. The hack basically works. All of the messages are OpenCV's internals (same as the mysterious tcp): |
Beta Was this translation helpful? Give feedback.
Fixed! The issue was on my side, sorry! YARP was inside a Docker container, so there must have been some routing issues I have to fix. The hack basically works. All of the messages are OpenCV's internals (same as the mysterious tcp):
[rtsp @ 0x563cd89cd840] method SETUP failed: 461 Unsupported transportand[h264 @ 0x563cd89bb140] co located POCs unavailablebut I can actually get a stream viayarp connect /grabber /yarpview/img:ias long as all is within the same container. Good enough for now, cheers!