a guest Oct 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def index():
- return render_template('index.html')
- def gen(camera):
- while True:
- frame = camera.get_frame()
- yield (b'--frame\r\n'
- b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')
- def video_feed():
- return Response(gen(VideoCamera()),
- mimetype='multipart/x-mixed-replace; boundary=frame')
RAW Paste Data