Giter VIP home page Giter VIP logo

docker-nginx-rtmp's Introduction

nginx rtmp multistream

TL;DR

Edit conf/nginx.conf Then run the following commands:

docker-compose build
docker-compose up -d

RTMP server now available push to rtmp://server-hostname/live

About

This Docker image is for having a central point to stream to multiple streaming providers at once. Providers included in this config are: Twitch, Youtube, Facebook Instagram is not properly supported due to multiple reasons, one is they don't official support this..

This Dockerfile will let you run nginx with the compiled rtmp module from https://github.com/sergey-dryabzhinsky/nginx-rtmp-module

This rtmp module doesn't properly support pushing to rtmps however, so we so a little magic: with docker-compose we also spin up a stunnel this stunnel makes it possible to translate traffic to rtmps for the module.

Prerequisites

You will need to have both docker and docker-compose installed on your machine. Have at least 4 cores so transcoding doesn't take your entire machine, so a Raspberry pi is not recommended.

Config

You will need to edit the nginx.conf file in the conf directory.

update the following things:

  • ALLOWED_BROADCAST_IP : The IP address from where the stream will be pushed to this instance.
  • TWITCH_KEY : The twitch stream key
  • FACEBOOK_KEY : The Facebook stream key
  • INSTAGRAM_KEY : The instagram stream key (optional, this is disabled by default for now in the 'live' app)
  • YOUTUBE_KEY : The yourube stream key

You can disable any of these by commenting out either their 'push' or 'exec' in the live application.

Usage

First we build the docker image

docker-compose build

Then make sure you have updated the conf/nginx.conf

docker-compose up -d

Notes

Check to make sure the streaming push links are still up to date with what the platform gives you.. it usually doesn't change, but do verify for facebook/instagram also check the conf/stunnel.conf

If you want to experiment with instagram, be free to figure out the right encoder settings and a way to get the rtmp key if you find a clean solution and want to share back, I'll accept it.

License

MIT

docker-nginx-rtmp's People

Contributors

maescool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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