diff --git a/video2x/encoder.py b/video2x/encoder.py index bcaa718..20c364d 100755 --- a/video2x/encoder.py +++ b/video2x/encoder.py @@ -19,7 +19,7 @@ along with this program. If not, see . Name: Video Encoder Author: K4YT3X Date Created: June 17, 2021 -Last Modified: April 9, 2022 +Last Modified: August 28, 2022 """ import os @@ -138,10 +138,6 @@ class VideoEncoder: self.encoder.stdin.flush() self.encoder.stderr.flush() - # send SIGINT (2) to FFmpeg - # this instructs it to finalize and exit - self.encoder.send_signal(signal.SIGINT) - # close PIPEs to prevent process from getting stuck self.encoder.stdin.close() self.encoder.stderr.close() diff --git a/video2x/video2x.py b/video2x/video2x.py index c0cd4a3..e843a5b 100755 --- a/video2x/video2x.py +++ b/video2x/video2x.py @@ -27,7 +27,7 @@ __ __ _ _ ___ __ __ Name: Video2X Creator: K4YT3X Date Created: February 24, 2018 -Last Modified: April 30, 2022 +Last Modified: August 28, 2022 Editor: BrianPetkovsek Last Modified: June 17, 2019 @@ -332,11 +332,6 @@ class Video2X: decoder_thread.stop() decoder_thread.join() - # stop the encoder - encoder.join() - - logger.critical("ENCODER") - # clear queue and signal processors to exit # multiprocessing.Queue has no Queue.queue.clear while tasks_queue.empty() is not True: @@ -348,6 +343,9 @@ class Video2X: processor_pool.close() processor_pool.join() + # stop the encoder + encoder.join() + # restore original STDOUT and STDERR sys.stdout = original_stdout sys.stderr = original_stderr