docker-nginx-rtmp/README.md

93 lines
2.9 KiB
Markdown
Raw Normal View History

2016-10-24 01:49:28 +00:00
# docker-nginx-rtmp
2016-10-24 02:17:32 +00:00
A Dockerfile installing NGINX, nginx-rtmp-module and FFmpeg from source with
default settings for HLS live streaming. Built on Alpine Linux.
2017-11-16 22:13:16 +00:00
* Nginx 1.13.6 (compiled from source)
* nginx-rtmp-module 1.2.0 (compiled from source)
* ffmpeg 3.3.4 (compiled from source)
2016-10-24 02:17:32 +00:00
* Default HLS settings (See: [nginx.conf](nginx.conf))
2016-11-23 21:55:17 +00:00
[![Docker Stars](https://img.shields.io/docker/stars/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/)
[![Docker Pulls](https://img.shields.io/docker/pulls/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/)
[![Docker Automated build](https://img.shields.io/docker/automated/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/builds/)
2016-10-24 03:07:57 +00:00
[![Build Status](https://travis-ci.org/alfg/docker-nginx-rtmp.svg?branch=master)](https://travis-ci.org/alfg/docker-nginx-rtmp)
2016-10-24 03:03:08 +00:00
2016-10-24 02:17:32 +00:00
## Usage
### Server
2016-11-23 21:55:17 +00:00
* Pull docker image and run:
```
docker pull alfg/nginx-rtmp
2017-01-15 23:35:00 +00:00
docker run -it -p 1935:1935 -p 8080:80 --rm alfg/nginx-rtmp
2016-11-23 21:55:17 +00:00
```
or
* Build and run container from source:
2016-10-24 02:17:32 +00:00
```
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
2016-10-24 02:17:32 +00:00
```
### OBS Configuration
* Stream Type: `Custom Streaming Server`
* URL: `rtmp://localhost:1935/stream`
2016-10-24 02:17:32 +00:00
* Stream Key: `hello`
### Watch Stream
* In Safari, VLC or any HLS player, open:
```
http://<server ip>:8080/live/$STREAM_NAME.m3u8
2016-10-24 02:17:32 +00:00
```
* Example: `http://localhost:8080/live/hello`
2016-10-24 02:17:32 +00:00
### FFmpeg Build
```
2017-06-21 04:07:06 +00:00
ffmpeg version 3.3.2 Copyright (c) 2000-2016 the FFmpeg developers
2016-10-24 02:17:32 +00:00
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
* https://alpinelinux.org/
* http://nginx.org
* https://github.com/arut/nginx-rtmp-module
* https://www.ffmpeg.org
* https://obsproject.com