mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Compare commits
1 Commits
532adf84e6
...
83158484c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83158484c1 |
@ -11,7 +11,7 @@ joserfc == 1.2.*
|
|||||||
cryptography == 44.0.*
|
cryptography == 44.0.*
|
||||||
pathvalidate == 3.3.*
|
pathvalidate == 3.3.*
|
||||||
markupsafe == 3.0.*
|
markupsafe == 3.0.*
|
||||||
python-multipart == 0.0.26
|
python-multipart == 0.0.20
|
||||||
# Classification Model Training
|
# Classification Model Training
|
||||||
tensorflow == 2.19.* ; platform_machine == 'aarch64'
|
tensorflow == 2.19.* ; platform_machine == 'aarch64'
|
||||||
tensorflow-cpu == 2.19.* ; platform_machine == 'x86_64'
|
tensorflow-cpu == 2.19.* ; platform_machine == 'x86_64'
|
||||||
|
|||||||
@ -39,10 +39,6 @@ This is a fork (with fixed errors and new features) of [original Double Take](ht
|
|||||||
|
|
||||||
[Frigate telegram](https://github.com/OldTyT/frigate-telegram) makes it possible to send events from Frigate to Telegram. Events are sent as a message with a text description, video, and thumbnail.
|
[Frigate telegram](https://github.com/OldTyT/frigate-telegram) makes it possible to send events from Frigate to Telegram. Events are sent as a message with a text description, video, and thumbnail.
|
||||||
|
|
||||||
## [kiosk-monitor](https://github.com/extremeshok/kiosk-monitor)
|
|
||||||
|
|
||||||
[kiosk-monitor](https://github.com/extremeshok/kiosk-monitor) is a Raspberry Pi watchdog that runs Chromium fullscreen on a Frigate dashboard (optionally with VLC on a second monitor for an RTSP camera stream), auto-restarts on frozen screens or unreachable URLs, and ships a Birdseye-aware Chromium helper that auto-sizes the grid to the display.
|
|
||||||
|
|
||||||
## [Periscope](https://github.com/maksz42/periscope)
|
## [Periscope](https://github.com/maksz42/periscope)
|
||||||
|
|
||||||
[Periscope](https://github.com/maksz42/periscope) is a lightweight Android app that turns old devices into live viewers for Frigate. It works on Android 2.2 and above, including Android TV. It supports authentication and HTTPS.
|
[Periscope](https://github.com/maksz42/periscope) is a lightweight Android app that turns old devices into live viewers for Frigate. It works on Android 2.2 and above, including Android TV. It supports authentication and HTTPS.
|
||||||
|
|||||||
6
docs/package-lock.json
generated
6
docs/package-lock.json
generated
@ -10904,9 +10904,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/express/node_modules/path-to-regexp": {
|
"node_modules/express/node_modules/path-to-regexp": {
|
||||||
"version": "0.1.13",
|
"version": "0.1.12",
|
||||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
||||||
"integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==",
|
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/express/node_modules/range-parser": {
|
"node_modules/express/node_modules/range-parser": {
|
||||||
|
|||||||
@ -310,10 +310,6 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
self._handle_custom_classification_update(topic, payload)
|
self._handle_custom_classification_update(topic, payload)
|
||||||
return
|
return
|
||||||
|
|
||||||
if topic == "config/genai":
|
|
||||||
self.config.genai = payload
|
|
||||||
self.genai_manager.update_config(self.config)
|
|
||||||
|
|
||||||
# Broadcast to all processors — each decides if the topic is relevant
|
# Broadcast to all processors — each decides if the topic is relevant
|
||||||
for processor in self.realtime_processors:
|
for processor in self.realtime_processors:
|
||||||
processor.update_config(topic, payload)
|
processor.update_config(topic, payload)
|
||||||
|
|||||||
@ -113,15 +113,6 @@ class OllamaClient(GenAIClient):
|
|||||||
schema = response_format.get("json_schema", {}).get("schema")
|
schema = response_format.get("json_schema", {}).get("schema")
|
||||||
if schema:
|
if schema:
|
||||||
ollama_options["format"] = self._clean_schema_for_ollama(schema)
|
ollama_options["format"] = self._clean_schema_for_ollama(schema)
|
||||||
logger.debug(
|
|
||||||
"Ollama generate request: model=%s, prompt_len=%s, image_count=%s, "
|
|
||||||
"has_format=%s, options=%s",
|
|
||||||
self.genai_config.model,
|
|
||||||
len(prompt),
|
|
||||||
len(images) if images else 0,
|
|
||||||
"format" in ollama_options,
|
|
||||||
{k: v for k, v in ollama_options.items() if k != "format"},
|
|
||||||
)
|
|
||||||
result = self.provider.generate(
|
result = self.provider.generate(
|
||||||
self.genai_config.model,
|
self.genai_config.model,
|
||||||
prompt,
|
prompt,
|
||||||
@ -129,24 +120,9 @@ class OllamaClient(GenAIClient):
|
|||||||
**ollama_options,
|
**ollama_options,
|
||||||
)
|
)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Ollama generate response: done=%s, done_reason=%s, eval_count=%s, "
|
f"Ollama tokens used: eval_count={result.get('eval_count')}, prompt_eval_count={result.get('prompt_eval_count')}"
|
||||||
"prompt_eval_count=%s, response_len=%s",
|
|
||||||
result.get("done"),
|
|
||||||
result.get("done_reason"),
|
|
||||||
result.get("eval_count"),
|
|
||||||
result.get("prompt_eval_count"),
|
|
||||||
len(result.get("response", "") or ""),
|
|
||||||
)
|
)
|
||||||
response_text = str(result["response"]).strip()
|
return str(result["response"]).strip()
|
||||||
if not response_text:
|
|
||||||
logger.warning(
|
|
||||||
"Ollama returned a blank response for model %s (done_reason=%s, "
|
|
||||||
"eval_count=%s). Check model output, ensure thinking is disabled.",
|
|
||||||
self.genai_config.model,
|
|
||||||
result.get("done_reason"),
|
|
||||||
result.get("eval_count"),
|
|
||||||
)
|
|
||||||
return response_text
|
|
||||||
except (
|
except (
|
||||||
TimeoutException,
|
TimeoutException,
|
||||||
ResponseError,
|
ResponseError,
|
||||||
|
|||||||
@ -80,23 +80,7 @@ class OpenAIClient(GenAIClient):
|
|||||||
and hasattr(result, "choices")
|
and hasattr(result, "choices")
|
||||||
and len(result.choices) > 0
|
and len(result.choices) > 0
|
||||||
):
|
):
|
||||||
message = result.choices[0].message
|
return str(result.choices[0].message.content.strip())
|
||||||
content = message.content
|
|
||||||
|
|
||||||
if not content:
|
|
||||||
# When reasoning is enabled for some OpenAI backends the actual response
|
|
||||||
# is incorrectly placed in reasoning_content instead of content.
|
|
||||||
# This is buggy/incorrect behavior — reasoning should not be
|
|
||||||
# enabled for these models.
|
|
||||||
reasoning_content = getattr(message, "reasoning_content", None)
|
|
||||||
if reasoning_content:
|
|
||||||
logger.warning(
|
|
||||||
"Response content was empty but reasoning_content was provided; "
|
|
||||||
"reasoning appears to be enabled and should be disabled for this model."
|
|
||||||
)
|
|
||||||
content = reasoning_content
|
|
||||||
|
|
||||||
return str(content.strip()) if content else None
|
|
||||||
return None
|
return None
|
||||||
except (TimeoutException, Exception) as e:
|
except (TimeoutException, Exception) as e:
|
||||||
logger.warning("OpenAI returned an error: %s", str(e))
|
logger.warning("OpenAI returned an error: %s", str(e))
|
||||||
|
|||||||
@ -711,44 +711,23 @@ def ffprobe_stream(ffmpeg, path: str, detailed: bool = False) -> sp.CompletedPro
|
|||||||
else:
|
else:
|
||||||
format_entries = None
|
format_entries = None
|
||||||
|
|
||||||
def run(rtsp_transport: Optional[str] = None) -> sp.CompletedProcess:
|
ffprobe_cmd = [
|
||||||
cmd = [ffmpeg.ffprobe_path]
|
ffmpeg.ffprobe_path,
|
||||||
if rtsp_transport:
|
"-timeout",
|
||||||
cmd += ["-rtsp_transport", rtsp_transport]
|
"1000000",
|
||||||
cmd += [
|
"-print_format",
|
||||||
"-timeout",
|
"json",
|
||||||
"1000000",
|
"-show_entries",
|
||||||
"-print_format",
|
f"stream={stream_entries}",
|
||||||
"json",
|
]
|
||||||
"-show_entries",
|
|
||||||
f"stream={stream_entries}",
|
|
||||||
]
|
|
||||||
if detailed and format_entries:
|
|
||||||
cmd.extend(["-show_entries", f"format={format_entries}"])
|
|
||||||
cmd.extend(["-loglevel", "error", clean_path])
|
|
||||||
try:
|
|
||||||
return sp.run(cmd, capture_output=True, timeout=6)
|
|
||||||
except sp.TimeoutExpired as e:
|
|
||||||
logger.info(
|
|
||||||
"ffprobe timed out while probing %s (transport=%s)",
|
|
||||||
clean_camera_user_pass(path),
|
|
||||||
rtsp_transport or "default",
|
|
||||||
)
|
|
||||||
return sp.CompletedProcess(
|
|
||||||
args=cmd,
|
|
||||||
returncode=1,
|
|
||||||
stdout=e.stdout or b"",
|
|
||||||
stderr=(e.stderr or b"") + b"\nffprobe timed out",
|
|
||||||
)
|
|
||||||
|
|
||||||
result = run()
|
# Add format entries for detailed mode
|
||||||
|
if detailed and format_entries:
|
||||||
|
ffprobe_cmd.extend(["-show_entries", f"format={format_entries}"])
|
||||||
|
|
||||||
# For RTSP: retry with explicit TCP transport if the first attempt failed
|
ffprobe_cmd.extend(["-loglevel", "error", clean_path])
|
||||||
# (default UDP may be blocked)
|
|
||||||
if result.returncode != 0 and clean_path.startswith("rtsp://"):
|
|
||||||
result = run(rtsp_transport="tcp")
|
|
||||||
|
|
||||||
return result
|
return sp.run(ffprobe_cmd, capture_output=True)
|
||||||
|
|
||||||
|
|
||||||
def vainfo_hwaccel(device_name: Optional[str] = None) -> sp.CompletedProcess:
|
def vainfo_hwaccel(device_name: Optional[str] = None) -> sp.CompletedProcess:
|
||||||
@ -845,23 +824,11 @@ async def get_video_properties(
|
|||||||
"-show_streams",
|
"-show_streams",
|
||||||
url,
|
url,
|
||||||
]
|
]
|
||||||
proc = None
|
|
||||||
try:
|
try:
|
||||||
proc = await asyncio.create_subprocess_exec(
|
proc = await asyncio.create_subprocess_exec(
|
||||||
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
*cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
|
||||||
)
|
)
|
||||||
try:
|
stdout, _ = await proc.communicate()
|
||||||
stdout, _ = await asyncio.wait_for(proc.communicate(), timeout=6)
|
|
||||||
except asyncio.TimeoutError:
|
|
||||||
logger.info(
|
|
||||||
"ffprobe timed out while probing %s (transport=%s)",
|
|
||||||
clean_camera_user_pass(url),
|
|
||||||
rtsp_transport or "default",
|
|
||||||
)
|
|
||||||
proc.kill()
|
|
||||||
await proc.wait()
|
|
||||||
return False, 0, 0, None, -1
|
|
||||||
|
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
return False, 0, 0, None, -1
|
return False, 0, 0, None, -1
|
||||||
|
|
||||||
|
|||||||
14
web/package-lock.json
generated
14
web/package-lock.json
generated
@ -54,7 +54,7 @@
|
|||||||
"immer": "^10.1.1",
|
"immer": "^10.1.1",
|
||||||
"js-yaml": "^4.1.1",
|
"js-yaml": "^4.1.1",
|
||||||
"konva": "^10.2.3",
|
"konva": "^10.2.3",
|
||||||
"lodash": "^4.18.1",
|
"lodash": "^4.17.23",
|
||||||
"lucide-react": "^0.577.0",
|
"lucide-react": "^0.577.0",
|
||||||
"monaco-yaml": "^5.4.1",
|
"monaco-yaml": "^5.4.1",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
@ -9636,15 +9636,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.18.1",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lodash-es": {
|
"node_modules/lodash-es": {
|
||||||
"version": "4.18.1",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lodash.merge": {
|
"node_modules/lodash.merge": {
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
"immer": "^10.1.1",
|
"immer": "^10.1.1",
|
||||||
"js-yaml": "^4.1.1",
|
"js-yaml": "^4.1.1",
|
||||||
"konva": "^10.2.3",
|
"konva": "^10.2.3",
|
||||||
"lodash": "^4.18.1",
|
"lodash": "^4.17.23",
|
||||||
"lucide-react": "^0.577.0",
|
"lucide-react": "^0.577.0",
|
||||||
"monaco-yaml": "^5.4.1",
|
"monaco-yaml": "^5.4.1",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
|
|||||||
@ -415,7 +415,7 @@
|
|||||||
"audioCodecGood": "Audio codec is {{codec}}.",
|
"audioCodecGood": "Audio codec is {{codec}}.",
|
||||||
"resolutionHigh": "A resolution of {{resolution}} may cause increased resource usage.",
|
"resolutionHigh": "A resolution of {{resolution}} may cause increased resource usage.",
|
||||||
"resolutionLow": "A resolution of {{resolution}} may be too low for reliable detection of small objects.",
|
"resolutionLow": "A resolution of {{resolution}} may be too low for reliable detection of small objects.",
|
||||||
"resolutionUnknown": "The resolution of this stream could not be probed. You should manually set the detect resolution in Settings or your config.",
|
"resolutionUnknown": "The resolution of this stream could not be probed. This will cause issues on startup. You should manually set the detect resolution in Settings or your config.",
|
||||||
"noAudioWarning": "No audio detected for this stream, recordings will not have audio.",
|
"noAudioWarning": "No audio detected for this stream, recordings will not have audio.",
|
||||||
"audioCodecRecordError": "The AAC audio codec is required to support audio in recordings.",
|
"audioCodecRecordError": "The AAC audio codec is required to support audio in recordings.",
|
||||||
"audioCodecRequired": "An audio stream is required to support audio detection.",
|
"audioCodecRequired": "An audio stream is required to support audio detection.",
|
||||||
|
|||||||
@ -17,9 +17,6 @@ import { useUserPersistence } from "@/hooks/use-user-persistence";
|
|||||||
import { Skeleton } from "../ui/skeleton";
|
import { Skeleton } from "../ui/skeleton";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import { FaCircleCheck } from "react-icons/fa6";
|
import { FaCircleCheck } from "react-icons/fa6";
|
||||||
import { FaExclamationTriangle } from "react-icons/fa";
|
|
||||||
import { MdOutlinePersonSearch } from "react-icons/md";
|
|
||||||
import { ThreatLevel } from "@/types/review";
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { getTranslatedLabel } from "@/utils/i18n";
|
import { getTranslatedLabel } from "@/utils/i18n";
|
||||||
@ -130,11 +127,6 @@ export function AnimatedEventCard({
|
|||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
const threatLevel = useMemo<ThreatLevel>(
|
|
||||||
() => (event.data.metadata?.potential_threat_level ?? 0) as ThreatLevel,
|
|
||||||
[event],
|
|
||||||
);
|
|
||||||
|
|
||||||
const aspectRatio = useMemo(() => {
|
const aspectRatio = useMemo(() => {
|
||||||
if (
|
if (
|
||||||
!config ||
|
!config ||
|
||||||
@ -160,15 +152,7 @@ export function AnimatedEventCard({
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className="pointer-events-none absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100"
|
||||||
"absolute left-2 top-1 z-40 transition-opacity",
|
|
||||||
threatLevel === ThreatLevel.SECURITY_CONCERN &&
|
|
||||||
"pointer-events-auto bg-severity_alert opacity-100 hover:bg-severity_alert",
|
|
||||||
threatLevel === ThreatLevel.NEEDS_REVIEW &&
|
|
||||||
"pointer-events-auto bg-severity_detection opacity-100 hover:bg-severity_detection",
|
|
||||||
threatLevel === ThreatLevel.NORMAL &&
|
|
||||||
"pointer-events-none bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100",
|
|
||||||
)}
|
|
||||||
size="xs"
|
size="xs"
|
||||||
aria-label={t("markAsReviewed")}
|
aria-label={t("markAsReviewed")}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@ -176,13 +160,7 @@ export function AnimatedEventCard({
|
|||||||
updateEvents();
|
updateEvents();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{threatLevel === ThreatLevel.SECURITY_CONCERN ? (
|
<FaCircleCheck className="size-3 text-white" />
|
||||||
<FaExclamationTriangle className="size-3 text-white" />
|
|
||||||
) : threatLevel === ThreatLevel.NEEDS_REVIEW ? (
|
|
||||||
<MdOutlinePersonSearch className="size-3 text-white" />
|
|
||||||
) : (
|
|
||||||
<FaCircleCheck className="size-3 text-white" />
|
|
||||||
)}
|
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
||||||
|
|||||||
@ -389,7 +389,7 @@ export default function LiveCameraView({
|
|||||||
return "mse";
|
return "mse";
|
||||||
}, [lowBandwidth, mic, webRTC, isRestreamed]);
|
}, [lowBandwidth, mic, webRTC, isRestreamed]);
|
||||||
|
|
||||||
useKeyboardListener(["m", "Escape"], (key, modifiers) => {
|
useKeyboardListener(["m"], (key, modifiers) => {
|
||||||
if (!modifiers.down) {
|
if (!modifiers.down) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -407,12 +407,6 @@ export default function LiveCameraView({
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Escape":
|
|
||||||
if (!fullscreen) {
|
|
||||||
navigate(-1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user