diff --git a/frigate/http.py b/frigate/http.py index 722a1447c..6ac46f429 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -630,7 +630,7 @@ def ffprobe(camera_name): else: output += "error getting stream\n" - return output + return jsonify(output, "200") else: # user has single stream ffprobe = ffprobe_stream(config.ffmpeg.inputs[0].path) @@ -643,9 +643,7 @@ def ffprobe(camera_name): "500", ) else: - return jsonify( - {"success": True, "message": ffprobe}, "200" - ) + return jsonify(ffprobe, "200") @bp.route("/") diff --git a/web/src/routes/Debug.jsx b/web/src/routes/Debug.jsx index 494044c93..c20f63fbe 100644 --- a/web/src/routes/Debug.jsx +++ b/web/src/routes/Debug.jsx @@ -5,6 +5,7 @@ import Heading from '../components/Heading'; import Link from '../components/Link'; import { useMqtt } from '../api/mqtt'; import useSWR from 'swr'; +import axios from 'axios'; import { Table, Tbody, Thead, Tr, Th, Td } from '../components/Table'; import { useCallback } from 'preact/hooks'; @@ -32,6 +33,18 @@ export default function Debug() { copy(); }, [config]); + const onCopyFfprobe = async (camera, e) => { + if (e) { + e.stopPropagation(); + } + + const response = await axios.get(`${camera}/ffprobe`); + + if (response.status === 200) { + await window.navigator.clipboard.writeText(JSON.stringify(response.data, null, 2)); + } + }; + return (
@@ -76,9 +89,9 @@ export default function Debug() {
{camera.replaceAll('_', ' ')} -
- ffprobe -
+