video: fix flush of closed file error
Use wait() instead of communicate() after manually closing stdin. communicate() tries to flush stdin which fails if already closed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
29322cb3a5
commit
fa58a15e58
1 changed files with 2 additions and 1 deletions
|
|
@ -193,7 +193,8 @@ def generate_and_stream_frames(base_img, pet_img, vinyl_img, needle_img, audio_d
|
|||
logger.info(f"Frame progress: {frame_num + 1}/{frames_per_rotation}")
|
||||
|
||||
ffmpeg_process.stdin.close()
|
||||
stdout, stderr = ffmpeg_process.communicate()
|
||||
ffmpeg_process.wait()
|
||||
stderr = ffmpeg_process.stderr.read()
|
||||
|
||||
if ffmpeg_process.returncode != 0:
|
||||
logger.error(f"FFmpeg error: {stderr.decode()}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue