Capturing video from an MJPEG stream using C ++

I would like to capture a MJPEG stream using C ++. What are my options? I tried OpenCV with FFMPEG support, but icvCreateFileCapture_FFMPEG_p always returns null (after a few seconds timeout). Can I program the HTTP client myself?

Hello,

+4
source share
1 answer

M-JPEG is easy to capture. You send one HTTP request to the server and read the endless response in multipart/x-mixed-replace (Content-Type) format. Then you break it into frames, which are stand-alone JPEG files ... Subheadings may or may not contain unnecessary information, such as timestamps.

You can find this relevant and useful: How to parse MJPEG HTTP stream in C ++?

+4
source

Source: https://habr.com/ru/post/1439870/


All Articles