Giter Site home page Giter Site logo

node-media-server's Introduction

node-media-server

Build Status Maintainability GitHub License Donate using PayPal Buy me a Coffee

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

node-media-server's People

Contributors

gkozlenko avatar dependabot[bot] avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.