How to parse mjpeg http stream from ip camera?

后端 未结 5 1693
天命终不由人
天命终不由人 2020-11-27 10:44

Given below is the code written for getting live stream from an IP Camera.

from cv2 import *
from cv2 import cv
import urllib
import numpy as np
k=0
capture=         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 11:17

    I had the same problem. The solution without requests or urllib: just add the user and password in the cam address, using VideoCapture, like this:

    E.g.

    cv2.VideoCapture('http://user:password@XXX.XXX.XXX.XXX/video')

    using IPWebcam for android.

提交回复
热议问题