How to get MJPG stream video from android IPWebcam using opencv

前端 未结 5 1566
暗喜
暗喜 2021-02-04 19:48

I am using the IP Webcam program on android and receiving it on my PC by WiFi. What I want is to use opencv in Visual Studio, C++, to get that video stream, there is an option t

5条回答
  •  甜味超标
    2021-02-04 20:27

    Old question, but I hope this can help someone (same as my answer here)

    OpenCV expects a filename extension for its VideoCapture argument, even though one isn't always necessary (like in your case).

    You can "trick" it by passing in a dummy parameter which ends in the mjpg extension:

    So perhaps try:

    VideoCapture vc;
    ipCam.open("http://MyIP:port/videofeed/?dummy=param.mjpg")
    

提交回复
热议问题