# checkstream

> Takes an RTSP url as a parameter then uses ffprobe to determine URL has an active stream.

Latest version **2.0.0** (published 2022-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install checkstream
pnpm add checkstream
yarn add checkstream
bun add checkstream
```

Provides the command `check-stream`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-12-25 |
| First published | 2022-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Rich Olson |
| Maintainers | richolson |
| Keywords | checkStream, rtsp, utility |

## Links

- npm: https://www.npmjs.com/package/checkstream
- Repository: https://github.com/zenzig/checkStream
- Homepage: https://github.com/zenzig/checkStream#readme
- Issues: https://github.com/zenzig/checkStream/issues
- npm.io page: https://npm.io/package/checkstream

## Dependencies (1)

- [child_process](https://npm.io/package/child_process.md) ^1.0.2

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-12-25

## README

# checkStream

![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/zenzig/checkStream?style=plastic)
![GitHub package.json version](https://img.shields.io/github/package-json/v/zenzig/checkStream?color=3ded25&style=plastic)

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 will need to have nodejs and ffprobe installed on your system.

## NPM

```shell
$ 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.

---
_Source: https://npm.io/package/checkstream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
