Ask Your Question

Revision history [back]

What is the best way to read frame from online streaming(using cv2.videocapture("sdp_file_name")) in every 5 secs from cv2.read ?

  1. I have used cap.set(cv2.CAP_PROP_POS_FRAMES, count) for skipping frames but this process is working fine with a video file, not with a camera and online stream
  2. I have used time.sleep(5), which works fine with a camera but not with online streaming

  3. right now I am using a counter for skipping frames in online streaming (is this the only efficient way to do it )

  4. I am looking for the best way to skip frames so I can reduce my computation while continuous reading of the frame

What is the best way to read frame from online streaming(using cv2.videocapture("sdp_file_name")) in every 5 secs from cv2.read ?

  1. I have used cap.set(cv2.CAP_PROP_POS_FRAMES, count) for skipping frames but this process is working fine with a video file, not with a camera and online stream
  2. I have used time.sleep(5), which works fine with a camera but not with online streaming

  3. right now I am using a counter for skipping frames in online streaming (is this the only efficient way to do it )

  4. I am looking for the best way to skip frames so I can reduce my computation while continuous reading of the frame