diff --git a/video2x/encoder.py b/video2x/encoder.py index 925569f..ce7efa7 100755 --- a/video2x/encoder.py +++ b/video2x/encoder.py @@ -133,8 +133,12 @@ class VideoEncoder(threading.Thread): time.sleep(0.1) continue + # send the image to FFmpeg for encoding self.encoder.stdin.write(image.tobytes()) + # remove the image from memory + self.processed_frames[frame_index] = None + with self.processed.get_lock(): self.processed.value += 1