Raspberry Pi Read Only System with Overlay FS

View Video Stream (e.g. Security Camera) on a Raspberry Pi with Read Only System: https://youtu.be/sFBE5Kusjx8

Raspberry Pi Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZPvIdR5BEqDgO7DsGAla_AZ

CanaKit Raspberry Pi 4 (4GB) Starter Kit (Amazon Affiliate)
US: https://amzn.to/3azJgrW
UK: https://amzn.to/2JdMq9o
CA: https://amzn.to/3bwiRvY
ES: https://amzn.to/2T06LnM (similar)
FR: https://amzn.to/3cvIZrs (similaire)
IT: https://amzn.to/2Ar74Sj (simile)
DE: https://amzn.to/2AqfWHQ (ähnlich)
IN: https://amzn.to/3ey6fWj
AU: https://amzn.to/2VTUt1C
NL: https://amzn.to/3f5NdsD (vergelijkbaar)

Raspberry Pi Downloads: https://www.raspberrypi.org/downloads/

View Video Stream (e.g. Security Camera) on a Raspberry Pi with Read Only System

Update apt packages
sudo apt update
Install omxplayer
sudo apt install omxplayer
Test Video Stream*
/usr/bin/omxplayer --win "961,541,1920,1080" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0"

* This is for an Amcrest IP camera. Look up the URL for your specific camera. You can remove ‘–win “961,541,1920,1080”‘ to make the video full screen. “subtype=0” is high bitrate stream. “subtype=1” is low bitrate stream.

Close Video Stream

Control-c to stop

Create Video Script
nano video.sh
#!/bin/bash

/usr/bin/omxplayer --win "961,541,1920,1080" "rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0"

Control-o to save, Control-x to exit

Make the script executable
chmod +x video.sh
Run Script
./video.sh

Control-c to stop

Move into Systemd Service Directory
cd /etc/systemd/system
Create Video Service
sudo nano video.service
[Unit]
Description=Video Service
After=network.target

[Service]
Type=simple
User=pi
Group=pi
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
ExecStart=/home/pi/video.sh
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

Control-o to save, Control-x to exit

Enable Service
sudo systemctl enable video
Start Service
sudo systemctl start video
Temporarily Stop Video
sudo killall omxplayer
Adafruit Read Only Instructions*

https://learn.adafruit.com/read-only-raspberry-pi

* You can now enable OverlayFS as an alternative to these read only instructions. Go to raspi-config > Advanced Options > Overlay FS and enable it. This will make the system read only. You can undo and redo this if you need to make changes to the system.

New Raspberry Pi Imager Software

Raspberry Pi Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZPvIdR5BEqDgO7DsGAla_AZ

Raspberry Pi Downloads: https://www.raspberrypi.org/downloads/

CanaKit Raspberry Pi 4 (4GB) Starter Kit (Amazon Affiliate)
US: https://amzn.to/3azJgrW
UK: https://amzn.to/2JdMq9o
CA: https://amzn.to/3bwiRvY
ES: https://amzn.to/2T06LnM (similar)
FR: https://amzn.to/3cvIZrs (similaire)
IT: https://amzn.to/2Ar74Sj (simile)
DE: https://amzn.to/2AqfWHQ (ähnlich)
IN: https://amzn.to/3ey6fWj
AU: https://amzn.to/2VTUt1C
NL: https://amzn.to/3f5NdsD (vergelijkbaar)