's'
This commit is contained in:
8
live.py
8
live.py
@@ -121,7 +121,7 @@ class DouyinToYouTubeStreamer:
|
||||
|
||||
self.proc.wait()
|
||||
if not self.stop_flag.is_set():
|
||||
logging.warning(f"[{self.room_name}] FFmpeg 退出 (返回码: {self.proc.returncode}),5秒后重启...")
|
||||
logging.warning(f"[{self.room_name}] FFmpeg 退出 (返回码: {self.proc.returncode}),2秒后重启...")
|
||||
self.pushing = False
|
||||
except Exception as e:
|
||||
logging.error(f"[{self.room_name}] FFmpeg 启动异常: {e}")
|
||||
@@ -129,12 +129,12 @@ class DouyinToYouTubeStreamer:
|
||||
if self.proc and self.proc.poll() is None:
|
||||
self.proc.terminate()
|
||||
try:
|
||||
self.proc.wait(timeout=5)
|
||||
self.proc.wait(timeout=2)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.proc.kill()
|
||||
self.proc = None
|
||||
if not self.stop_flag.is_set():
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
|
||||
def _monitor_thread(self):
|
||||
term_width, _ = shutil.get_terminal_size()
|
||||
@@ -157,7 +157,7 @@ class DouyinToYouTubeStreamer:
|
||||
if self.proc and self.proc.poll() is None:
|
||||
self.proc.terminate()
|
||||
try:
|
||||
self.proc.wait(timeout=5)
|
||||
self.proc.wait(timeout=2)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.proc.kill()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user