Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenVD committed Nov 1, 2015
1 parent 63cb962 commit 113f9fa
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
Expand Down Expand Up @@ -42,6 +43,7 @@ htmlcov/
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
Expand All @@ -55,3 +57,6 @@ docs/_build/

# PyBuilder
target/

# Pycharm
.idea
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# rpisurv
Raspberry Pi surveillance
# rpisurv - Raspberry pi surveillance
## Goal
Rpisurv is designed to be simple to use. The goal is to connect your raspberry pi 2 to a monitor, tell rpisurv which rtsp streams it should display and tell it the max number of "columns" of streams you want. It will then autocalculate the rest, like how many rows are needed etc ...

## Description
You can think of rpisurv as a wrapper for omxplayer with following features. Rpisurv uses omxplayer to fully make use of the GPU of the raspberry pi 2.

- Rpisurv implements a watchdog for every stream displayed, if the process gets killed somehow. It will try to restart the stream/process. This gives you a very robust surveillance screen.
- Autocalculcate coordinates for every stream displayed. The last stream defined will be stretched to make use of the complete screen but only if some pixels are unused.
- RTSP stream up/down detection and autorearrange of the screen layout. So for example if you stop a camera (or just stop the rtsp server on the camera), rpisurv will detects this and will recalculate/redraw the screen with the still available cameras. The same is true if a previous unconnectable rtsp stream becomes connectable. All without any user interaction.

## How to get started

- Get a monitor or a TV
- Get a raspberry pi 2 dedicated for rpisurv, and install raspbian on it. Make sure your monitor is operating at the correct resolution
- If you are going to have multiple streams, add gpu_mem=512 to your /boot/config.txt
- git clone this repository: git clone [email protected]:SvenVD/rpisurv.git
- run install.sh
- Get the correct rtsp stream url for your ip camera(s), there are some examples in /etc/rpisurv
- configure your rtsp streams in /etc/rpisurv.
- configure your max number of columns in /etc/rpisurv
- reboot

## Rpisurv in operation

If you used the install.sh script, you can configure your streams in /etc/rpisurv. Do not forget to reboot afterwards.

## Troubleshooting

I advise you to test your rtsp urls in vlc or omxplayer (command line) first. It should work in these applications before attempting to use them in rpisurv

If you used the install.sh script, logs are created at /usr/local/bin/rpisurv/logs/. You can use them for troubleshooting.

To start the screen without rebooting, run cd /usr/local/bin/rpisurv; python surveillance.py

0 comments on commit 113f9fa

Please sign in to comment.