mirror of
https://github.com/woodchen-ink/video2gif.git
synced 2025-07-19 06:02:02 +08:00
Compare commits
No commits in common. "main" and "v1.0.0-78a6ec1" have entirely different histories.
main
...
v1.0.0-78a
20
gui.py
20
gui.py
@ -309,22 +309,15 @@ class VideoToGifConverter:
|
|||||||
# 打印命令用于调试
|
# 打印命令用于调试
|
||||||
print("调色板生成命令:", " ".join(palette_cmd))
|
print("调色板生成命令:", " ".join(palette_cmd))
|
||||||
|
|
||||||
# 创建 startupinfo 对象(用于隐藏 CMD 窗口)
|
|
||||||
startupinfo = None
|
|
||||||
if platform.system().lower() == "windows":
|
|
||||||
startupinfo = subprocess.STARTUPINFO()
|
|
||||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
|
||||||
startupinfo.wShowWindow = subprocess.SW_HIDE
|
|
||||||
# 运行调色板生成命令
|
# 运行调色板生成命令
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
palette_cmd,
|
palette_cmd,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
startupinfo=startupinfo,
|
startupinfo=(
|
||||||
creationflags=(
|
subprocess.STARTUPINFO()
|
||||||
subprocess.CREATE_NO_WINDOW
|
|
||||||
if platform.system().lower() == "windows"
|
if platform.system().lower() == "windows"
|
||||||
else 0
|
else None
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
_, stderr = process.communicate()
|
_, stderr = process.communicate()
|
||||||
@ -368,11 +361,10 @@ class VideoToGifConverter:
|
|||||||
gif_cmd,
|
gif_cmd,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
startupinfo=startupinfo,
|
startupinfo=(
|
||||||
creationflags=(
|
subprocess.STARTUPINFO()
|
||||||
subprocess.CREATE_NO_WINDOW
|
|
||||||
if platform.system().lower() == "windows"
|
if platform.system().lower() == "windows"
|
||||||
else 0
|
else None
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
_, stderr = process.communicate()
|
_, stderr = process.communicate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user