Giter Club home page Giter Club logo

docker-nginx-rtmp's Introduction

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.23.1 (Mainline version compiled from source)
  • nginx-rtmp-module 1.2.2 (compiled from source)
  • ffmpeg 5.1 (compiled from source)
  • Default HLS settings (See: nginx.conf)

Docker Stars Docker Pulls Docker Automated build Build Status

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://localhost:1935/stream/$STREAM_NAME

SSL

To enable SSL, see nginx.conf and uncomment the lines:

listen 443 ssl;
ssl_certificate     /opt/certs/example.com.crt;
ssl_certificate_key /opt/certs/example.com.key;

This will enable HTTPS using a self-signed certificate supplied in /certs. If you wish to use HTTPS, it is highly recommended to obtain your own certificates and update the ssl_certificate and ssl_certificate_key paths.

I recommend using Certbot from Let's Encrypt.

Environment Variables

This Docker image uses envsubst for environment variable substitution. You can define additional environment variables in nginx.conf as ${var} and pass them in your docker-compose file or docker command.

Custom nginx.conf

If you wish to use your own nginx.conf, mount it as a volume in your docker-compose or docker command as nginx.conf.template:

volumes:
  - ./nginx.conf:/etc/nginx/nginx.conf.template

OBS Configuration

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

Watch Stream

  • Load up the example hls.js player in your browser:
http://localhost:8080/player.html?url=http://localhost:8080/live/hello.m3u8
  • Or in Safari, VLC or any HLS player, open:
http://localhost:8080/live/$STREAM_NAME.m3u8
  • Example Playlist: http://localhost:8080/live/hello.m3u8
  • HLS.js Player
  • FFplay: ffplay -fflags nobuffer rtmp://localhost:1935/stream/hello

FFmpeg Build

$ ffmpeg -buildconf

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.1 (Alpine 10.2.1_pre1) 20201203
  configuration: --prefix=/usr/local --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-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug --disable-doc --disable-ffplay --extra-libs='-lpthread -lm'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100

  configuration:
    --prefix=/usr/local
    --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-postproc
    --enable-avresample
    --enable-libfreetype
    --enable-openssl
    --disable-debug
    --disable-doc
    --disable-ffplay
    --extra-libs='-lpthread -lm'

FFmpeg Hardware Acceleration

A Dockerfile.cuda image is available to enable FFmpeg hardware acceleration via the NVIDIA's CUDA.

Use the tag: alfg/nginx-rtmp:cuda:

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

You must have a supported platform and driver to run this image.

*This image is experimental!

Resources

docker-nginx-rtmp's People

Contributors

4n4n4s avatar absentio avatar alexholliz avatar alfg avatar dependabot[bot] avatar dromer avatar fivethreeo avatar garfield96 avatar joschahenningsen avatar kiandevops avatar mapio avatar oxzi avatar rmens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-nginx-rtmp's Issues

OBS Studio v. 25.0.0 breaks streaming (handshake: unexpected RTMP version: 80)

Title says it all, connection drops right after being established.

2020/03/18 17:29:10 [info] 7#7: *90 client connected '172.17.0.1'

2020/03/18 17:29:11 [info] 7#7: *90 handshake: unexpected RTMP version: 80, client: 172.17.0.1, server: 0.0.0.0:1935

2020/03/18 17:29:11 [info] 7#7: *90 handshake: error parsing challenge, client: 172.17.0.1, server: 0.0.0.0:1935

2020/03/18 17:29:11 [info] 7#7: *90 disconnect, client: 172.17.0.1, server: 0.0.0.0:1935

2020/03/18 17:29:11 [info] 7#7: *90 deleteStream, client: 172.17.0.1, server: 0.0.0.0:1935

Downgrading to OBS Studio 24.0.3 (in the middle of a live broadcast!!) fixed the issue. There's nothing in the 25.0.0 release notes that jumped out at me as being a probable cause.

Can't connect with OBS

Hi @alfg,

I'm running your docker image with digitalocean and everything seems to be working on the server except for OBS telling me I can't connect to Stream.

Very strange.

Do you have any idea why?

Thanks!

mime.types not found

I am using the image to create an instance on Google cloud.
I'm using my own nginx.conf that I used successfully with a previous nginx rtmp docker container, which used buildpack-deps:stretch not Alpine.

When I start up this container, when it gets to where I include mime.types in the config I get an error that its not found,

nginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory)

