ffmpegcv icon indicating copy to clipboard operation
ffmpegcv copied to clipboard

How to index frame

Open sarkadava opened this issue 2 years ago • 1 comments

Hey, is there a way how to index certain frame range with ffmpegcv? Something like this (in opencv):

for fra in frames: capture.set(cv2.CAP_PROP_POS_FRAMES, fra) ##THIS SPECIFICALLY ret, frame = capture.read() if ret: #cv2.imshow('frame',frame) #cv2.waitKey(1000) out.write(frame) # display th loading image with im.show() to see if the frames are loaded correctly if not ret: # print('a frame was dropped: ' + str(fra)) capture.release() # out.release()

Thank you!

sarkadava avatar Sep 26 '23 20:09 sarkadava

you can try openmmlab/mmcv

---- Replied Message ---- | From | Šárka @.> | | Date | 09/27/2023 04:05 | | To | @.> | | Cc | @.***> | | Subject | [chenxinfeng4/ffmpegcv] How to index frame (Issue #27) |

Hey, is there a way how to index certain frame range with ffmpegcv? Something like this (in opencv):

for fra in frames: capture.set(cv2.CAP_PROP_POS_FRAMES, fra) ##THIS SPECIFICALLY ret, frame = capture.read() if ret: #cv2.imshow('frame',frame) #cv2.waitKey(1000) out.write(frame)

display th loading image with im.show() to see if the frames are loaded correctly

if not ret:

print('a frame was dropped: ' + str(fra))

capture.release() # out.release()

Thank you!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

chenxinfeng4 avatar Sep 27 '23 06:09 chenxinfeng4