title: hls stream not working in nginx-rtmp-module
body: <p>I've created media streaming service using <a href="https://github.com/arut/nginx-rtmp-module" rel="nofollow noreferrer">nginx-rtmp-module</a></p>
  <p><strong>nginx.config file</strong></p>
  <pre><code>worker_processes  auto;
  
  events {
      worker_connections  1024;
  }
  
  http {
      include       mime.types;
      default_type  application/octet-stream;
      sendfile off;
      tcp_nopush on;
  
  
      server {
          listen 3002;
          server_name  localhost;
  
          location /live {
              # Disable cache
              add_header Cache-Control no-cache;
  
              # CORS setup
                  add_header 'Cache-Control' 'no-cache';
                  add_header 'Access-Control-Allow-Origin' '*' always;
                  add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
                  add_header 'Access-Control-Allow-Headers' 'Range';
  
              # allow CORS preflight requests
              if ($request_method = 'OPTIONS') {
                  add_header 'Access-Control-Allow-Origin' '*';
                         add_header 'Access-Control-Allow-Headers' 'Range';
                         add_header 'Access-Control-Max-Age' 1728000;
                         add_header 'Content-Type' 'text/plain charset=UTF-8';
                         add_header 'Content-Length' 0;
                         return 204;
              }
  
              types {
                  application/vnd.apple.mpegurl m3u8;
                  video/mp2t ts;
              }
  
              root /Users/dev/Desktop/stream/storage/;
              add_header Cache-Control no-cache;  
          }
      }
  
      include servers/*;
  }
  
  # RTMP Config
  rtmp {
      server {
          listen 1935; # Listen on standard RTMP port
          chunk_size 4000;
          ping 30s;
          notify_method get;
          application live{
              live on;
              exec_pull ffmpeg -re -i http://127.0.0.1/$app/$name
    -vcodec libx264 -threads 0 -vprofile baseline -acodec aac -strict -2 -b:v 1920k -b:a 128k -vf &quot;scale=1280:trunc(ow/a/2)*2&quot; -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/${name}_720
    -vcodec libx264 -threads 0 -vprofile baseline -acodec aac -strict -2 -b:v 1024k -b:a 128k -vf &quot;scale=854:trunc(ow/a/2)*2&quot; -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/${name}_480
    -vcodec libx264 -threads 0 -vprofile baseline -acodec aac -strict -2 -b:v 300k -b:a 96k -vf &quot;scale=426:trunc(ow/a/2)*2&quot; -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/${name}_240;
          }
          application show {
              live on;
              # Turn on HLS
              hls on;
              hls_nested on;
              record off;
              hls_path /Users/dev/Desktop/stream/storage/live/;
              
              # Instruct clients to adjust resolution according to bandwidth
              hls_variant _720 BANDWIDTH=2048000; # High bitrate, HD 720p resolution
              hls_variant _480 BANDWIDTH=448000; # Medium bitrate, SD resolution
              hls_variant _240 BANDWIDTH=288000; # Low bitrate, sub-SD resolution
          }
      }
  }
  # End RTMP Config
  </code></pre>
  <p>Using ffmpeg command I'm creating streaming file</p>
  <pre><code>ffmpeg -re -i sample.mp4  -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://127.0.0.1/live/my_video
  </code></pre>
  <p>When I check <strong>stream/storage/live/</strong> folder I didn't see any <strong>.ts</strong> and <strong>index.m3u8</strong> file created on folder.</p>
  <p>I've tried play rtmp video in VLC player but it's not playing, I didn't get any error but still video not play on VLC player.</p>