Print stdout AND stderr

This commit is contained in:
Nexus 2024-08-01 19:05:03 +01:00
parent ffabacfdc2
commit ec0ce48c68
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -105,10 +105,8 @@ class TruthSocialTranscode(niobot.Module):
)
args = [
"ffmpeg",
# "-hwaccel",
# "auto",
"-v",
"error",
"warning"
"-i",
temp_fd.name,
"-c:v",
@ -149,7 +147,11 @@ class TruthSocialTranscode(niobot.Module):
stdout, stderr = await transcode.communicate()
self.log.info("Finished transcode.")
if transcode.returncode != 0:
self.log.error("Error transcoding video:\n%s", stderr.decode("utf-8"))
self.log.error(
"Error transcoding video:\n%s\n\n%s",
stderr.decode("utf-8"),
stdout.decode("utf-8")
)
await self.bot.send_message(
room,
"Error transcoding video, unable to transcode: got return code %d" % transcode.returncode,