From f10605b53ce0c293686d73a3c0c01e82b7b22949 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 9 Jun 2026 07:26:27 -0600 Subject: [PATCH] Add camera metadata and fix preview chapters --- frigate/record/export.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frigate/record/export.py b/frigate/record/export.py index d5d5ddb766..a0644ea9b5 100644 --- a/frigate/record/export.py +++ b/frigate/record/export.py @@ -358,6 +358,8 @@ class RecordingExporter(threading.Thread): f"title={title}", "-metadata", f"creation_time={creation_time}", + "-metadata", + f"comment=Camera: {self.camera}", ] ) @@ -435,7 +437,7 @@ class RecordingExporter(threading.Thread): if self.playback_factor == PlaybackFactorEnum.realtime: ffmpeg_cmd = ( - f"{self.config.ffmpeg.ffmpeg_path} -hide_banner {ffmpeg_input} {codec} -movflags +faststart {video_path}" + f"{self.config.ffmpeg.ffmpeg_path} -hide_banner {ffmpeg_input} {codec} -movflags +faststart" ).split(" ") elif self.playback_factor == PlaybackFactorEnum.timelapse_25x: ffmpeg_cmd = ( @@ -443,7 +445,7 @@ class RecordingExporter(threading.Thread): self.config.ffmpeg.ffmpeg_path, self.config.ffmpeg.hwaccel_args, f"{TIMELAPSE_DATA_INPUT_ARGS} {ffmpeg_input}", - f"{self.config.cameras[self.camera].record.export.timelapse_args} -movflags +faststart {video_path}", + f"{self.config.cameras[self.camera].record.export.timelapse_args} -movflags +faststart", EncodeTypeEnum.timelapse, ) ).split(" ") @@ -459,9 +461,13 @@ class RecordingExporter(threading.Thread): f"title={title}", "-metadata", f"creation_time={creation_time}", + "-metadata", + f"comment=Camera: {self.camera}", ] ) + ffmpeg_cmd.append(video_path) + return ffmpeg_cmd, playlist_lines def run(self) -> None: