mirror of
https://github.com/YaoFANGUK/video-subtitle-remover.git
synced 2026-05-20 21:07:40 +08:00
修复LAMA模式100%卡死:帧区间扩展超出视频总帧数导致FramePrefetcher死锁
- 限制字幕区间end不超过frame_count,防止内循环消费哨兵后外层永久阻塞 - LAMA批量推理改为mini-batch(4帧),避免GPU OOM - 各inpaint模型空inpaint_area时返回原始帧 - FFmpeg子进程添加600s超时保护 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,4 +97,8 @@ class FFmpegVideoWriter:
|
||||
self._process.stdin.close()
|
||||
except BrokenPipeError:
|
||||
pass
|
||||
self._process.wait()
|
||||
try:
|
||||
self._process.wait(timeout=600)
|
||||
except subprocess.TimeoutExpired:
|
||||
self._process.terminate()
|
||||
self._process.wait(timeout=5)
|
||||
|
||||
Reference in New Issue
Block a user