You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear author:
After successfully installing Pistreaming on my RaspiberryPi, I can now watch the video by 192.168.137.2:8082 in my browser.
But when I try to use it in the opencv, I failed to open the camera by VideoCapture video; video.open(192.168.137.2:8082);
So how can I get the video in OpenCV?
The text was updated successfully, but these errors were encountered:
OpenCV usually relies on local V4L (Video4Linux) devices for video capture. This is a considerably different thing to an MPEG1 stream over a websocket (which is what pistreaming provides). I've no idea if OpenCV can open a network stream directly; it can open a file so there's a possibility it might work with something like a FIFO or a UNIX socket (through which the stream is re-directed), but if it wants to seek within the file that obviously won't work.
If you're looking to perform operations in OpenCV on the stream you're probably better off passing the unencoded frames from the camera straight to OpenCV within the script (with an option to drop frames if processing gets behind). The BroadcastOutput.write method is what receives unencoded frames (currently in YUV420 format, you may want BGR for OpenCV instead but be warned that will double the frame size and the ffmpeg sub-process will need adjusting accordingly). You could send the data from there through a queue to something else wanting to process it (don't try and do processing within the write method; it's expected to return fast as it's running within the camera's thread).
Dear author:
After successfully installing Pistreaming on my RaspiberryPi, I can now watch the video by 192.168.137.2:8082 in my browser.
But when I try to use it in the opencv, I failed to open the camera by
VideoCapture video; video.open(192.168.137.2:8082);
So how can I get the video in OpenCV?
The text was updated successfully, but these errors were encountered: