I spent a lot of time trying to find some good software to run on a Raspberry Pi to turn it into a camera. Even tried to write my own using Perl, but all the libraries are in Python, so it took too much for a simple project.
I found the v4l2rtspserver (https://github.com/mpromonet/v4l2rtspserver) and decided to try it. The author has a good page, but assumes I knew how to configure ZoneMinder (which was mistaken).
Anyway, no GUI needed, so I did the Raspberry Pi OS Lite (https://www.raspberrypi.org/software/operating-systems/) and set it up, then did the following. Ended up with a pretty decent camera that is not “phoning home” with all your images.
country=US network={ ssid="your ssid" psk="your psk" }
raspi-config
# go to Interface, and enable camera
raspistill -v -o test.jpg
# get pre-req's apt -y install cmake liblog4cpp5-dev libv4l-dev git git clone https://github.com/mpromonet/v4l2rtspserver cd v4l2rtspserver cmake . make sudo make install
# systemd configuration for v4l2rtspserver # /etc/systemd/system/v4l2rtspserver.service [Unit] Description=v4l2rtspserver rtsp streaming server After=network.target [Service] #ExecStartPre=/usr/bin/v4l2-ctl --set-ctrl vertical_flip=1 ExecStartPre=/usr/bin/v4l2-ctl --set-ctrl h264_i_frame_period=5 ExecStart=/usr/local/bin/v4l2rtspserver -F 5 -W 640 -H 480 #ExecReload=/bin/kill -HUP $MAINPID Type=simple User=root Group=video Restart=always [Install] WantedBy=multi-user.target
systemctl start v4l2rtspserver
Create a new monitor in ZoneMinder with the following parameters
You should soon see the output in zoneminder.
For production, change the resolution of both the camera and the ZoneMinder configuration
# reload the systemctl daemon systemctl daemon-reload # reload the config for v4l2rtspserver systemctl restart v4l2rtspserver # Set v4l2rtspserver to autostart systemctl enable v4l2rtspserver