What is the best way to read frame from online streaming(using cv2.videocapture("sdp_file_name")) in every 5 secs from cv2.read ?
- 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
I have used time.sleep(5), which works fine with a camera but not with online streaming
right now I am using a counter for skipping frames in online streaming (is this the only efficient way to do it )
- I am looking for the best way to skip frames so I can reduce my computation while continuous reading of the frame
i don't think, that you can read sdp files using VideoCapture
Hi, thanks for replying, no, I am able to do it from videocapture and i am getting data frames using " ret, frame = cap.read()" and I have tried all the above process for skipping frames
but what is the best way to read frame in every 5 secs(i want to reduce my computation by unnecessary use of cap.read() )