From 7677c97d53c490163deb1ad1eb7004de595cb753 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 2 Jun 2025 08:15:43 -0500 Subject: [PATCH] Video tab tweaks With the changes in https://github.com/blakeblackshear/frigate/pull/18220, the video tab in the Tracked Object Details pane now correctly trims the in-browser HLS video. Because of keyframes and record/detect stream differences, we can manually subtract a couple of seconds from the event start_time to ensure the first few frames aren't cut off from the video --- web/src/components/overlay/detail/SearchDetailDialog.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index 28ef5c45b..521ddde66 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -1231,7 +1231,9 @@ export function VideoTab({ search }: VideoTabProps) { ]); const endTime = useMemo(() => search.end_time ?? Date.now() / 1000, [search]); - const source = `${baseUrl}vod/${search.camera}/start/${search.start_time}/end/${endTime}/index.m3u8`; + // subtract 2 seconds from start_time to account for keyframes and any differences in the record/detect streams + // to help the start of the event from not being completely cut off + const source = `${baseUrl}vod/${search.camera}/start/${search.start_time - 2}/end/${endTime}/index.m3u8`; return ( <>