title: How to decrease frame rate of USB webcam 2.0 using openCV python
body: <p>I am working on <strong>ubuntu 16.04</strong> and using a <strong>USB 2.0 webcam.</strong> I want to <strong><em>decrease the frame rate</em></strong> somehow since the project I'm working on requires face detection which really lags the video hence want to decrease the frame rate. </p>
  
  <p>I've tried implementing the following code </p>
  
  <pre><code>import cv2
  
  cap = cv2.VideoCapture(0)
  cap.set(cv2.CAP_PROP_FPS, 15)
  fps = int(cap.get(5))
  print("fps:", fps)
  
  while(cap.isOpened()):
  
      ret,frame = cap.read()
      if not ret:
          break
  
      cv2.imshow('frame', frame)
  
      k = cv2.waitKey(1)
      if k == 27:
          break
  </code></pre>
  
  <p><strong>I get the following error</strong> </p>
  
  <pre><code>(python3:24100): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
  </code></pre>
  
  <p>If i set the frame rate in the above mentioned code to 30 (default frame rate) then i get a proper video, but if I change it I get the above mentioned error. </p>
  
  <p>How can i decrease the frame rate either through code or even manually through settings (if there's a way)</p>