From 0709da0fd63b815957be178f988a230e61c08f23 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 15 Oct 2020 16:01:16 +0200 Subject: [PATCH] make sure ffmpeg output is printed out --- pype/scripts/otio_burnin.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pype/scripts/otio_burnin.py b/pype/scripts/otio_burnin.py index 5ff8c5a766..99611b172c 100644 --- a/pype/scripts/otio_burnin.py +++ b/pype/scripts/otio_burnin.py @@ -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)