SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @app.route('/')
  2. def index():
  3.     return render_template('index.html')
  4.  
  5. def gen(camera):
  6.     while True:
  7.         frame = camera.get_frame()
  8.         yield (b'--frame\r\n'
  9.                b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n\r\n')
  10.  
  11. @app.route('/video_feed')
  12. def video_feed():
  13.     return Response(gen(VideoCamera()),
  14.                     mimetype='multipart/x-mixed-replace; boundary=frame')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top