Hi I am setting up a pi to record effectively continuously with 24 1 hour videos recorded in a day. Automating this recording with systemd is mostly working as intended but I was hoping to find a method of capturing footage that would be mostly unaffected by an unexpected shutdown.
I did see that a video could be saved into segments with the
--segment option and then I supposed these could be recombined but this somewhat misses why I wanted the day broken into 1 hour videos and might introduce unneeded complications.
Currently I am using:
libcamera-vid -t $filmDuration --framerate 5 --width 960 --height 720 --nopreview --codec libav --libav-format mp4 -o $(date +%Y%m%d_%H%M.mp4) --tuning-file /usr/share/libcamera/ipa/raspberrypi/imx219_noir.json
I am happy enough with the footage it captures but an interruption to the capture seems to corrupt the video and it becomes unplayable.
Any advice if and how this would be possible would be great or any other notes on my usage of libcamera too.