title: How to extract a fixed number of frames with ffmpeg?
body: <p>I am trying to extract a fixed number of frames uniformly from a bunch of videos(say 50 frames from each video, 10,000 videos in total). </p>
  
  <p>Since the duration varies, I calculated the ideal output fps for each video and take it as a parameter for ffmpeg extraction, but failed to get the required number of frames.</p>
  
  <p>Does anyone know how to extract a fixed number of frames with ffmpeg, or other tools? Thanks!</p>