tiangolo / nginx-rtmp-docker

Docker image with Nginx using the nginx-rtmp-module module for live multimedia (video) streaming.
MIT License
1.14k stars 363 forks source link
docker docker-image dockerfile live-multimedia multimedia nginx nginx-rtmp obs-studio rtmp server stream video vlc

Deploy

Supported tags and respective Dockerfile links

Note: Note: There are tags for each build date. If you need to "pin" the Docker image version you use, you can select one of those tags. E.g. tiangolo/nginx-rtmp:latest-2020-08-16.

nginx-rtmp

Docker image with Nginx using the nginx-rtmp-module module for live multimedia (video) streaming.

Description

This Docker image can be used to create an RTMP server for multimedia / video streaming using Nginx and nginx-rtmp-module, built from the current latest sources (Nginx 1.15.0 and nginx-rtmp-module 1.2.1).

This was inspired by other similar previous images from dvdgiessen, jasonrivers, aevumdecessus and by an OBS Studio post.

The main purpose (and test case) to build it was to allow streaming from OBS Studio to different clients at the same time.

GitHub repo: https://github.com/tiangolo/nginx-rtmp-docker

Docker Hub image: https://hub.docker.com/r/tiangolo/nginx-rtmp/

Details

How to use

docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp

How to test with OBS Studio and VLC

Debugging

If something is not working you can check the logs of the container with:

docker logs nginx-rtmp

Extending

If you need to modify the configurations you can create a file nginx.conf and replace the one in this image using a Dockerfile that is based on the image, for example:

FROM tiangolo/nginx-rtmp

COPY nginx.conf /etc/nginx/nginx.conf

The current nginx.conf contains:

worker_processes auto;
rtmp_auto_push on;
events {}
rtmp {
    server {
        listen 1935;
        listen [::]:1935 ipv6only=on;

        application live {
            live on;
            record off;
        }
    }
}

You can start from it and modify it as you need. Here's the documentation related to nginx-rtmp-module.

Technical details

Release Notes

Latest Changes

Internal

0.0.1

Features

Fixes

Docs

Upgrades

Internal

License

This project is licensed under the terms of the MIT License.