title: Video Streaming From Raspberry Pi zero using Arducam
body: <p>I am trying to stream live video from Raspberry Pi zero using Arducam B0112.
  I have written a function to stream video but the frame rate is low, Can you please suggest some alternative function to stream video and display it on localhost which will have better frame rate.</p>
  
  <p>The video streaming function I have is as follows:</p>
  
  <pre><code> def gen():
      """Video streaming generator function."""
      output = np.empty((240, 320, 3), dtype=np.uint8)
      while True:  
          camera.capture(output, 'rgb')
          # Construct a numpy array from the stream
          ret, buffer = cv2.imencode('.jpg', output, [int(cv2.IMWRITE_JPEG_QUALITY), 85])
          frame = buffer.tobytes()
          yield (b'--frame\r\n'
                 b'Content-Type: image/jpeg\r\n\r\n' + frame + b'\r\n')
  </code></pre>