For my project i need a Raspberry Pi (running Arch Linux) streaming video to a Windows 10 pc.
As a test i have both Raspberry Pi & Windows 10 pc on the same network (in future they will be connected directly through a network cable).
On the Raspberry Pi i can get the camera working, but the stream via UDP won't, at least i can't read the UDP signal.
On my Raspberry Pi i use this:
Code: Select all
/opt/vc/bin/raspivid -n -t 0 -fps 30 -w 800 -h 600 -o - | nc -u 192.168.248.128 1900
On my windows 10 system i try using code or even VLC player to connect to: udp://192.168.248.128:1900 but none of them can connect.
In C++ code i try this:
Code: Select all
#include "opencv2/opencv.hpp"
#include <stdint.h>
using namespace cv;
using namespace std;
int main(int argv, char** argc)
{
Mat frame;
VideoCapture vid;
vid.open("udp://@192.168.248.128:1900");
if (!vid.isOpened()) {
return -1;
}
while (vid.read(frame)) {
imshow("Stream", frame);
if (waitKey(1000 / 30) >= 0) {
break;
}
}
return 1;
}
andvid = <Information not available, no symbols loaded for opencv_world320d.dll>
What am i doing wrong?warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:779)
warning: udp://@192.168.248.128:1900 (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:780)
Btw, i am using netcat
Thanks for your help!