https://github.com/gkozlenko/node-media-server
Node.js Media Server / VOD / HLS / DRM
https://github.com/gkozlenko/node-media-server
flv hls mediaserver mp4 vod
Last synced: 11 months ago
JSON representation
Node.js Media Server / VOD / HLS / DRM
- Host: GitHub
- URL: https://github.com/gkozlenko/node-media-server
- Owner: gkozlenko
- License: mit
- Created: 2016-12-02T22:00:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-25T07:57:07.000Z (about 2 years ago)
- Last Synced: 2024-08-07T23:53:50.879Z (almost 2 years ago)
- Topics: flv, hls, mediaserver, mp4, vod
- Language: JavaScript
- Homepage:
- Size: 317 KB
- Stars: 82
- Watchers: 6
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-media-server
[](https://github.com/gkozlenko/node-media-server/actions/workflows/eslint.yml)
[](https://github.com/gkozlenko/node-video-lib/blob/master/LICENSE)
Node.js Media Server / VOD / HLS / DRM
## Installation
```bash
git clone https://github.com/gkozlenko/node-media-server.git
cd node-media-server
npm install
```
## Configuration
Config is located in the `config/index.js` file.
```javascript
const config = {
// Host and port for bidding
host: '0.0.0.0',
port: 3000,
// Path to static files
publicPath: path.resolve('./public'),
// Path to video files
mediaPath: path.resolve('./media'),
// Path to index files
indexPath: path.resolve('./index'),
// Path to log files
logsPath: path.resolve('./logs'),
// Video chunk duration
fragmentDuration: 10,
// DRM configuration
drmEnabled: false,
drmSeed: 'DRM SEED',
// Logger configuration
logLevel: intel.DEBUG,
logSize: '50m',
logKeep: 10,
shutdownInterval: 1000,
workers: {
// Server Worker
web: {
enabled: true,
count: require('os').cpus().length,
shutdownTimeout: 5000,
},
// Movie indexer Worker
indexer: {
enabled: true,
count: 1,
timeout: 5000,
},
},
};
```
## Running
```bash
npm start
```
## Usage
Use such URL to play a video file using HLS protocol:
```text
http://host:port/vod/FILE_NAME/playlist.m3u8
```