FFmpeg black frame detection
If you want to remove black frames from your Timelapse sequence you are encoding with FFmpeg it is best to take a two pass approach first filter out the black or corrupted frames then encode the remainder
In Linux this condition will sort the frames out
if [ $(/usr/bin/nvidia/ffmpeg/ffmpeg -hide_banner -loglevel info -nostats -i "$i" -vf blackframe=amount=0 -an -f null - 2>&1 | grep -oP 'pblack:\K\d+' ) -ge 85 ]; then