隐藏控制台窗口#1103
Open
hjkl950217 wants to merge 2 commits into
Open
Conversation
- 新增 get_subprocess_kwargs() 统一封装 Windows 静默启动参数(CREATE_NO_WINDOW + SW_HIDE) - 重构 ffmpeg/7z/ASR 等子进程调用,统一使用 get_subprocess_kwargs() - 解决了 GUI 版本执行任务时弹出控制台窗口的问题 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
这个 PR 的目的是在 GUI 版本中统一隐藏外部子进程启动时弹出的 Windows 控制台窗口,减少 ffmpeg / ASR / 解压工具运行时对用户体验的干扰。它通过把分散的 creationflags 逻辑收敛到公共工具函数中,使相关模块的子进程启动参数更一致。
Changes:
- 在
platform_utils中扩展get_subprocess_kwargs(),统一封装 Windows 下隐藏控制台窗口的子进程参数。 - 将多个 ffmpeg / whisper / 7z 调用点从内联
creationflags改为复用公共 helper。 - 让字幕渲染、音频提取、ASR 执行和解压流程的子进程启动行为保持一致。
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
videocaptioner/ui/components/FasterWhisperSettingWidget.py |
将 7z 解压进程切换为复用公共子进程参数。 |
videocaptioner/core/utils/video_utils.py |
统一 ffmpeg 调用的隐藏窗口参数。 |
videocaptioner/core/utils/platform_utils.py |
扩展公共 subprocess helper,集中处理 Windows 隐藏窗口逻辑。 |
videocaptioner/core/subtitle/rounded_renderer.py |
将圆角字幕渲染相关 ffmpeg 调用切换到公共 helper。 |
videocaptioner/core/subtitle/ass_renderer.py |
将 ASS 预览/渲染相关 ffmpeg 调用切换到公共 helper。 |
videocaptioner/core/asr/whisper_cpp.py |
将 whisper.cpp 与 ffmpeg 调用切换到公共 helper。 |
videocaptioner/core/asr/faster_whisper.py |
将 faster-whisper 进程启动切换到公共 helper。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现在pip安装的gui版本,在运行时会弹出来ffmpeg的控制台窗口,让AI改了下代码,隐藏了控制台