and I don't see it in the container in /etc/nginx

Is something missing from the configuration? Do I need to add my own? Thanks.

Part of my nginx.conf:

worker_processes  1;	

#error_log  logs/error.log;	
#error_log  logs/error.log  notice;	
#error_log  logs/error.log  info;	

#pid        logs/nginx.pid;	


events {	
    worker_connections  1024;	
}	


http {	
    include       mime.types;	
    default_type  application/octet-stream;
...

build failed

Step 25/32 : COPY --from=build-ffmpeg /usr/local /usr/local
---> 7cd5d23b3475
Step 26/32 : COPY --from=build-ffmpeg /usr/lib/libfdk-aac.so.1 /usr/lib/libfdk-aac.so.1
COPY failed: stat /var/lib/docker/overlay2/aa04baefbdf0f2eba0e13995fad41dd2596c862884026f87084aa3076e9e7c2b/merged/usr/lib/libfdk-aac.so.1: no such file or directory

Multiple errors when installing with docker run

Installing the image with "docker run" gets as far as "start cache manager process 11" then throws multiple errors, including "Client sent HTTP/1.1 request without "Host" header while reading client request headers", and "Client closed keepalive connection". It never completes, and eventually freezes completely after about 1hr. The "Tiangolo" image installs perfectly, but lacks the SSL configuration which I need.

My Docker is a "virgin install" with no other containers, and is installed on a CentOS 7 VPS alongside a CPanel/Apache LAMP stack.

Docker - container not starting after update

I know that I have a bit of a complicated awkward setup here, but hopefully someone with a bit better understanding of yesterdays update can help me locate what's broken.

I have a bunch of the directories redirected to my home directory as it's being ran in plexguide, and some of this needs to be able to be updated on it's own for configuration purposes and such.

pg_volumes:
          - '/home/iandrewc/nginx/:/opt/nginx/'
          - '/home/iandrewc/nginx/:/etc/nginx/'
          - '/home/iandrewc/nginx/:/usr/local/nginx/'
          - '/home/iandrewc/HLS/:/opt/data'
          - '/home/iandrewc/HLS/:/HLS'
          - '/home/iandrewc/video_recordings/:/videorecordings'
          - '/home/iandrewc/www/:/www'
          - '/home/iandrewc/letsencrypt/etc/letsencrypt:/le-ssl'

But here's the errors that's showing in the log now.

Error relocating /usr/local/nginx/sbin/nginx: d2i_OCSP_RESPONSE: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: OCSP_RESPONSE_new: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: OCSP_response_get1_basic: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_set_alpn_select_cb: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: X509_email_free: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: ENGINE_by_id: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: i2a_ASN1_INTEGER: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: EVP_MD_CTX_create: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_get_rbio: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_get_timeout: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: RSA_generate_key: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: BIO_s_mem: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: BIO_new_file: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: ENGINE_load_private_key: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_get_ex_data_X509_STORE_CTX_idx: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_get_verify_result: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: X509_NAME_digest: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: EVP_sha256: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_do_handshake: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: BIO_write: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_use_certificate: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CIPHER_get_name: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: X509_STORE_CTX_get_ex_data: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_get_verify_mode: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_set_timeout: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: ERR_peek_error_line_data: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: PEM_read_bio_X509: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_get_verify_depth: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_get_servername: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_get_verify_callback: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_get_cert_store: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: SSL_CTX_use_PrivateKey: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: ERR_get_error: symbol not found,
Error relocating /usr/local/nginx/sbin/nginx: X509_check_issued: symbol not found```

Getting HLS Watchers Count

Hi
Does anybody have any idea about getting HLS watchers count?
I tried this one and no chance!
https://github.com/faryon93/hlswatch
I know that it's a little difficult because it's a different thing from RTMP requests and we can't use rtmp-stat here.
But as I think you knew it's a very important part of a live streaming service and we couldn't ignore it at all.

Thanks in advance

[root@localhost ~]# docker run -it -p 1936:1935 -p 8080:80 --rm alfg/nginx-rtmp

[root@localhost ~]# docker run -it -p 1936:1935 -p 8080:80 --rm alfg/nginx-rtmp
2019/07/11 13:35:43 [notice] 1#1: using the "epoll" event method
2019/07/11 13:35:43 [notice] 1#1: nginx/1.16.0
2019/07/11 13:35:43 [notice] 1#1: built by gcc 6.4.0 (Alpine 6.4.0)
2019/07/11 13:35:43 [notice] 1#1: OS: Linux 3.10.0-514.el7.x86_64
2019/07/11 13:35:43 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2019/07/11 13:35:43 [notice] 1#1: start worker processes
2019/07/11 13:35:43 [notice] 1#1: start worker process 6
2019/07/11 13:35:43 [notice] 1#1: start cache manager process 7
2019/07/11 13:35:43 [notice] 6#6: signal 28 (SIGWINCH) received
2019/07/11 13:35:43 [notice] 7#7: signal 28 (SIGWINCH) received
2019/07/11 13:35:43 [notice] 1#1: signal 28 (SIGWINCH) received
2019/07/11 13:35:43 [info] 6#6: epoll_wait() failed (4: Interrupted system call)
2019/07/11 13:35:43 [info] 7#7: epoll_wait() failed (4: Interrupted system call)
运行到这里就一直卡住了,请问这是什么问题呢

Error activating SSL

Greetings, after activating the lines in nginx.conf I change the 2 files in the certs folder obtaining them from sslforfree.com then in hub.docker.com I create the docker but when I start it it presents the following error:

nginx: [emerg] cannot load certificate "/opt/certs/live.canal6.hn.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/certs/live.canal6.hn.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)

Screenshot_1

Time between RTMP input and HLS output?

Hi,

I'm investigating observed latency when streaming HLS generated from an RTMP stream. I notice on the /stat dashboard that in the time column, no matter how few variants I generate, there is always a ~6 second difference between the time on the RTMP stream and the HLS variants.

Any idea if there is a config that would allow for shorter delta between the RTMP input and the HLS fragment being output? In all my testing I am seeing a consistent 6 second difference.

Screen Shot 2019-09-13 at 20 56 47

I've tried running the container on SSD and normal hard drives and there is no difference. This makes me wonder if there is some setting in ffmpeg or nginx itself that is causing this?

When using SSD drives, I am getting ~15-18 second latency between broadcast and playback. I'm assuming if I can reduce this 6 second delay, that could drop playback latency below 10 seconds.

My nginx.conf file is below:

daemon off;
error_log /dev/stdout error;

worker_processes auto;
events {
    worker_connections 1024;
}

rtmp_auto_push on;

rtmp {
    server {
        listen 1935;

        application live {
            live on;
            record off;
        }

        application stream {
            live on;

            # 4:3 Aspect Ratio -> Observed Latency: 12s - 15s
            exec ffmpeg -i rtmp://localhost/stream/$name -async 1 -vsync -1
                -c:v libx264 -b:v 123k -minrate 123k -maxrate 123k -bufsize 61k -vf "scale=234:-2,format=yuv420p,drawtext=text=234p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_234p
                -c:v libx264 -b:v 129k -minrate 129k -maxrate 129k -bufsize 65k -vf "scale=240:-2,format=yuv420p,drawtext=text=240p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_240p
                -c:v libx264 -b:v 523k -minrate 523k -maxrate 523k -bufsize 261k -vf "scale=432:-2,format=yuv420p,drawtext=text=432p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_432p
                -c:v libx264 -b:v 290k -minrate 290k -maxrate 290k -bufsize 145k -vf "scale=360:-2,format=yuv420p,drawtext=text=360p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_360p
                -c:v libx264 -b:v 645k -minrate 645k -maxrate 645k -bufsize 323k -vf "scale=480:-2,format=yuv420p,drawtext=text=480p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_480p
                -c:v libx264 -b:v 929k -minrate 929k -maxrate 929k -bufsize 464k -vf "scale=576:-2,format=yuv420p,drawtext=text=576p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_576p
                -c:v libx264 -b:v 1452k -minrate 1452k -maxrate 1452k -bufsize 726k -vf "scale=720:-2,format=yuv420p,drawtext=text=720p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_720p;

            # Original -> Observed Latency: 12s - 15s
            #exec ffmpeg -i rtmp://localhost/stream/$name -async 1 -vsync -1
            #    -c:v libx264 -b:v 145k -minrate 145k -maxrate 145k -bufsize 73k -vf "scale=234:-2,format=yuv420p,drawtext=text=234p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_234p
	        #	-c:v libx264 -b:v 576k -minrate 576k -maxrate 576k -bufsize 288k -vf "scale=240:-2,format=yuv420p,drawtext=text=240p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_240p
	        #	-c:v libx264 -b:v 730k -minrate 730k -maxrate 730k -bufsize 365k -vf "scale=432:-2,format=yuv420p,drawtext=text=432p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_432p
	        #	-c:v libx264 -b:v 704k -minrate 704k -maxrate 704k -bufsize 352k -vf "scale=360:-2,format=yuv420p,drawtext=text=360p @24fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 24 -sc_threshold 0 -tune zerolatency -profile:v baseline -level 3 -f flv rtmp://localhost/hls/$name_360p
            #    -c:v libx264 -b:v 896k -minrate 896k -maxrate 896k -bufsize 448k -vf "scale=480:-2,format=yuv420p,drawtext=text=480p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_480p
            #    -c:v libx264 -b:v 1408k -minrate 1408k -maxrate 1408k -bufsize 704k -vf "scale=576:-2,format=yuv420p,drawtext=text=576p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_576p
            #    -c:v libx264 -b:v 1856k -minrate 1856k -maxrate 1856k -bufsize 928k -vf "scale=720:-2,format=yuv420p,drawtext=text=720p @30fps:fontsize=24:[email protected]:box=1:[email protected]:boxborderw=8:fontfile=/usr/share/DejaVuSansMono.ttf:x=(w-tw)/2:y=th" -preset ultrafast -crf 28 -g 30 -r 30 -sc_threshold 0 -tune zerolatency -profile:v high -level 4 -f flv rtmp://localhost/hls/$name_720p;
	    }

        application hls {
            live on;
            wait_key on;

            hls on;
            hls_path /opt/data/hls; # Mount point (preferrably on an SSD drive since I/O intensive)
            hls_nested on;
            hls_fragment 1s;
            hls_playlist_length 6s;
            hls_fragment_slicing aligned;

            # 4:3 Aspect Ratio
            hls_variant _234p BANDWIDTH=122653,AVERAGE-BANDWIDTH=122653,RESOLUTION=234x312,FRAME-RATE=24,CODECS="avc1.42001e";
            hls_variant _240p BANDWIDTH=129024,AVERAGE-BANDWIDTH=129024,RESOLUTION=240x320,FRAME-RATE=24,CODECS="avc1.42001e";
            hls_variant _432p BANDWIDTH=522547,AVERAGE-BANDWIDTH=522547,RESOLUTION=432x576,FRAME-RATE=30,CODECS="avc1.420028";
            hls_variant _360p BANDWIDTH=290304,AVERAGE-BANDWIDTH=290304,RESOLUTION=360x480,FRAME-RATE=24,CODECS="avc1.42001e";
            hls_variant _480p BANDWIDTH=645120,AVERAGE-BANDWIDTH=645120,RESOLUTION=480x640,FRAME-RATE=30,CODECS="avc1.420028";
            hls_variant _576p BANDWIDTH=928973,AVERAGE-BANDWIDTH=928973,RESOLUTION=576x768,FRAME-RATE=30,CODECS="avc1.420028";
            hls_variant _720p BANDWIDTH=1451520,AVERAGE-BANDWIDTH=1451520,RESOLUTION=720x960,FRAME-RATE=30,CODECS="avc1.420028";

	        # Original
	        #hls_variant _234p BANDWIDTH=145000,AVERAGE-BANDWIDTH=145000,RESOLUTION=234x416,FRAME-RATE=24,CODECS="avc1.42001e";
            #hls_variant _240p BANDWIDTH=576000,AVERAGE-BANDWIDTH=576000,RESOLUTION=240x427,FRAME-RATE=24,CODECS="avc1.42001e";
            #hls_variant _432p BANDWIDTH=730000,AVERAGE-BANDWIDTH=730000,RESOLUTION=432x768,FRAME-RATE=30,CODECS="avc1.420028";
	        #hls_variant _360p BANDWIDTH=704000,AVERAGE-BANDWIDTH=704000,RESOLUTION=360x640,FRAME-RATE=24,CODECS="avc1.42001e";
            #hls_variant _480p BANDWIDTH=896000,AVERAGE-BANDWIDTH=896000,RESOLUTION=480x853,FRAME-RATE=30,CODECS="avc1.420028";
            #hls_variant _576p BANDWIDTH=1408000,AVERAGE-BANDWIDTH=1408000,RESOLUTION=576x1024,FRAME-RATE=30,CODECS="avc1.420028";
            #hls_variant _720p BANDWIDTH=1856000,AVERAGE-BANDWIDTH=1856000,RESOLUTION=720x1280,FRAME-RATE=30,CODECS="avc1.420028";
        }
    }
}

http {
    server {
        listen 80;

        sendfile off;
        tcp_nopush on;
        aio on;
        directio 512;

        location /hls {
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /opt/data;
            add_header 'Cache-Control' 'no-cache';
            add_header 'Access-Control-Allow-Origin' '*' always;
            add_header 'Access-Control-Expose-Headers' 'Content-Length';

            if ($request_method = 'OPTIONS') {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Max-Age' 1728000;
                add_header 'Content-Type' 'text/plain charset=UTF-8';
                add_header 'Content-Length' 0;
                return 204;
            }
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet static/stat.xsl;
        }

        location /static {
            alias /www/static;
        }

        location = /crossdomain.xml {
            root /www/static;
            default_type text/xml;
            expires 24h;
        }
    }
}

HLS stream cuts after a few seconds.

When I try to watch the HLS stream it closes the connection after ~5/6 seconds. Only rarely has the stream continued beyond the 5 seconds and the resolution improved, but eventually fails most times.

Below is the log I see in terminal at time of connecting to the stream until the connection drops.

nginx-rtmp_1  | 10.0.2.3 - - [19/Mar/2020:21:22:15 +0000] "GET /live/test.m3u8 HTTP/1.1" 206 500 "-" "VLC/3.0.7.1 LibVLC/3.0.7.1"
nginx-rtmp_1  | 10.0.2.3 - - [19/Mar/2020:21:22:15 +0000] "GET /live/test_240p264kbs/index.m3u8 HTTP/1.1" 206 137 "-" "VLC/3.0.7.1 LibVLC/3.0.7.1"
nginx-rtmp_1  | 2020/03/19 21:22:15 [info] 6#6: *18 client 10.0.2.3 closed keepalive connection
nginx-rtmp_1  | 10.0.2.3 - - [19/Mar/2020:21:22:15 +0000] "GET /live/test_240p264kbs/index.m3u8 HTTP/1.1" 206 137 "-" "VLC/3.0.7.1 LibVLC/3.0.7.1"
nginx-rtmp_1  | 2020/03/19 21:22:15 [info] 6#6: *19 client 10.0.2.3 closed keepalive connection
nginx-rtmp_1  | 10.0.2.3 - - [19/Mar/2020:21:22:15 +0000] "GET /live/test_240p264kbs/1584652922273.ts HTTP/1.1" 200 179352 "-" "VLC/3.0.7.1 LibVLC/3.0.7.1"
nginx-rtmp_1  | 10.0.2.3 - - [19/Mar/2020:21:22:15 +0000] "GET /live/test_720p2628kbs/index.m3u8 HTTP/1.1" 206 137 "-" "VLC/3.0.7.1 LibVLC/3.0.7.1"
nginx-rtmp_1  | 2020/03/19 21:22:15 [info] 6#6: *21 client 10.0.2.3 closed keepalive connection
nginx-rtmp_1  | 2020/03/19 21:22:21 [info] 6#6: *20 client 10.0.2.3 closed keepalive connection
nginx-rtmp_1  | 2020/03/19 21:22:21 [info] 6#6: *17 client 10.0.2.3 closed keepalive connection

In case it matters, the RTMP stream does work at full resolution.

docker exec /bin/bash or logs error

  1. command enter docker output the following error
    OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory": unknown

can only use /bin/sh enter docker
2.Through docker view log is empty, enter the container content view has log

Stunnel

Hi,

Is there some plans to add stunnel support?
If I understood right this module is needed to migrate facebook stream from rtmp to rtmps.

Thx.

Example input streams

Hi,

Great project!

I'm quite new too ffmpeg an was wondering if you could add some example ffmpeg test input commands for window/linux in the README.

I'm also wondering If you could help me with this issue.

I'm trying to make this command (stream screen in windows) work with the server following the README instructions, but the stream only works for ffmpeg/ffplay, not HLS, so I get the feeling I'm missing something:

ffmpeg -f gdigrab -framerate 30 -video_size 1280x720 -i desktop -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv rtmp://localhost:1935/stream/stream675

I can read it with:
ffplay rtmp://localhost:1935/stream/stream675

On RTMP statics (http://localhost:8080/stat):
bild

I'm using the latest image:
bild

When I try to open: (http://localhost:8080/live/stream675.m3u8 in vlc) I get the following error:
bild

The videoJS example doesn't work either.

Any help appriciated!

Cheers,
@grebtsew

Possible to add curl to the container?

I'm trying to implement auto-switching between different feeds but this requires curl to be in the container, which it's not by default. Any chance that this can be added?

Near real-time streaming (zero latency)

Hi @alfg,
First thanks for this repo 😉
I try to setup near real-time streaming based on this repo and OBS but I see near 12 seconds of delay in VLC. Have you any suggestions to decrease this delay? I need a lower than 2-second delay for my stream. Is it possible with RTMP at all?

Update to Alpine 3.7.

Once FFmpeg supports building with libressl via the --enable-libtls option, we can update to 3.7.

#5
https://trac.ffmpeg.org/ticket/6580

Another option is to remove the --enable-openssl build flag. I'm not too sure on the scope on how this is used along with nginx-rtmp though.

included ffmpeg unable to restream to wowza

So, I'm trying to re-stream to a wowza rtmp server that utilizes authentication.
I tried both these forms:

-f flv "rtmp://[username:password@]server[:port][/app][/instance][/playpath]"

Which results in: Problem accessing the DNS. (addr: [username])

And:

-f flv "rtmp://serveraddress[:port][/app][/streamname] flashver=FMLE/3.0\20(compatible;\20FMSc/1.0) live=true pubUser=myuser pubPasswd=mypassword"

Which does: RTMP_ReadPacket, failed to read RTMP packet header

I see your ffmpeg build is missing a lot of flags, which is probably why this isn't working (?), perhaps lets expand it to include more capabilities?

ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.4.0 (Alpine 6.4.0)
  configuration: --prefix=/usr/local --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 --disable-doc --disable-ffplay --extra-libs='-lpthread -lm'

As comparison my local ffmpeg:

ffmpeg version 4.1.5 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --disable-decoder=amrnb --disable-decoder=libopenjpeg --disable-libopencv --disable-outdev=sdl2 --disable-podpages --disable-sndio --disable-stripping --enable-libaom --enable-avfilter --enable-avresample --enable-gcrypt --disable-gnutls --enable-openssl --enable-gpl --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libzimg --enable-libxvid --enable-libzvbi --enable-nonfree --enable-opencl --enable-opengl --enable-postproc --enable-pthreads --enable-shared --enable-version3 --enable-libwebp --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --toolchain=hardened --enable-frei0r --enable-chromaprint --enable-libx264 --enable-libiec61883 --enable-libdc1394 --enable-vaapi --enable-libmfx --enable-libvmaf --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu

(or I'm overlooking something, like some options not available on alpine?)

Specific Docker Image tag beside latest

It would be nice to have an additional tag beside latest referring to a specific version, since using latest possibly breaks compatibility.

Are there any plans of creating version tags?

hls streaming not working

Hi,

I'm new to the topic of streaming, so I hope this issue isn't stupid.

I can start streaming from obs.
Consuming the stream is working using rtmp at rtmp://serverIP/stream/test but not with hls at http://serverIP:8080/live/test.m3u8

In the logs I get:

2020/03/17 20:06:10 [error] 7#7: *8 open() "/opt/data/hls/test.m3u8" failed (2: No such file or directory), client: 95.91.228.154, server: , request: "GET /live/test.m3u8 HTTP/1.1", host: "serverIP:8080"
clientIP - - [17/Mar/2020:20:06:10 +0000] "GET /live/test.m3u8 HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4061.0 Safari/537.36"

thanks in advance
Cornelius

No video on HLS feeds

Hey

Im running the most recent version of the image with the default config and I'm getting no video feeds, but I am getting audio.

Here is what stats says

image

As you can see there is no resolutions for the transcoded feeds. I'm running it on a fairly beefy machine so I don't imagine its anything to do with resources.

Any help would be appreciated.

volumes not mounting properly - uncommenting SSL breaks docker

running 'exec -it DOCKER ID ls /opt/' reveals that the opt/certs volume was not properly mounted
Other volumes also do not mount properly

" [emerg] cannot load certificate " /opt/certs/example.com.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(' /opt/certs/example.com.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
"

Ubuntu 18.04, fresh installation

UPDATE: It works with docker-compose up, but not when pre-built. Maybe I'm not using the build commands correctly or something is installed weird.

Using nginx-rtmp to mirror source stream on multiple instances

Hi alfg,

Thanks for the work you've done, your image works great!

In a k8s cluster I'm setting up one container with your default options that will receive the stream and make it available on HTTP interrnally in the clusterr. I then setup N containers that are supposed to exec_pull from the first container, copying the streams and making it available on HTTP externally. The reason being that I want it to be horizontally scalable, supporting in theory an unlimited number of viewers.

However, I'm having an issue getting it to work as it seems like accessing the http server doesn't start the application that will generate the hls files.

I've pushed my work here: https://github.com/rhummelmose/nginx-rtmp-hls-mirror/blob/master/nginx.conf

And here are the k8s manifests: https://github.com/rhummelmose/duah-k8s-gitops

I hope that you have an idea for how I can resolve this :)

Best,
Rasmus

Screen sizes

Hi @alfg!

You have some presets on sizes when serving the hls stream. Anyway those could be more dynamic.

How would one go about doing that?

Thanks!

http play not working?

HI

Thanks for the Docker image. I am able to play the OBS stream using RTMP but I cnat get the http ouytput to play in VLC at all. I am using the exact same examples you gave except the IP adresses.

I get playback in VLC but no visible video output. Maybe just outputs audio?

Can you please confirm that this actually works?

run issue

configure file not found in Dockerfile when attempting to compile

./configure: line 5028: pr: not found
./configure: line 5041: pr: not found
./configure: line 5047: pr: not found
./configure: line 5049: pr: not found
./configure: line 5050: pr: not found
./configure: line 5053: pr: not found
./configure: line 5054: pr: not found
./configure: line 5055: pr: not found
./configure: line 5100: pr: not found
./configure: line 5474: pr: not found

Any idea what's going on?

ffmpeg编译报错

编译的时候提示:
./configure: line 1: pr: not found

libavdevice/avdevice.c: In function 'device_next':
libavdevice/avdevice.c:88:13: warning: 'av_oformat_next' is deprecated [-Wdeprecated-declarations]
if (!(prev = av_oformat_next(prev)))
^~
In file included from libavdevice/avdevice.h:51:0,
from libavdevice/avdevice.c:23:
./libavformat/avformat.h:2088:17: note: declared here
AVOutputFormat *av_oformat_next(const AVOutputFormat *f);
^~~~~~~~~~~~~~~
libavdevice/avdevice.c:92:13: warning: 'av_iformat_next' is deprecated [-Wdeprecated-declarations]
if (!(prev = av_iformat_next(prev)))
^~
In file included from libavdevice/avdevice.h:51:0,
from libavdevice/avdevice.c:23:
./libavformat/avformat.h:2080:17: note: declared here
AVInputFormat *av_iformat_next(const AVInputFormat *f);
^~~~~~~~~~~~~~~

warning: 'codec' is deprecated and a lots of deprecated module when install

Warning displayed when I install.

libavcodec/smvjpegdec.c: In function 'smvjpeg_decode_init':
libavcodec/smvjpegdec.c:131:5: warning: 'refcounted_frames' is deprecated [-Wdeprecated-declarations]
     s->avctx->refcounted_frames = 1;
     ^
In file included from libavcodec/smvjpegdec.c:28:0:
libavcodec/avcodec.h:2396:9: note: declared here
     int refcounted_frames;
         ^~~~~~~~~~~~~~~~~
libavcodec/smvjpegdec.c: In function 'smvjpeg_decode_frame':
libavcodec/smvjpegdec.c:162:9: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
         ret = avcodec_decode_video2(s->avctx, mjpeg_data, &s->mjpeg_data_size, avpkt);
         ^~~
In file included from libavcodec/smvjpegdec.c:28:0:
libavcodec/avcodec.h:4828:5: note: declared here
 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,

BRs!

Disable Nginx logging?

Hi

Is it possibhle to disable Nginx logging? I am not sure but it literally created 500gb worth of error logging which crashes my system. I am windering if it is possible to logging for rtmp module? I do not need it myself, it seems to work but generates crap loads of log files.

thanks

Port 1935 pull

Hi ,

I'm streaming rtmp from my host (ubuntu 18 on DO) and have this container running. Nginx on host is not listening to port 1935. I ran container using

docker pull alfg/nginx-rtmp

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

my container ip address is

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 3b1cabf80e89

and result is:

172.17.0.2

Obviously container ip differs from my server. Now question is, how would I be able to stream to 172.17.0.2:1935 ?

I generate rtmp://172.17.0.2:1935/live/stream using ffmpeg but container nginx is not listening to this port. If I listen on host nginx its all fine but docker isn't.

Is this correct or should I do rtmp://127.0.01:1935/live/stream from host or actual network ip?

Thanks

Will ffmpeg generate all the streams listed at once?

exec ffmpeg -i rtmp://localhost:1935/stream/$name
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_720p2628kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 1000k -f flv -g 30 -r 30 -s 854x480 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_480p1128kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 750k -f flv -g 30 -r 30 -s 640x360 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_360p878kbs
              -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 400k -f flv -g 30 -r 30 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p528kbs
              -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p264kbs;

Great work! May I ask one question? As pasted above, while I am playing the stream in a HLS player, will all the above streams with different resolutions be generated?

nginx not in PATH

$ sudo docker run -ti --rm alfg/nginx-rtmp sh
/ # nginx -V
sh: nginx: not found

(Can't stream HLS) [error] hls: force fragment split

Hi there

I'm streaming from OBS , it seems to be working because in the console I see:

2019/11/30 00:05:04 [info] 6#6: *50 connect: app='stream' args='' flashver='' swf_url='' tc_url='rtmp://localhost:1935/stream' page_url='' acodecs=3191 vcodecs=252 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935

But when I open VLC and add the url: http://mysite.com/live/test.m3u8

The logs start to show many of these:

2019/11/30 00:06:13 [error] 6#6: *57 hls: force fragment split: 50.017 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:13 [error] 6#6: *58 hls: force fragment split: 50.017 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:13 [error] 6#6: *59 hls: force fragment split: 50.017 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:13 [error] 6#6: *60 hls: force fragment split: 50.017 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:13 [error] 6#6: *61 hls: force fragment split: 50.017 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *57 hls: force fragment split: -49.484 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *58 hls: force fragment split: -49.484 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *59 hls: force fragment split: -49.484 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *60 hls: force fragment split: -49.484 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *57 hls: force fragment split: 51.921 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *58 hls: force fragment split: 51.921 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *59 hls: force fragment split: 51.921 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *60 hls: force fragment split: 51.921 sec, , client: 127.0.0.1, server: 0.0.0.0:1935
2019/11/30 00:06:17 [error] 6#6: *57 hls: force fragment split: -51.888 sec, , client: 127.0.0.1, server: 0.0.0.0:1935

And of course VLC doesnt play anything

Tried building from source and same.

Tried this solution editing Dockerfile
arut/nginx-rtmp-module#568 (comment)
but then build fails with the message: ERROR: libass not found using pkg-config

The streaming works when using RTMP anyway, altough extremely laggy, but that's probably because of my bandwith

nginx.conf with Docker volume

It would be possible to change the path of the nginx.conf file so that you could map the volume for local configuration

Doesn't compile

cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /tmp/nginx-rtmp-module-1.2.1 -I objs -I src/http -I src/http/modules
-o objs/addon/nginx-rtmp-module-1.2.1/ngx_rtmp_shared.o
/tmp/nginx-rtmp-module-1.2.1/ngx_rtmp_shared.c
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /tmp/nginx-rtmp-module-1.2.1 -I objs -I src/http -I src/http/modules
-o objs/addon/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.o
/tmp/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c
/tmp/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c: In function 'ngx_rtmp_eval':
/tmp/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c:160:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
switch (c) {
^~~~~~
/tmp/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c:170:13: note: here
case ESCAPE:
^~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1377: objs/addon/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.o] Error 1
make[1]: Leaving directory '/tmp/nginx-1.14.2'
make: *** [Makefile:8: build] Error 2
The command '/bin/sh -c cd /tmp/nginx-${NGINX_VERSION} && ./configure --prefix=/opt/nginx --add-module=/tmp/nginx-rtmp-module-${NGINX_RTMP_VERSION} --conf-path=/opt/nginx/nginx.conf --with-threads --with-file-aio --with-http_ssl_module --error-log-path=/opt/nginx/logs/error.log --http-log-path=/opt/nginx/logs/access.log --with-debug && cd /tmp/nginx-${NGINX_VERSION} && make && make install' returned a non-zero code: 2

Can't write files properly

Hi, just giving a try to this docker image. Got it working but when I try a simple directive like
exec_pull echo "Hello" > /tmp/hello.txt
it doesn't write the file when I pull the stream.
If I run the same command on the shell then it works properly, i can even create files using touch.

Let me know how to fix. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.