# Set up Camera raspi-config # go to Interface, and enable camera reboot ls -lh /dev/video* raspistill -v -o test.jpg # Verify camera works # Remove Swap File sudo systemctl stop dphys-swapfile.service sudo systemctl disable dphys-swapfile.service sudo systemctl mask dphys-swapfile.service sudo rm /var/swap # add zram for swap sudo apt-get install zram-tools sed -i 's\.*ALLOCATION=.*\ALLOCATION=100\g' /etc/default/zramswap sudo systemctl enable zramswap sudo systemctl restart zramswap # Set up ntp sudo apt-get install ntp sudo timedatectl set-timezone America/Chicago # add base packages needed sudo apt install \ liblivemedia-dev liblog4cpp5-dev libasound2-dev git gdebi-core cmake build-essential v4l-utils # get and build v4l2... git clone https://github.com/mpromonet/v4l2rtspserver cd v4l2rtspserver cmake . make sudo make install # do the install sudo gdebi v4l2rtspserver-0.2.0-6-g3542b6f-Linux-armv6l.deb # create systemd module cat </etc/systemd/system/v4l2rtspserver.service # 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 1280 -H 720 #ExecReload=/bin/kill -HUP $MAINPID Type=simple User=root Group=video Restart=always [Install] WantedBy=multi-user.target EOF # enable the service sudo systemctl enable --now v4l2rtspserver.service