Help nginx m3u8

149 views
Skip to first unread message

saharito

unread,
Dec 28, 2014, 5:51:01 AM12/28/14
to be...@googlegroups.com
Help, can't do broadcast in m3u8 format - nginx .
worker_processes  1;
events {
    worker_connections  1024;
}

rtmp {
   server {
       listen 1935;
       application myapp {
           live on;
           hls on;
           hls_path /tmp/hls; # на эту директорию нужны права
           exec_static '/usr/bin/ffmpeg -i  rtp://@233.33.220.91:5050 -c:v libx264 -s 720x576 -b:v 500k -c:a libfaac -ar 44100 -ac 2 -f flv rtmp://localhost/myapp/live 2>>/var/log/nginx/ffmpeg.log';
       }
   }
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
     listen 80 default_server;
   
     charset utf-8;
     root /var/www;
     index index.php index.html index.htm;
     server_name server_domain_name_or_IP;
     location /hls {
         root /tmp/hls;
         types {
             application/vnd.apple.mpegurl m3u8;
         }
     }

     location / {
        try_files $uri $uri/ =404;
     }
     error_page 404 /404.html;
     error_page 500 502 503 504 /50x.html;
     location = /50x.html {
         root /var/www;
     }
     location ~ \.php$ {
         try_files $uri =404;
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
         fastcgi_pass unix:/var/run/php5-fpm.sock;
         fastcgi_index index.php;
         include fastcgi_params;
     }
  }
sources: ['http://localhost/myapp/live.m3u8'],

 - No play - error. 
Reply all
Reply to author
Forward
0 new messages