mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-05-20 11:07:31 +08:00
redirected subprocess.Popen streams to system stdout and stderr
This commit is contained in:
@@ -130,4 +130,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Description: This class handles all FFmpeg related operations.
|
|||||||
import json
|
import json
|
||||||
import pathlib
|
import pathlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
from avalon_framework import Avalon
|
from avalon_framework import Avalon
|
||||||
@@ -316,4 +317,4 @@ class Ffmpeg:
|
|||||||
# turn all list elements into string to avoid errors
|
# turn all list elements into string to avoid errors
|
||||||
execute = [str(e) for e in execute]
|
execute = [str(e) for e in execute]
|
||||||
Avalon.debug_info(f'Executing: {" ".join(execute)}')
|
Avalon.debug_info(f'Executing: {" ".join(execute)}')
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Description: High-level wrapper for Gifski.
|
|||||||
# built-in imports
|
# built-in imports
|
||||||
import pathlib
|
import pathlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
from avalon_framework import Avalon
|
from avalon_framework import Avalon
|
||||||
@@ -71,4 +72,4 @@ class Gifski:
|
|||||||
|
|
||||||
Avalon.debug_info(f'Executing: {execute}')
|
Avalon.debug_info(f'Executing: {execute}')
|
||||||
|
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
@@ -107,4 +108,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
@@ -108,4 +109,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import argparse
|
|||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
@@ -116,4 +117,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import argparse
|
|||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
@@ -122,4 +123,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
# third-party imports
|
# third-party imports
|
||||||
@@ -111,4 +112,4 @@ class WrapperMain:
|
|||||||
self.print_lock.acquire()
|
self.print_lock.acquire()
|
||||||
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
Avalon.debug_info(f'[upscaler] Subprocess {os.getpid()} executing: {" ".join(execute)}')
|
||||||
self.print_lock.release()
|
self.print_lock.release()
|
||||||
return subprocess.Popen(execute)
|
return subprocess.Popen(execute, stdout=sys.stdout, stderr=sys.stderr)
|
||||||
|
|||||||
Reference in New Issue
Block a user