Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台运行去掉闪烁弹窗 #692

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def display_info():
while True:
try:
time.sleep(5)
os.system(clear_command)
if Path(sys.executable).name != 'pythonw.exe':
os.system(clear_command)
print(f"\r共监测{monitoring}个直播中", end=" | ")
print(f"同一时间访问网络的线程数: {max_request}", end=" | ")
print(f"是否开启代理录制: {'是' if use_proxy else '否'}", end=" | ")
Expand Down Expand Up @@ -281,8 +282,10 @@ def check_subprocess(record_name: str, record_url: str, ffmpeg_command: list, sa
bash_file_path: Union[str, None] = None) -> bool:

save_path_name = ffmpeg_command[-1]
si = subprocess.STARTUPINFO()
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
process = subprocess.Popen(
ffmpeg_command, stderr=subprocess.STDOUT
ffmpeg_command, stderr=subprocess.STDOUT, startupinfo=si
)

subs_file_path = save_path_name.rsplit('.', maxsplit=1)[0]
Expand Down