(video)
| 40 | return total |
| 41 | |
| 42 | def count_frames_manual(video): |
| 43 | # initialize the total number of frames read |
| 44 | total = 0 |
| 45 | |
| 46 | # loop over the frames of the video |
| 47 | while True: |
| 48 | # grab the current frame |
| 49 | (grabbed, frame) = video.read() |
| 50 | |
| 51 | # check to see if we have reached the end of the |
| 52 | # video |
| 53 | if not grabbed: |
| 54 | break |
| 55 | |
| 56 | # increment the total number of frames read |
| 57 | total += 1 |
| 58 | |
| 59 | # return the total number of frames in the video file |
| 60 | return total |
no test coverage detected
searching dependent graphs…