pi_video_recording
v1.0.1
Published
Module for raspberry-pi video recording & live
Readme
PI VIDEO RECORDING & LIVE
Raspbian with raspivid
Enable camera on raspberry
sudo raspi-config
Then -> Interface options -> Camera -> Enabled ? Yes
VLC Installation
sudo apt-get install vlc
avconv to convert from h264 to mp4
sudo apt-get install libav-tools
Conf
In config.json, you can specify :
{
"allowedOrigins": [
"*"
],
"port": 5000,
"livePort": 5002,
"recordTimeout": 610000,
"writePath": "/tmp",
"size": {
"width": 900,
"height": 1600
}
}Launch server
npm start
Requests
GET :
/api/To check if the server is running.
GET :
/api/stateTo know the current state of the server.
POST :
/api/live/startTo start the live streaming
POST :
/api/live/stopTo stop the live streaming
POST :
/api/record/start filenamefilename: name of your recording file
To start the recording.
POST :
/api/record/stopTo stop the recording -> also encoding from h264 to mp4 (can take some time)
