Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
33045: adding -nostdin argument to ffmpeg command
Browse files Browse the repository at this point in the history
  • Loading branch information
seblabbe committed Jan 14, 2022
1 parent 3832350 commit 8bb3a23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/plot/animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,9 @@ def ffmpeg(self, savefile=None, show_path=False, output_format=None,
# ...', need to come before the input file names, while
# some options, like '-pix_fmt rgb24', need to come
# afterwards. Hence 'early_options' and 'ffmpeg_options'
cmd = 'cd "%s"; sage-native-execute ffmpeg -y -f image2 %s -i %s %s %s' % (pngdir, early_options, pngs, ffmpeg_options, savefile)
# The `-nostdin` is needed to avoid the command to hang, see
# https://stackoverflow.com/questions/16523746/ffmpeg-hangs-when-run-in-background
cmd = 'cd "%s"; sage-native-execute ffmpeg -nostdin -y -f image2 %s -i %s %s %s' % (pngdir, early_options, pngs, ffmpeg_options, savefile)
from subprocess import check_call, CalledProcessError, PIPE
try:
if sage.misc.verbose.get_verbose() > 0:
Expand Down

0 comments on commit 8bb3a23

Please sign in to comment.