Ask Your Question
0

Displaying UDP Multicast Stream

asked 2020-03-23 16:44:10 -0600

otoker gravatar image

Hi, I'm trying to display a multicast UDP video stream using OpenCV (4.2.0) with Java. I can grab the webcam and any RTSP video;

VideoCapture videoDevice = new VideoCapture();

videoDevice.open(0);

or

videoDevice.open("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov");

but I couldn't join a udp stream. For testing, in the server side, I sent the webcam via FFmpeg;

ffmpeg.exe  -f dshow  -i video="USB2.0 HD UVC WebCam" -r 30 -f rawvideo udp://@239.0.1.100:4378

and I could display the video with ffplay;

ffplay.exe -f rawvideo -i  udp://@239.0.1.100:4378

but I could not join the stream with;

videoDevice.open("udp://@239.0.1.100:4378");

and I also tried videoDevice.grab() but nothings changed. What is wrong? Is there any other settings?

Osman

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-03-28 05:49:53 -0600

otoker gravatar image

I just want to update the situation;

I stream the webcam with FFmpeg (command line) via UDP as above. On the client side I use Java OpenCV, the capture line; VideoCapture.open("udp://xx.xx.xx.xx:xx). If I sent the stream as mpegts (ffmpeg -f mpegts), I can display the stream but; if I sent it as rawvideo (ffmpeg -f rawvideo), I couldn't.

Is there any parameter to set (like CvType) ?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-23 16:44:10 -0600

Seen: 2,076 times

Last updated: Mar 28 '20