's'
This commit is contained in:
8
live.py
8
live.py
@@ -150,11 +150,11 @@ class DouyinToYouTubeStreamer:
|
||||
|
||||
if self.push_proc.poll() is not None:
|
||||
logging.warning(f"[{self.room_name}] 推流进程退出,5秒后重启...")
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
break
|
||||
if self.enable_recording and self.record_proc and self.record_proc.poll() is not None:
|
||||
logging.warning(f"[{self.room_name}] 录制进程退出,5秒后重启...")
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
break
|
||||
|
||||
time.sleep(2)
|
||||
@@ -183,7 +183,7 @@ class DouyinToYouTubeStreamer:
|
||||
m, s = divmod(uptime, 60)
|
||||
status = "推流中" if self.pushing else "启动中"
|
||||
print(f"\r[{self.room_name}] {status} | 运行时间: {m:02d}:{s:02d} | 码率: {self.bitrate}k", end="")
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
|
||||
# ----------------- 停止 -----------------
|
||||
def stop(self):
|
||||
@@ -253,7 +253,7 @@ def start_douyin_to_youtube(record_url, youtube_key, room_name=None,
|
||||
|
||||
# ----------------- Main Program -----------------
|
||||
if __name__ == "__main__":
|
||||
DOUYIN_URL = "https://live.douyin.com/402085299686"
|
||||
DOUYIN_URL = "https://live.douyin.com/472140253414"
|
||||
YOUTUBE_KEY = "qxvb-r47b-r5ju-6ud3-6k7z"
|
||||
|
||||
# enable_recording=True 可开启本地录制
|
||||
|
||||
Reference in New Issue
Block a user