S
S
Siomich2018-06-25 17:24:26
Nginx
Siomich, 2018-06-25 17:24:26

NGINX + nginx-rtmp-module HLS and Mega dach not working?

The task is to make streaming video from cameras to the site in HTML5. But that’s not the task, it seems that I’m doing everything right, rtmp is output normally, but http doesn’t want to output. My nginx.conf

user  nginx;
worker_processes auto;
rtmp_auto_push on;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}



http {
 default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
server {

                  listen       8080;

                  server_name  rtmp_test;

                  charset utf-8;

                  location / {

                        root   html;

                        index  index.html index.htm;

                  }

                  location /hls {

                        types {

                              application/vnd.apple.mpegurl m3u8;

                              }

                        alias /tmp/hls;
            
                  }

      }

}

rtmp {
        live on;
        hls on;
        hls_path /tmp/hls;
        hls_fragment 5s;
    server {
        listen 1935;
        application cam1 {
            hls_path /tmp/cam1;
        }
        application cam2 {
            hls_path /tmp/cam2;
        }
                exec_static ffmpeg -i
        rtsp://admin:[email protected]:port/profile1/ -c copy -f flv
        rtmp://127.0.0.1/cam1/stream;
                exec_static ffmpeg -i
        rtsp://admin:[email protected]:port/profile1/ -c copy -f flv
        rtmp://127.0.0.1/cam2/stream;
    }
}

Information taken from here!
Help, I can't figure out where I'm going wrong.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question