Giter Site home page Giter Site logo

nginx-hls-module's Introduction

nginx-based hls module

Smooth Streaming Module fork

The module ingests the mp4 file, packages one into fragments, and delivers the fragments to iOS clients in real-time.

Build

cd to NGINX source directory & run this:

./configure --add-module=/path/to/nginx-hls-module
make
make install

Example nginx.conf

http {
    server {
        listen 80;
        rewrite ^(.*)\.mp4$ $1.m3u8 last;

        location ~ \.(m3u8|ts)$ {
            hls;
            hls_length 10; # length of fragment (seconds)
        }
    }
}

Directives

hls_length

syntax: hls_length <integer>

default: 8

context: http, server, location

Set the fragment length requested without the "length" argument.

hls_relative

syntax: hls_relative <on | off>

default: on

context: http, server, location

The directive specifies whether to keep the full URL of fragments.

hls_mp4_buffer_size

syntax: hls_mp4_buffer_size <size>

default: 512k

context: http, server, location

Sets the initial size of the buffer used for processing MP4 files.

hls_mp4_max_buffer_size

syntax: hls_mp4_max_buffer_size <size>

default: 10m

context: http, server, location

Size of moov atom may be quite large and can't exceed the hls_mp4_max_buffer_size size.

nginx-hls-module's People

Contributors

ankurss avatar newestbie avatar rounce 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.