Maybe you have to dig in the specs a little no the latest tech, but my cheap Dahua IP cam has a lot of neat features built in. RTSP/HTTP(S)/FTP (with built-in snapshot timing) and motion detection.
It can work for your setup, but there are easier ways to do what you want without ffmpeg scripting.