MCPcopy Index your code
hub / github.com/Breakthrough/PySceneDetect / read

Method read

scenedetect/video_stream.py:173–185  ·  view source on GitHub ↗

Read and decode the next frame as a np.ndarray. Returns False when video ends. Arguments: decode: Return the frame image itself. If False, a boolean indicating if the stream was advanced to the next frame or not. This can improve performance by reducing

(self, decode: bool = True)

Source from the content-addressed store, hash-verified

171
172 @abstractmethod
173 def read(self, decode: bool = True) -> np.ndarray | bool:
174 """Read and decode the next frame as a np.ndarray. Returns False when video ends.
175
176 Arguments:
177 decode: Return the frame image itself. If False, a boolean indicating if the stream
178 was advanced to the next frame or not. This can improve performance by reducing
179 memory copying and colorspace conversions when a given frame's data is not required.
180
181 Returns:
182 If decode = True, the decoded frame (np.ndarray), or False (bool) if end of video.
183 If decode = False, a bool indicating if advancing to the the next frame succeeded.
184 """
185 ...
186
187 @abstractmethod
188 def reset(self) -> None:

Callers 15

sha256_fileFunction · 0.45
hash_zip_contentsFunction · 0.45
test_vfr_seek_pyavFunction · 0.45
test_cfr_frame_num_exactFunction · 0.45
test_readMethod · 0.45
test_read_no_decodeMethod · 0.45
test_time_invariantsMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_vfr_seek_pyavFunction · 0.36
test_cfr_frame_num_exactFunction · 0.36
test_readMethod · 0.36
test_read_no_decodeMethod · 0.36
test_time_invariantsMethod · 0.36
test_resetMethod · 0.36
test_seekMethod · 0.36