mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Return full output of ffprobe process
This commit is contained in:
parent
ff45b6dbe1
commit
f294ec1ca1
@ -624,31 +624,31 @@ def ffprobe(camera_name):
|
||||
|
||||
if len(config.ffmpeg.inputs) > 1:
|
||||
# user has multiple streams
|
||||
output = ""
|
||||
output = []
|
||||
|
||||
for input in config.ffmpeg.inputs:
|
||||
output += f"{input.roles}\n"
|
||||
ffprobe = ffprobe_stream(input.path)
|
||||
|
||||
if ffprobe:
|
||||
output += f"{ffprobe}\n"
|
||||
else:
|
||||
output += "error getting stream\n"
|
||||
output.append(
|
||||
{
|
||||
"input_roles": input.roles,
|
||||
"return_code": ffprobe.returncode,
|
||||
"stderr": ffprobe.stderr,
|
||||
"stdout": ffprobe.stdout,
|
||||
}
|
||||
)
|
||||
|
||||
return jsonify(output, "200")
|
||||
else:
|
||||
# user has single stream
|
||||
ffprobe = ffprobe_stream(config.ffmpeg.inputs[0].path)
|
||||
if not ffprobe:
|
||||
return jsonify(
|
||||
{
|
||||
"success": False,
|
||||
"message": f"ffprobe unable to get info for {camera_name}",
|
||||
},
|
||||
"500",
|
||||
"input_roles": config.ffmpeg.inputs[0].roles,
|
||||
"return_code": ffprobe.returncode,
|
||||
"stderr": ffprobe.stderr,
|
||||
"stdout": ffprobe.stdout,
|
||||
}
|
||||
)
|
||||
else:
|
||||
return jsonify(ffprobe, "200")
|
||||
|
||||
|
||||
@bp.route("/<camera_name>")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user