Recoding locally camera streams via Fully Kiosk

I am working on a new project planning to decommissionn cloud based security camera services and have all run locally using home assistant

the first scenario is as follow:

I have [Fully Kiosk] setup on a tablet and and can view live stream of it’s hardware camera on home assistant.

  1. I would like to record a video for x seconds locally on home assistant once motion is detected
  2. Keep recordings for x days after that delete the saved files or after exeeding a specific storage size