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

Function test_cfr_frame_num_exact

tests/test_vfr.py:218–223  ·  view source on GitHub ↗

For CFR video, frame_num should be exact (not approximate).

(test_movie_clip: str)

Source from the content-addressed store, hash-verified

216
217
218def test_cfr_frame_num_exact(test_movie_clip: str):
219 """For CFR video, frame_num should be exact (not approximate)."""
220 video = open_video(test_movie_clip, backend="pyav")
221 for expected_frame in range(1, 11):
222 assert video.read() is not False
223 assert video.position.frame_num == expected_frame - 1
224
225
226def test_vfr_save_images_opencv_matches_pyav(test_vfr_video: str, tmp_path):

Callers

nothing calls this directly

Calls 2

open_videoFunction · 0.90
readMethod · 0.45

Tested by

no test coverage detected