获取mjpeg视频流

    xiaoxiao2021-03-25  7

    import re #导入正则匹配

    import urllib2 #导入http_url模块

    req = urllib2.urlopen("http://192.168.1.1:8080/?action=stream")

    buf = req.read(71)  #取出图片长度数据

    print buf

    a = "\d+" #匹配模式

    m = re.findall(a,buf) #匹配出jpg数据长度

    print m

    buf_1 = req.read(27)  #取出时间数据

    print buf_1 #打印时间信息

    转载请注明原文地址: https://ju.6miu.com/read-114281.html

    最新回复(0)