Add keyboard interaction, Add tqdm, Optimize stuff, Fix, Add resuming

This commit is contained in:
Remi Cadene
2024-07-12 19:56:28 +02:00
parent 7a659dbd6b
commit d525e1b0f8
2 changed files with 156 additions and 60 deletions

View File

@@ -207,7 +207,8 @@ def encode_video_frames(
ffmpeg_args.append("-y")
ffmpeg_cmd = ["ffmpeg"] + ffmpeg_args + [str(video_path)]
subprocess.run(ffmpeg_cmd, check=True)
# redirect stdin to subprocess.DEVNULL to prevent reading random keyboard inputs from terminal
subprocess.run(ffmpeg_cmd, check=True, stdin=subprocess.DEVNULL)
@dataclass