Installations
npm install nv-node-rtsp-recorder
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
21.5.0
NPM Version
10.2.4
Score
67.1
Supply Chain
91.9
Quality
82.6
Maintenance
100
Vulnerability
98.2
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
sahilchaddha
Download Statistics
Total Downloads
7,139
Last Day
7
Last Week
32
Last Month
202
Last Year
3,159
GitHub Statistics
66 Stars
11 Commits
27 Forks
6 Watching
1 Branches
2 Contributors
Bundle Size
344.53 kB
Minified
88.64 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.6.9
Package Id
nv-node-rtsp-recorder@1.6.9
Unpacked Size
36.17 kB
Size
24.95 kB
File Count
13
NPM Version
10.2.4
Node Version
21.5.0
Publised On
20 Apr 2024
Total Downloads
Cumulative downloads
Total Downloads
7,139
Last day
600%
7
Compared to previous day
Last week
128.6%
32
Compared to previous week
Last month
329.8%
202
Compared to previous month
Last year
-20.6%
3,159
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Dev Dependencies
3
node-rtsp-recorder
RTSP Stream Recorder.
Records RTSP Audio/Visual Streams to local disk using ffmpeg
Installation
1 $ npm install --save node-rtsp-recorder
Recording Video
1 const Recorder = require('node-rtsp-recorder').Recorder
2
3 var rec = new Recorder({
4 url: 'rtsp://192.168.1.12:8554/unicast',
5 timeLimit: 60, // time in seconds for each segmented video file
6 folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
7 name: 'cam1',
8 })
9 // Starts Recording
10 rec.startRecording();
11
12 setTimeout(() => {
13 console.log('Stopping Recording')
14 rec.stopRecording()
15 rec = null
16 }, 300000)
If your camera generates empty .mp4 files when recording, you might need to update its audio codec by passing in one usable by your camera (e.g.,
aac
) in the Recorder's constructor. For example:
1 var rec = new Recorder({
2 url: 'rtsp://192.168.1.12:8554/unicast',
3 timeLimit: 60, // time in seconds for each segmented video file
4 folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
5 name: 'cam1',
6 audioCodec: 'aac'
7 })
Recording Audio
1 const Recorder = require('node-rtsp-recorder').Recorder
2
3 var rec = new Recorder({
4 url: 'rtsp://192.168.1.12:8554/unicast',
5 timeLimit: 60, // time in seconds for each segmented video file
6 folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
7 name: 'cam1',
8 type: 'audio',
9 })
10
11 rec.startRecording();
12
13 setTimeout(() => {
14 console.log('Stopping Recording')
15 rec.stopRecording()
16 rec = null
17 }, 125000)
Capturing Image
1 const Recorder = require('node-rtsp-recorder').Recorder
2
3 var rec = new Recorder({
4 url: 'rtsp://192.168.1.12:8554/unicast',
5 folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
6 name: 'cam1',
7 type: 'image',
8 })
9
10 rec.captureImage(() => {
11 console.log('Image Captured')
12 })
Managing Media Directory
1 const FileHandler = require('../src/helpers/fileHandler') 2 const fh = new FileHandler() 3 // RETURNS DIRECTORY SIZE 4 fh.getDirectorySize('/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos/', (err, value) => { 5 if (err) { 6 console.log('Error Occured') 7 console.log(err) 8 return true 9 } 10 console.log('Folder Size is ' + value) 11 }) 12 // REMOVES ALL MEDIA FILES 13 fh.removeDirectory('/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos/*', () => { 14 console.log('Done') 15 })
Setting custom filename formats
1 const Recorder = require('node-rtsp-recorder').Recorder
2
3 var rec = new Recorder({
4 url: 'rtsp://192.168.1.12:8554/unicast',
5 timeLimit: 60, // time in seconds for each segmented video file
6 folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
7 name: 'cam1',
8 directoryPathFormat: 'MMM-D-YYYY',
9 fileNameFormat: 'M-D-h-mm-ss',
10 })
11 // Default directoryPathFormat : MMM-Do-YY
12 // Default fileNameFormat : YYYY-M-D-h-mm-ss
13 // Refer to https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/ for custom formats.
14 // Starts Recording
15 rec.startRecording();
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/10 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
22 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-3gx7-xhv7-5mx3
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4
- Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
Score
1.4
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More