Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
killall omxplayer.bin || true
# A four camera grid on a 1920x1080 monitor.
screen -dmS topleft sh -c 'omxplayer --win "0 0 960 540" -n -1 --avdict rtsp_transport:tcp "YOUR_RTSP_FEED"; exec bash'
screen -dmS topright sh -c 'omxplayer --win "960 0 1920 540" -n -1 --avdict rtsp_transport:tcp "rtsp://YOUR_RTSP_FEED"; exec bash'
[Unit]
Description=UNVR Cams
After=network.target
[Service]
ExecStart=bash /usr/local/bin/unvr-cams.sh
User=pi
ExecStop=/usr/bin/killall omxplayer
[Install]
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16