The rtsp
extension adds support to take photos and videos over a RTSP stream. Works with any network camera that supports RTSP streaming.
This extension does not take an extension level config and is focused on interfaces.
Provides a camera to take photos or record videos from a rtsp stream.
Option | Type | Required | Description |
path | [String] | Yes | Full path where MudPi should save the images. Make sure proper write permissions are set. |
source | [String] | Yes | The full RTSP stream url. i.e. rtsp://username:password@192.168.1.1/stream1 |
filename | [String] | No | Name to save file as with either timestamp or photo count attached. i.e. {filename}-00001.jpg |
record_video | [Boolean] | No | Set to true to put camera in video mode. Default: False i.e. photo mode. |
delay | [Object] | No | The interval for the camera to take photos. Photo taken every X hours, X minutes, X Seconds. Default: 5 seconds |
delay.hours | [Integer] | No | Interval in hours for camera to wait between photos. Default 0 |
delay.minutes | [Integer] | No | Interval in minutes for camera to wait between photos. Default 0 |
delay.seconds | [Integer] | No | Interval in seconds for camera to wait between photos. Default 0 |
resolution | [Object] | No | The resolution to take photos at. Larger resolution = larger filesize. Can only support max resolution of camera. |
resolution.x | [Integer] | No | Width to save image at in pixels. Default 1920 |
resolution.y | [Integer] | No | Height to save image at in pixels. Default 1080 |
record_duration | [Integer] | No | Time in seconds to record videos for when in record mode. Default: 5 |
framerate | [Integer] | No | Framerate to set camera at. Default: 15 |
topic | [String] | No | Channel that MudPi broadcasts new images events on. Default: camera/{key} |
sequential_naming | [Boolean] | No | Set to true to save photos with a counter instead of timetamp. Default: False |
count_start | [Integer] | No | Number to start count at if using sequential_naming |
max_count | [Integer] | No | Max number of photos before overwriting if using sequential_naming |
Below is an example of a camera configuration.
"camera": [{
"key": "camera_1",
"interface": "rtsp",
"path":"/home/pi/images",
"source": "rtsp://admin:password@192.168.1.1/stream1"
"filename": "camera_1_capture",
"topic": "camera/camera_1",
"delay": {
"hours":0,
"minutes":10,
"seconds":0
},
"resolution": {
"x":1920,
"y":1080
},
"sequential_naming": true,
"count_start": 10,
"max_count": 100,
"record_video": false,
"record_duration": 5
}]