Opencv Gstreamer Pipeline VideoCapture doesn't work on Raspberry Pi 4
Hello,
I'm trying to straem Gstreamer video (Gazebo Simulation) to Raspberry Pi 4 via UDP stream using gstreamer.
Gazebo Sim Camera --- (port 5600) ----> Raspberry Pi 4
Capture video by using VideoCapture of Opencv Function. And add some features of OpenCV.
The problem is that I can easily handle video with:
VideoCapture video("udpsrc port=5600 ! application/x-rtp,payload=96,encoding-name=H264 !"
"rtpjitterbuffer mode=1 ! rtph264depay ! h264parse ! decodebin ! videoconvert ! appsink emit-signals=true sync=false max-buffers=1 drop=true", CAP_GSTREAMER);
But this pipeline of gstreamer doesn't work on Raspberry pi 4.
Furthermore Raspberry Pi 4 can open and receive video with this code: C++ Opencv Gstreamer Pipeline
But it's hard to face with this code to manipulate it.
Note: I tried this code another Ubuntu PC and it works well.
"doesn't work" doesn't give much hint about the problem. _Something_ always happens - or something expected doesn't happen. Often there is an error message.
You are right the problem begins there. OpenCV doesn't throw any exception about this issue. I found issue by using
std::cout<<getBuildInformation()<<std:endl;
function. OpenCV doesn't recognize GStreamer but I don't know why. Buster debian comes with gstreamer plugins loaded. Now I'm trying with-D WITH_GSTREAMER=ON
flag. I'll share the result with you.Raspbian doesn't comes with GSTEAMER. You have to install it by yourself. I will wait for new version OpenCV 4.2.1 by mid April or later. Debian is for pc and Raspbian is for ARM
Yeah, I mean buster raspbian. And I'll check latest clean raspbian image for you and add answer. If I remeber correct it comes :)