NodeJS Installation
Prerequisites
In order to run Nest RTSP, you must have the following installed:
- NodeJS Version >=
16
- FFmpeg
- Google Chrome Only required if using Google Nest Cam (outdoor or indoor, battery), Google Nest Doorbell (battery) or the Google Nest Cam with floodlights
You will also need to source the following information which will be stored as environmental variables:
Description | Environmental Variable | Source |
---|---|---|
Google OAuth Client ID | GA_OAUTH_CID | Google Cloud Platform Developers Console |
Google OAuth Client Secret | GA_OAUTH_CS | Google Cloud Platform Developers Console |
Google SDM Project ID | GA_SDM_PID | Device Access Console |
Google OAuth Redirect URL | GA_OAUTH_RDR |
Hostname which is able to access the machine. Needs to match one of the Authorized redirect URIs provided to the Google OAuth Consent Screen. (e.g. http://nrtsp.mydomain.local:3000 )
|
It is also recommended that you use the PM2 process manager to daemonize Nest RTSP.
Download Nest RTSP
You can download Nest RTSP as a pre-packaged release, or you can clone the Git Repository.
Install dependancies
Once you have the files downloaded, you will need to install the dependancies. From inside the folder which contains the code for Nest RTSP, run the following command:
Create the Environment file
At this point, we need to create a file in the folder which contains the code for Nest RTSP called .env
. It must contain at minimum the following values:
Description | Environmental Variable | Source |
---|---|---|
Google OAuth Client ID | GA_OAUTH_CID | Google Cloud Platform Developers Console |
Google OAuth Client Secret | GA_OAUTH_CS | Google Cloud Platform Developers Console |
Google SDM Project ID | GA_SDM_PID | Device Access Console |
Google OAuth Redirect URL | GA_OAUTH_RDR |
Hostname which is able to access the machine. Needs to match one of the Authorized redirect URIs provided to the Google OAuth Consent Screen. (e.g. http://nrtsp.mydomain.local:3000 )
|
Additionally, you can specify the following optional environmental variables per your own specifications:
Description | Environmental Variable | Default |
---|---|---|
HTTP GUI Port | HTTP_PORT |
3000
|
RTSP Port which will be published for clients | RTSP_CLIENT_PORT |
554
|
RTSP Port which ffmpeg will stream to | RTSP_SERVER_PORT |
6554
|
RTSP RTP Port Start | RTSP_RTP_START |
10000
|
RTSP RTP Port Count | RTSP_RTP_COUNT |
10000
|
Knex.js Database Connection Configuration | DB_CONFIG | "{\"client\":\"better-sqlite3\",\"connection\":{\"filename\":\"{{BASE}}/nest-rtsp.sqlite\"}}" |
Output debug content to console | DEBUG | |
The resolution width to output WebRTC videos in | WEBRTC_RESOLUTION_WIDTH |
640
|
The resolution height to output WebRTC videos in | WEBRTC_RESOLUTION_HEIGHT |
480
|
Run the database migration
Before running the server, you will need to perform a database migration using the following command:
Installation Complete
You can now run Nest RTSP. Here are some examples of how: