Add camera metadata and fix preview chapters

This commit is contained in:
Nicolas Mowen 2026-06-09 07:26:27 -06:00
parent 28e3e1ec74
commit f10605b53c

View File

@ -358,6 +358,8 @@ class RecordingExporter(threading.Thread):
f"title={title}", f"title={title}",
"-metadata", "-metadata",
f"creation_time={creation_time}", 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: if self.playback_factor == PlaybackFactorEnum.realtime:
ffmpeg_cmd = ( 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(" ") ).split(" ")
elif self.playback_factor == PlaybackFactorEnum.timelapse_25x: elif self.playback_factor == PlaybackFactorEnum.timelapse_25x:
ffmpeg_cmd = ( ffmpeg_cmd = (
@ -443,7 +445,7 @@ class RecordingExporter(threading.Thread):
self.config.ffmpeg.ffmpeg_path, self.config.ffmpeg.ffmpeg_path,
self.config.ffmpeg.hwaccel_args, self.config.ffmpeg.hwaccel_args,
f"{TIMELAPSE_DATA_INPUT_ARGS} {ffmpeg_input}", 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, EncodeTypeEnum.timelapse,
) )
).split(" ") ).split(" ")
@ -459,9 +461,13 @@ class RecordingExporter(threading.Thread):
f"title={title}", f"title={title}",
"-metadata", "-metadata",
f"creation_time={creation_time}", f"creation_time={creation_time}",
"-metadata",
f"comment=Camera: {self.camera}",
] ]
) )
ffmpeg_cmd.append(video_path)
return ffmpeg_cmd, playlist_lines return ffmpeg_cmd, playlist_lines
def run(self) -> None: def run(self) -> None: