|
1 year ago | |
---|---|---|
lib | 1 year ago | |
test | 1 year ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
index.js | 1 year ago | |
package.json | 1 year ago | |
yarn.lock | 1 year ago |
Raspberry Pi camera RTSP server tested on Pi Zero W using OV5647 module.
Hardware :
System : up-to-date Raspbian
Setting : camera interface enabled from raspi-config
Software :
bash
nodejs
raspivid
cvlc
from vlc
openRTSP
from livemedia-utils
No NodeJS dependancies.
camera.config
Settings Object
port
: RTSP server broadcasting port
8554
rotation
: image rotation
0
, available 90
180
270
(i.e. -90)camera.getStatus()
Checks if camera feed is active by the following conditions :
raspivid
(unique) process activeReturns Promise<Status{}>
Status
object :
enabled
(boolean) camera enabledmanually
(boolean) camera enabled manually, without API
camera.enable()
Enable camera. Returns Promise
camera.disable()
Disable camera.
All active records will be stopped first.
Returns Promise
new Record(file, overwrite)
file
(string) : file path + name.
$HOME
instead of ~
when applicable.overwrite
(boolean) : delete duplicate if exists.Record.start()
Start record.
Camera will be enabled if not already active.
Returns Promise
Record.stop()
Stop record.
Returns Promise
Record.file
Record file path + name
Record.duration
Record duration
Record.pid
Record process PID (integer)
Record.startTime
Record start time (Date
)
Record.stopTime
Record stop time (Date
)
Record.elapsedTime
Record elapsed time in (integer, seconds)
Record.recording
Record active state (boolean)
static Record.startAll()
Start all non-started records.
Returns Promise
static Record.stopAll()
Stop all active records.
Returns Promise
static Record.records
All records (array of Record
instances)
ffprobe
binary from ffmpeg
packageyarn install
test/config.json
with your video recording test folderyarn test
raspivid
)This project is licensed under GNU GPL v3.