0

I use the ffmpeg library to record audio and video. If a power failure occurs, the video file becomes 0 bytes. How can I record, so as not to lose data?

my ffmpeg configuration

ffmpeg \
-hide_banner \
-y \
-f alsa \
-thread_queue_size 1024 \
-i hw:1 \
-f v4l2 \
-video_size 720x480 \
-noautorotate \
-i /dev/video0 \
-vf "transpose=clock" \
-metadata:s:v:0 rotate=0 \
-filter:a aresample=async=1 \
-q:v 4 \
-t 86400 \
/home/pi/out.avi
  • Well do "incremental backup", say every 5 seconds, create a new file and copy the old file stuff to it, still using the old file. So you lose at most 5 seconds data, ... – tlfong01 Jun 13 at 1:09
  • i think that the problem is that the ffmpeg utility records into memory – jsotola Jun 14 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.