FreeBSD motion with few camera

Foscam FI9828P+V2, Camera outdoor

Foscam FI9821W-v2, camera indoor

WansView model W4, Camera 1080P

WansView model W2, Camera 1080P (sortie motion, exemple jardin)

Yoluke 5MP 20x Zoom Optique, Audio Bidirectionnel (sortie motion, exemple parking)

Exemple:

record video MP4 with audio in case of motion:

DIR=/motion/fdp-parking_log
DHMSF=`date +"%Y%m%d%H%M%S"`
# ffmpeg record 4 minutes video high resolution,
# transcode audio (pcm_alaw) because pcm_alaw is not supported in .mp4
# NOTE: need to use tcp transport because ffmpeg drop frame with HD camera @12fps :(
# no drop frame with VLC but ugly commande line syntax (and pb with end time)
/usr/local/bin/ffmpeg -hide_banner -loglevel quiet -stats -y \
-rtsp_transport tcp -rtbufsize 3000k -i rtsp://192.168.0.63:554/11 -c:a aac \
-vcodec copy -t 240 -movflags +faststart "$DIR/.parking-$DHMSF-ffmpeg.mp4" &