MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / check_integrity_robust

Method check_integrity_robust

deeplabcut/utils/auxfun_videos.py:69–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 warnings.warn(f'Video contains errors. See "{dest}" for a detailed report.', stacklevel=2)
68
69 def check_integrity_robust(self):
70 numframes = self.video.get(cv2.CAP_PROP_FRAME_COUNT)
71 fr = 0
72 while fr < numframes:
73 success, frame = self.video.read()
74 if not success or frame is None:
75 warnings.warn(f"Opencv failed to load frame {fr}. Use ffmpeg to re-encode video file", stacklevel=2)
76 fr += 1
77
78 @property
79 def name(self):

Callers 1

check_video_integrityFunction · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected