I am trying to transfer a USB camera stream using Opencv VideoWriter to get it on another pc over UART using VideoCapture. However, I am stuck on VideoWriter. Execution of this code returns with an error and out.isOpened () is always false.
The code that I use…
VideoWriter outputVideo(
"appsrc ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 !x264enc !fakesink ",
0,
20,
Size(800, 600),
true);
if (!outputVideo.isOpened()) {
cerr << "VideoWriter not opened" << endl;
exit(-1);
}
How can I solve this issue?