Skip to content

cute772/node-media-server

 
 

Repository files navigation

node-media-server

Build Status Maintainability GitHub License

Node.js Media Server / VOD / HLS / DRM

Installation

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.

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

npm start

Usage

Use such URL to play a video file using HLS protocol:

http://host:port/vod/FILE_NAME/playlist.m3u8

About

Node.js Media Server / VOD / HLS / DRM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%