make sure ffmpeg output is printed out

This commit is contained in:
iLLiCiTiT 2020-10-15 16:01:16 +02:00
parent d37f4a041f
commit 0709da0fd6

View file

@ -299,8 +299,21 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins):
)
print("Launching command: {}".format(command))
proc = subprocess.Popen(command, shell=True)
print(proc.communicate()[0])
proc = subprocess.Popen(
command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True
)
_stdout, _stderr = proc.communicate()
if _stdout:
print(_stdout.decode("utf-8"))
# This will probably never happen as ffmpeg use stdout
if _stderr:
print(_stderr.decode("utf-8"))
if proc.returncode != 0:
raise RuntimeError(
"Failed to render '{}': {}'".format(output, command)