title: How to change frame per second (FPS) while using `cv2` when converting video to frames?
body: <p>Currently I am using <code>2017_08_31_0121.mp4</code> as my video which is a 21-second long video and once I break it into frames, I get 504 frames. This means that frame per second is set to 24. I want to change the number of frames but I do not know which part of the following code is responsible for setting frame per second.</p>
  <p><strong>Questions:</strong></p>
  <ol>
  <li><p>I thought for a long time that the default FPS is 25 but now I have 24, can you please let me know where the default FPS is set and what it is?</p>
  </li>
  <li><p>If I want to use a custom FPS let's say 10, how can I modify the following code to do it?</p>
  </li>
  </ol>
  <pre><code>import cv2
  vidcap = cv2.VideoCapture('/content/2017_08_31_0121.mp4')
  success, image = vidcap.read()
  count = 0
  while success:
    if count&lt;10:
      id = f'00{count}'
    elif count &lt; 100:
      id = f'0{count}'
    else:
      id = count
    cv2.imwrite(f&quot;./new_frames/frame{id}.jpg&quot;, image)    # save frame as JPEG file      
    success, image = vidcap.read()
    count += 1
  </code></pre>