Minor update to generate_keyframes

* Change updates per 1000 frames to update per 1 frame. Old line now gets replaced by a new one for every frame checked.
This commit is contained in:
LightArrowsEXE 2019-10-17 11:48:08 +02:00
parent dfa20323ed
commit bbaa8f8cc7

View file

@ -28,8 +28,8 @@ def generate_keyframes(clip: vs.VideoNode, out_path=None, no_header=False) -> No
for i in range(clip.num_frames):
if clip.get_frame(i).props.Scenechange == 1:
out_txt += "%d I -1\n" % i
if i % 1000 == 0:
print(f"Progress: {i}/{clip.num_frames} frames")
if i % 1 == 0:
print(f"Progress: {i}/{clip.num_frames} frames", end="\r")
text_file = open(out_path, "w")
text_file.write(out_txt)
text_file.close()