osman toker
osman toker

Reputation: 1

Displaying UDP Multicast Rawvideo Stream

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) ?

Upvotes: 0

Views: 870

Answers (1)

szatmary
szatmary

Reputation: 31101

Mpegts has properties that are specifically designed for transmission over a one way losssy transport like UDP, or digital television. It has packets that are repeated every 100ms to tell the reader how to bootstrap decoding, it has start of frame flags (payload unit start indicator), it has a packet counter to detect skipped and out of order packets, and several other important features.

Raw video has none of this. It’s just a bunch of bytes. If a single packet is lost (including the first packet) the decoder will have no idea where the start and end of frames are, and is unable to reconstruct a stream.

Therefor such a feature is generally not supported in video tools. If you need to send raw video, use TCP not UDP.

Upvotes: 1

Related Questions