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