Make ffprobe button show dialog with output and option to copy

This commit is contained in:
Nick Mowen 2022-11-10 07:13:10 -07:00
parent 1337c78ef8
commit 2bf706cf4b

View File

@ -632,21 +632,21 @@ def ffprobe(camera_name):
{ {
"input_roles": input.roles, "input_roles": input.roles,
"return_code": ffprobe.returncode, "return_code": ffprobe.returncode,
"stderr": ffprobe.stderr, "stderr": ffprobe.stderr.decode().strip(),
"stdout": ffprobe.stdout, "stdout": ffprobe.stdout.decode().strip(),
} }
) )
return jsonify(output) return jsonify(output)
else: else:
# user has single stream # user has single stream
ffprobe = ffprobe_stream(config.ffmpeg.inputs[0].path) ffprobe: sp.CompletedProcess = ffprobe_stream(config.ffmpeg.inputs[0].path)
return jsonify( return jsonify(
{ {
"input_roles": config.ffmpeg.inputs[0].roles, "input_roles": config.ffmpeg.inputs[0].roles,
"return_code": ffprobe.returncode, "return_code": ffprobe.returncode,
"stderr": ffprobe.stderr, "stderr": ffprobe.stderr.decode().strip(),
"stdout": ffprobe.stdout, "stdout": ffprobe.stdout.decode().strip(),
} }
) )