Giter Site home page Giter Site logo

ezhangle / btube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lava/btube

0.0 1.0 0.0 756 KB

Simple self-hosted video streaming service built upon nginx-rtmp module

License: GNU Affero General Public License v3.0

Makefile 3.17% C++ 74.05% HTML 14.87% CSS 7.91%

btube's Introduction

Simple Authentication Server for nginx-rtmp

To setup a live-streaming server, the most common configuration is to use the nginx-rtmp module with an RTMP ingress and transcoding to HLS for consumption by a web viewer.

A common problem with this setup is that the RTMP ingress is completely unauthenticated, so anyone on the internet can use the server to upload his own video stream.

The remedy is to use the on_publish directive, which will query a given URL and will accept or deny the stream based on the returned HTTP status code. However, since neither rtmps nor https are supported by the rtmp module, usual password-based schemes cannot be used since all data will be transmitted in plain-text.

This is where this server comes in.

Usage

There are two configurations, called shared-secret and multi-user below.

The shared-secret configuration is the most simple, intended for servers used by a small group of persons who know and trust each other. A secret string is distributed among the group, and everyone can use the secret to start a stream. Generated stream URLs will change for every stream.

The secret in this configuration is only intended to keep random people from the internet from abusing the server to host their own video streams.

The multi-user configuration is slightly more advanced to set up, since it involves two rtmp servers setting up a remote relay between each other.

Simple configuration (shared-secret)

The server provides two endpoints, /generate for users who want to start their stream and /verify for the nginx-rtmp module.

Please look at the nginx example config for details.

Advanced configuration (multi-user)

Please look at the nginx example config for details.

Build Dependencies

This program requires the following libraries to be installed:

  • Boost.Filesystem
  • Boost.ProgramOptions
  • Boost.Algorithm
  • fmtlib
  • argon2

btube's People

Contributors

lava avatar

Watchers

 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.