Try this Record Vidéo from ESP32_Cam (config with EspHome) in hassio works great!
EDIT or Not working to do snapshot or recording using ESP32 CAM