From c384a0cbf0c204e6dbeccd71d3966d53217c4e2e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 23 Feb 2020 17:03:52 +0100 Subject: wait for ffmpeg --- cli/app/search/live.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli') diff --git a/cli/app/search/live.py b/cli/app/search/live.py index 1eab871..251a9f5 100644 --- a/cli/app/search/live.py +++ b/cli/app/search/live.py @@ -565,6 +565,14 @@ class Listener: save_time = time.time() # out_img.save(os.path.join(path_out, "frame_{:05d}.png".format(i)), format='png', compression_level=3) out_img.save(pipe.stdin, format='png', compression_level=3) + printed = False + while True: + line = pipe.stdout.readline() + if not line: + break + elif not printed: + printed = True + print("Waiting for FFMPEG to catch up...") save_time_total += time.time() - save_time img_to_send = out_img.resize((256, 256), Image.BICUBIC) -- cgit v1.2.3-70-g09d2