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-7808d7a" have entirely different histories.
main
...
v1.0.0-780
8
gui.py
8
gui.py
@ -315,6 +315,7 @@ class VideoToGifConverter:
|
||||
startupinfo = subprocess.STARTUPINFO()
|
||||
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||
startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||
|
||||
# 运行调色板生成命令
|
||||
process = subprocess.Popen(
|
||||
palette_cmd,
|
||||
@ -378,7 +379,12 @@ class VideoToGifConverter:
|
||||
_, stderr = process.communicate()
|
||||
|
||||
if process.returncode != 0:
|
||||
raise RuntimeError(f"GIF生成失败: {stderr.decode()}")
|
||||
error_output = ""
|
||||
try:
|
||||
error_output = stderr.decode("utf-8", errors="replace")
|
||||
except Exception:
|
||||
error_output = str(stderr) # Fallback to raw string representation
|
||||
raise RuntimeError(f"GIF生成失败: {error_output}")
|
||||
|
||||
# 删除临时调色板文件
|
||||
if os.path.exists(palette_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user