Skip to content

Multiplex an rtmp stream to both YouTube and Facebook Live using nginx in a container

Notifications You must be signed in to change notification settings

WhaleCTF/nginx-multistream

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginx-multistream

Multiplex a rtmp stream to both YouTube and Facebook Live using nginx in a container. This makes use of NGINX, the NGINX RTMP module, and FFmpeg.

This was cobbled together from instructions on the OBS project forum as well as a guide on Vultr. I have Dockerized the installation of nginx, ffmpeg, and the rtmp modules using an Ubuntu Xenial (18.04) base, nginx 1.17.9, and ffmpeg4.

Notes

This was testing on macOS with Docker desktop

Running

Edit nginx.conf and put in your own YouTube and Facebook stream keys

Build and run:

make docker-build
make docker-run

Streaming to the multiplexer

In OBS choose a custom stream and use rtmp:https://localhost/live as the destination. No key is needed.

Performance notes

The Facebook Live stream is re-encoded using ffmpeg. If you're running into performance limitations on the computer running the multiplexer the Facebook stream may lag or fail.

About

Multiplex an rtmp stream to both YouTube and Facebook Live using nginx in a container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 56.8%
  • Makefile 31.7%
  • Shell 11.5%