title: Play a video from remote computer using NGINX-RTMP
body: <p>I am trying to stream a video  using nginx-rtmp with rtmp protocol.
  I created a index.html and  embedded on it JWPlayer with the rtmp url.
  On localhost, I can play the video from the browser but from another computer in same local network when I tried same thing ( open the index.html in the browser the url is <a href="http://172.16.40.162:8080" rel="nofollow">http://172.16.40.162:8080</a> ) I get an error message.
  But when I try  with vlc (the rtmp url : rtmp://172.16.40.162/vod/test) it worked.<br>
  Here the code of index.html</p>
  
  <pre><code>    &lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
          &lt;title&gt;VoD Example&lt;/title&gt;
          &lt;script src="http://jwpsrv.com/library/s7iNvOAyEeSMdQ4AfQhyIQ.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id='videotest'&gt;&lt;/div&gt;
      &lt;script type='text/javascript'&gt;
          jwplayer('videotest').setup({
          file: 'rtmp://localhost/vod/test',
          width: '50%',
          aspectratio: '16:9'
          });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the nginx.conf</p>
  
  <pre><code>    #user  nobody;
  worker_processes  1;
  
  error_log  logs/error.log debug;
  
  events {
      worker_connections  1024;
  }
  
  http {
      include       mime.types;
      default_type  application/octet-stream;
  
      sendfile        on;
      keepalive_timeout  65;
  
      server {
          listen       8080;
          server_name  localhost;
  
          # rtmp stat
          location /stat {
              rtmp_stat all;
              rtmp_stat_stylesheet stat.xsl;
          }
          location /stat.xsl {
              # you can move stat.xsl to a different location
              root /usr/local/nginx/html;
          }
  
          # rtmp control
          location /control {
              rtmp_control all;
          }
  
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   html;
          }
      }
  }
  
  rtmp {
      server {
          listen 1935;
      notify_method get;
      chunk_size 8192;
  
          application vod {
          allow play all;
          wait_video on;
              play /var/www/Videos;
          push rtmp://localhost/vod/test;
          }
      }
  }
  </code></pre>
  
  <p>I get these messages on :</p>
  
  <p><strong>acces.log</strong></p>
  
  <pre><code>    172.16.40.148 - - [16/Apr/2015:13:08:33 +0100] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0"
  172.16.40.148 [16/Apr/2015:13:19:29 +0100] PLAY "vod" "test" "" - 382 3660906 "" "LNX 9,0,124,2" (1m 58s)
  127.0.0.1 [16/Apr/2015:13:51:47 +0100] PLAY "vod" "test" "" - 483 3669724 "http://172.16.40.162:8080/" "LNX 11,2,202,457" (1m 50s)
  </code></pre>
  
  <p><strong>error.log</strong></p>
  
  <pre><code>2015/04/16 13:07:06 [notice] 3771#0: using the "epoll" event method
      2015/04/16 13:07:06 [notice] 3771#0: nginx/1.5.0
      2015/04/16 13:07:06 [notice] 3771#0: built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) 
      2015/04/16 13:07:06 [notice] 3771#0: OS: Linux 2.6.32-504.12.2.el6.x86_64
      2015/04/16 13:07:06 [notice] 3771#0: getrlimit(RLIMIT_NOFILE): 1024:4096
      2015/04/16 13:07:06 [notice] 3772#0: start worker processes
      2015/04/16 13:07:06 [notice] 3772#0: start worker process 3773
      2015/04/16 13:08:41 [info] 3773#0: *3 client closed connection while waiting for request, client: 172.16.40.148, server: 0.0.0.0:8080
  </code></pre>
  
  <p>Information about the video I use (I executed ffmpeg -i test.flv)</p>
  
  <pre><code>    Input #0, flv, from 'test.flv':
    Metadata:
      major_brand     : mp42
      minor_version   : 0
      compatible_brands: mp42isom
      encoder         : Lavf56.30.100
    Duration: 00:01:50.03, start: 0.060000, bitrate: 270 kb/s
      Stream #0:0: Video: h264 (High), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 30.30 fps, 30 tbr, 1k tbn, 60 tbc
      Stream #0:1: Audio: mp3, 22050 Hz, stereo, s16p, 64 kb/s
  </code></pre>