diff --git a/custom_components/llmvision/media_handlers.py b/custom_components/llmvision/media_handlers.py index f37ab8c..9cab83f 100644 --- a/custom_components/llmvision/media_handlers.py +++ b/custom_components/llmvision/media_handlers.py @@ -347,8 +347,9 @@ async def add_videos(self, video_paths, event_ids, max_frames, target_width, inc ffmpeg_cmd = [ "ffmpeg", "-i", video_path, - "-vf", f"fps=1/{interval},select='eq(n\\,0)+not(mod(n\\,{interval}))'", os.path.join( - tmp_frames_dir, "frame%04d.jpg") + "-vf", f"fps=fps='source_fps',select='eq(n\\,0)+not(mod(n\\,{interval}))'", + "-fps_mode", "passthrough", + os.path.join(tmp_frames_dir, "frame%04d.jpg") ] # Run ffmpeg command await self.hass.loop.run_in_executor(None, os.system, " ".join(ffmpeg_cmd))