def liveVideoServer(cam_liveWeb_frame_Queue):
app = Flask(__name__)
def gen():
while True:
frame = cam_liveWeb_frame_Queue.get()
frame = writeToLiveFrame(frame, RPiName)
image = cv2.imencode('.jpg', frame)[1].tostring()
yield (b'--frame\r\n'
b'Content-Type: image/jpeg\r\n\r\n' + image + b'\r\n')
@app.route("/liveVideoFeed")
def liveFeed():
return Response(gen(), mimetype='multipart/x-mixed-replace; boundary=frame')
app.run(host='0.0.0.0')
motionDetectionPiMultiProcessing_COM_LiveFeed.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录