1.5.6 • Published 11 months ago

rtsp-to-hls-server v1.5.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

RTSP Stream to HLS Server Library

This Node.js library allows you to easily stream RTSP video to a HLS server. It supports H264 and is highly optimized and customizable.

Installation

To install this library, simply run:

npm install rtsp-to-hls-server

Usage

This code initializes a new instance of the Stream class with the specified parameters. The Stream class represents a video stream and is responsible for starting and stopping the stream.

This is a really simple abstraction for starting ffmpeg and use it with your own hls server

import * as HlsStream from "rtsp-to-hls-server";

const stream = await new HlsStream({
	name: `${port}`,
	ip: body.ip,
	streamUrl: rtspURL,
	streamMetadata: streamData,
	channel: channel,
	tempDir: tempPath,
	shouldStop: true, //boolean variable to indicate if timeout should kill the stream
	killTimeout: 10, // value in minutes for timeout to kill the stream
	customLogger: (message: string) => this.logger.log(message),
	ffmpegOptions: {
		"-c:v": "h264_amf",
		"-r": 25,
		"-threads": 1,
		"-flush_packets": 1,
		"-reconnect": 5,
		"-reconnect_at_eof": 1,
		"-timeout": 60,
		"-reconnect_streamed": 1,
		"-fflags": "nobuffer",
		"-rtsp_transport": rtspTransport ? rtspTransport : "tcp",
	},
});

License

This library is licensed under the MIT License.

1.2.0

1 year ago

1.4.6

12 months ago

1.2.8

12 months ago

1.4.5

12 months ago

1.2.7

12 months ago

1.4.4

12 months ago

1.2.6

12 months ago

1.4.3

12 months ago

1.2.5

12 months ago

1.4.2

12 months ago

1.2.4

12 months ago

1.4.1

12 months ago

1.2.3

1 year ago

1.4.0

12 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.3.9

12 months ago

1.5.6

11 months ago

1.3.8

12 months ago

1.5.5

11 months ago

1.3.7

12 months ago

1.1.9

1 year ago

1.5.4

11 months ago

1.3.6

12 months ago

1.1.8

1 year ago

1.5.3

11 months ago

1.3.5

12 months ago

1.5.2

11 months ago

1.3.4

12 months ago

1.5.1

12 months ago

1.3.3

12 months ago

1.5.0

12 months ago

1.3.2

12 months ago

1.3.1

12 months ago

1.3.0

12 months ago

1.4.9

12 months ago

1.4.8

12 months ago

1.4.7

12 months ago

1.2.9

12 months ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago