's'
This commit is contained in:
12
backup/back6
12
backup/back6
@@ -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}),1秒后重启...")
|
||||
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=1)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.proc.kill()
|
||||
self.proc = None
|
||||
if not self.stop_flag.is_set():
|
||||
time.sleep(5)
|
||||
time.sleep(1)
|
||||
|
||||
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=1)
|
||||
except subprocess.TimeoutExpired:
|
||||
self.proc.kill()
|
||||
|
||||
@@ -188,8 +188,8 @@ def start_douyin_to_youtube(record_url, youtube_key, room_name=None, proxy_addr=
|
||||
|
||||
# ----------------- Main Program -----------------
|
||||
if __name__ == "__main__":
|
||||
DOUYIN_URL = "https://live.douyin.com/642534242822"
|
||||
YOUTUBE_KEY = "ue78-1c3e-mr9g-14mz-9r4z"
|
||||
DOUYIN_URL = "https://live.douyin.com/112633436109"
|
||||
YOUTUBE_KEY = "qxvb-r47b-r5ju-6ud3-6k7z"
|
||||
|
||||
hls_instance = start_douyin_to_youtube(DOUYIN_URL, YOUTUBE_KEY)
|
||||
if not hls_instance:
|
||||
|
||||
Reference in New Issue
Block a user