Public | Automated Build

Last pushed: 2 months ago
Short Description
NGINX, nginx-rtmp-module and FFmpeg from source with default settings for HLS live streaming
Full Description

docker-nginx-rtmp

A Dockerfile installing NGINX, nginx-rtmp-module and FFmpeg from source with
default settings for HLS live streaming. Built on Alpine Linux.

  • Nginx 1.12.0 (compiled from source)
  • nginx-rtmp-module 1.1.11 (compiled from source)
  • ffmpeg 3.3.2 (compiled from source)
  • Default HLS settings (See: nginx.conf)




Usage

Server

  • Pull docker image and run:

    docker pull alfg/nginx-rtmp
    docker run -it -p 1935:1935 -p 8080:80 --rm alfg/nginx-rtmp
    

    or

  • Build and run container from source:

    docker build -t nginx-rtmp .
    docker run -it -p 1935:1935 -p 8080:80 --rm nginx-rtmp
    
  • Stream live content to:

    rtmp://<server ip>:1935/stream/$STREAM_NAME
    

OBS Configuration

  • Stream Type: Custom Streaming Server
  • URL: rtmp://localhost:1935/stream
  • Stream Key: hello

Watch Stream

  • In Safari, VLC or any HLS player, open:
    http://<server ip>:8080/live/$STREAM_NAME.m3u8
    
  • Example: http://localhost:8080/live/hello

FFmpeg Build

ffmpeg version 3.3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (Alpine 5.3.0)
  configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libfdk-aac --enable-libass --enable-libwebp --enable-librtmp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100

  configuration:
    --enable-version3
    --enable-gpl
    --enable-nonfree
    --enable-small
    --enable-libmp3lame
    --enable-libx264
    --enable-libx265
    --enable-libvpx
    --enable-libtheora
    --enable-libvorbis
    --enable-libopus
    --enable-libfdk-aac
    --enable-libass
    --enable-libwebp
    --enable-librtmp
    --enable-postproc
    --enable-avresample
    --enable-libfreetype
    --enable-openssl
    --disable-debug

Resources

Docker Pull Command
Owner
alfg
Source Repository

Comments (2)
corrodias
2 months ago

It may be that it simply has a certain amount of free disk space it requires, somewhere in excess of 500 MB (plus the image size), but it isn't clear just how much it needs if so.

corrodias
2 months ago

It's nice to see an image with up-to-date versions of nginx and the rtmp module, but it seems that when I run a container based on this, the disk usage slowly increases until my entire (minimally sized) disk is occupied, then of course the container crashes.