Motion Detection Server
Watch Apple HTTP Live Stream (HLS) and record to disc mp4 files containing the captured motions.
Usage
const motion = ; let detectServer = ffmpegPath: 'ffmpeg' ffprobePath: 'ffprobe' recordingsPath: './recorded';
REST API
You can controll the detect server using REST API:
let apiServer = detectServer;
API enables add, delete, start and stop.
http://localhost:1337/source/add
"systemName": "test" "name": "test" "sourceURL": "http://myLiveServer/live/myStream/index.m3u8"
http://localhost:1337/source/delete
"systemName": "test"
http://localhost:1337/source/start
"systemName": "test" "interval": 3 // in seconds, if not specified default is one second. "x": 100 // not supported yet, defaults to 0. "y": 100 // not supported yet, defaults to 0. "width": 100 // not supported yet, defaults to 0. "height": 100 // not supported yet, defaults to 0. "threshold": 30 // (between 1 and 50) defaults to 35, use higher value to increase sensitivity and lower value to decrease sensitivity. "maxIdleTime": 60 // time to wait since last segment detected to raise idle event (Used by RabbitMQ to remove the source).
http://localhost:1337/source/stop
"systemName": "test"
Web UI
You can controll the detect server using web UI:
let webServer = detectServer;
RabbitMQ Messages
You add sources through RabbitMQ:
let rabbitServer = detectServer;
RabbitMQ plugins supports only adding new source, once the source is idle it will be removed automatically.
Kaltura Integration
Kaltura plugin will automatically upload recorded files to your Kaltura account.
let kaltura = detectServer partnerId: 123 // replace with your Kaltura account id secret: 'your secret here';
Tools
To test Rabbit-MQ message, use utils/addRabbitMessage.js