Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 34c2bb3

Browse files
committed
33092: ffmpeg-hangs-when-run-in-background
1 parent 9810e58 commit 34c2bb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sage/features/ffmpeg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def is_functional(self):
7575

7676
# running the command (taken from sage/plot/animate.py)
7777
from subprocess import run
78-
cmd = ['ffmpeg', '-y', '-f', 'image2', '-r', '5', '-i',
78+
# the `-nostdin` is needed to avoid the command to hang, see
79+
# https://stackoverflow.com/questions/16523746/ffmpeg-hangs-when-run-in-background
80+
cmd = ['ffmpeg', '-nostdin', '-y', '-f', 'image2', '-r', '5', '-i',
7981
filename_png, '-pix_fmt', 'rgb24', '-loop', '0',
8082
filename_gif]
8183
result = run(cmd, cwd=base, capture_output=True, text=True)

0 commit comments

Comments
 (0)