Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

checkStream is an async function that determines if an RTSP stream is running by using the ffprobe command to check for codec and duration information.

License

Notifications You must be signed in to change notification settings

zenzig/checkStream

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

checkStream

GitHub code size in bytes GitHub package.json version npm

checkStream is an async function that determines if an RTSP stream is running by using the ffprobe command to check for codec and duration information.

Installation

To use checkStream you must have nodejs and ffprobe installed on your system.

NPM

$ npm i @zenzig/checkstream

Usage

const checkStream = require('checkstream');

async function main() {
  try {
    const result = await checkStream('rtsp://demo:demo@ipvmdemo.dyndns.org:5541/onvif-media/media.amp?profile=profile_1_h264&sessiontimeout=60&streamtype=unicast');
    console.log(result);
  } catch (error) {
    console.error(error);
  }
}

main();

Output

If codec and duration information is found in the stream, checkStream will return true. If the information is not found, or if the ffprobe command times out, checkStream will return false or throw an error, respectively.

License

This project is licensed under the MIT License.

About

checkStream is an async function that determines if an RTSP stream is running by using the ffprobe command to check for codec and duration information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.