Jump to content
Search In
  • More options...
Find results that contain...
Find results in...



#0
Guest

User Menu


Sign In

Sign In



Or sign in with one of these services

Sign Up

Forum Menu


Register now to M1GC to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an M1GC account for free today!

  • M1GC

M1GC

Private NGINX/RTMP server live-streaming using Docker

Recommended Posts

What is Docker?

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package with the full os included so everything configured works right out the box.

Getting Started with installing Docker
Windows / Mac OSX / Linux

WINDOWS AND MAC USERS INSTALL DOCKER:
Download & install on Windows or Mac

FOR LINUX USERS:
INSTALL DOCKER ON UBUNTU / DEBIAN

apt install docker.io -y

CENTOS - INSTALL DOCKER

yum install docker-ce docker-ce-cli containerd.io

NOTE: for windows Hyper-V will be enabled via the software install.
Virtualization must be enabled via BIOS for Docker Desktop to work.

Check if docker is running & its version
ON WINDOWS Open Windows Powershell 
LINUX or MAC OSX - Use your preferred Command Line / Terminal tool on Linux or Mac OSX.

Check if dockers daemon is running

docker

Check your docker version

docker -v

Downloading our NGINX/RTMP Streaming Server Docker Image from Docker Hub
DOWNLOAD OUR STREAMING SERVER DOCKER IMAGE:

Docker image is a ubuntu x64 nginx/ffmpeg base os which contains all the configuration M1 created for setting up a x2 PC  Stream / Gaming setup
The docker image is also unlocked and contains pre-made bash scripts to run your streaming server even easier than our manual setup.
Docker also allows better performance and less resources to your computer / server.

docker pull murderousone/nginx-ffmpeg-rtmp:ubuntu-latest

RUN THE DOCKER CONTAINER

(Change the info in the code below)

  • HostIP = Local IP of your Docker Host / Server
  • Hostname = Can be anything

(Example of Host IP: 192.168.1.100)

(Example of Hostname: RTMPSERVER)

docker run -itd -p yourhostip:80:80 -p yourhostip:443:443 -p yourhostip:1935:1935 -h yourhostname --name nginx-rtmp-server murderousone/nginx-ffmpeg-rtmp:ubuntu-latest /bin/bash

Above docker command will run and start the Docker Container / Streaming Server already configured.

Attach to the Running RTMP Docker Container

docker attach rtmp

Load our Bash Script to Update the server packages on the NGINX / RTMP Docker Container

./update

Edit and Add your Stream Key and URL's & Set your RTMP Servers Stream Key to the RTMP Config

Stream URL / Key from Restream.io, Youtube, Twitch
(Example: - Change -> push rtmp://live.restream.io/streamkey;)

SETTING RTMP SERVERS STREAM KEY  (Can be named anything, No spaces.)

(EXAMPLE: Change -> rtmp://127.0.0.1/live/YOURSTREAMKEY to rtmp://127.0.0.1/live/ANY-KEYNAME-YOU-WANT)

./edit-rtmp

START THE RTMP SERVER

./start-rtmp

EXIT THE CONTAINER WHILE LEAVING IT RUNNING

HOLD: CRTL + p + q 

Your docker streaming server is now started and running in the background...
You can now connect to it, using your preferred streaming software. (obs studio, xsplit, vmix, streamlabs obs, etc)

Setting up main gaming computer to stream to NGINX / RTMP

Main gaming computer

Any ol Gaming PC with OBS Studio & NVENC encoding.

In OBS, i use NVENC encoding and I use my monitor’s native resolution (1080p). 

Using OBS Studio, in your broadcast settings you need to use the “Custom” streaming service.

https://m1-gamingz.com/wp-content/uploads/2021/03/Screenshot-2021-03-27-130647-live.png

The Streaming URL will be something like rtmp://192.168.1.100/live (Use your own server’s IP).

Your Stream Key needs to be the same you used in your nginx configuration. (Example: KEYNAME-YOU-SET)

In the Encoding, use NVIDIA NVENC (Since it doesn’t use a lot of CPU).

Bit-rates

Click here for Live encoder best settings for bit-rates, and resolutions

  • You may need to reduce your bit-rate depending on services bandwidth limits.
  • You may need to adjust your max bit rate according to your needs and capabilities

AUDIO
As for Audio encoding, I use the AAC codec, 160 bit rate and a Format of 44 or 48 Khz.

* RTMP Video on demand FLV/MP4, playing from local filesystem or HTTP
* Stream relay support for distributed streaming: push & pull models
* Recording streams in multiple FLVs
* H264/AAC support
* Online transcoding with FFmpeg
* HTTP callbacks (publish/play/record/update etc)
* Running external programs on certain events (exec)
* HTTP control module for recording audio/video and dropping clients
* Advanced buffering techniques to keep memory allocations at a minimum level for faster streaming and low memory footprint
* Proved to work with Wirecast, FMS, Wowza, JWPlayer, FlowPlayer, StrobeMediaPlayback, ffmpeg, avconv, rtmpdump, flvstreamer and many more
* Statistics in XML/XSL in machine- & human- readable form

ENJOY! 

  • Thanks 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Welcome to M1GC

    tenor.gif

    We accept players of all skill levels and help members grow at their own pace.

    We are respectful, determined, and proud to be M1GC members..

  • Guilded_Logomark_Wordmark_Color.png

    Check out M1GC on Guilded

  • Sign up to Restream.io

    M1-Gaming Is Inviting you to Join Restream. The best way to stream video live to 30+ platforms simultaneously for free.

  • M1GC

About Us

M1GC it's a community based on PC and Console Gaming.

Social Links

M1GC Facebook Group Join
M1GC Steam Group Join
M1GC Discord Server Join
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.