How to use Gstreamer pipeline in OpenCV ?
Hello all :)
I have OpenCV installed with ffmpeg and gstreamer support.
I have a working Gstreamer pipeline from my raspberry pi 3b to Ubuntu 16.04.
This is my Gstreamer pipeline SEND script line:
gst-launch-1.0 -v v4l2src ! video/x-raw,width=320,height=240 ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=192.168.1.101 port=5200
This is my Gstreamer pipeline RECEIVER script line:
gst-launch-1.0 -v udpsrc port=5200 ! application/x-rtp, encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! videoconvert ! autovideosink
Can anyone help me how to use this videostream in Python OpenCV ?
Any help much appreciated ! Greetings, Peter Lunk
please check first, if your cv2 install has gstreamer capabilities by:
then look at the "Video IO" section there.
(most prebuilt versions from a ppm, like pip or conda won't have any support for this)
As I stated in my Opening-Post: "I have OpenCV installed with ffmpeg and gstreamer support." Everything built from source with all the appropriate libs.
apologies, just a knee-jerk reflex ;)
That happens, thanks for the well meant effort though ;) Might you have any tips for me on how to brew the python code to use this video pipeline in openCV ?