fix: resolve deadlock during video encoding by suppressing ffmpeg stdout/stderr logs
This commit is contained in:
parent
62685b60be
commit
bdcb2b685e
1 changed files with 2 additions and 2 deletions
|
|
@ -506,7 +506,7 @@ def encode_video(
|
||||||
height, width = first_frame.shape[:2]
|
height, width = first_frame.shape[:2]
|
||||||
|
|
||||||
# Build FFmpeg encode command
|
# Build FFmpeg encode command
|
||||||
ffmpeg_cmd = ["ffmpeg", "-y"]
|
ffmpeg_cmd = ["ffmpeg", "-y", "-v", "error"]
|
||||||
ffmpeg_cmd.extend(enc_in_args)
|
ffmpeg_cmd.extend(enc_in_args)
|
||||||
ffmpeg_cmd.extend(
|
ffmpeg_cmd.extend(
|
||||||
[
|
[
|
||||||
|
|
@ -546,7 +546,7 @@ def encode_video(
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
ffmpeg_cmd,
|
ffmpeg_cmd,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue