Giter Club home page Giter Club logo

blss's Introduction

BLSS: Bravo Live Streaming Service

Powered Build Status Downloads

中文说明

Introduction

BLSS is a NGINX third-party module, which is based on the secondary development of open source projects nginx-rtmp-module to achieve, based on the original features to retain some of the key features, Such as HTTP-FLV protocol distribution, GOP cache, regular match push-pull domain name, virtual host and so on.

Installation

Download nginx

wget https://nginx.org/download/nginx-$VERSION.tar.gz
tar zxvf nginx-$VERSION.tar.gz

Download BLSS

wget https://github.com/gnolizuh/BLSS/archive/v1.1.4.tar.gz
tar zxvf v1.1.4.tar.gz

Compile and install:

cd NGINX-SRC-DIR
./configure --add-module=/path/to/BLSS
make
make install

Compile with debug mode:

./configure --add-module=/path/to/BLSS --with-debug

Configuration

A nginx.conf example:

worker_processes 8;   # multi-worker process mode
relay_stream hash;    # stream relay mode

# rtmp block
rtmp {
    server {
        listen 1935 reuseport;

        service cctv {
            hostname pub rtmp *.pub.rtmp.cctv;         # match rtmp push domain
            hostname sub rtmp *.sub.rtmp.cctv;         # match rtmp pull domain
            hostname sub http_flv *.sub.httpflv.cctv;  # match http-flv pull domain

            application news {
                live on;
                http_flv on;
                gop_cache on;
                gop_cache_count 5;  # cache 5 GOPs

                hls on;
                hls_fragment 10s;
                hls_playlist_length 30s;
            }

            application sports {
                hls on;
                hls_fragment 1m;
                hls_playlist_length 3m;
            }
        }
    }
}

http {
    include      mime.types;
    default_type application/octet-stream;

    log_format   main  '$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';

    access_log   logs/http_sla.log main;

    keepalive_timeout 60;

    server {
        listen 80 reuseport;

        location / {
            http_flv on;    # delivery http-flv
        }
    }
}

run nginx:

./obj/nginx -p /path/to/nginx

blss's People

Contributors

gnolizuh avatar

Watchers

 avatar 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.