title: rtmp Nginx use control endpoint for record?
body: <p>I have nginx compiled with the <a href="https://github.com/arut/nginx-rtmp-module" rel="nofollow noreferrer">rtmp module</a>. I start <code>nginx</code> and run the following to start streaming my webcam which works:</p>
  
  <pre><code>ffmpeg -i /dev/video0 -f flv rtmp://localhost/live/test                                                                                               
  </code></pre>
  
  <p>I then try to use the <a href="https://github.com/arut/nginx-rtmp-module/wiki/Control-module" rel="nofollow noreferrer">control module</a> to start recording:</p>
  
  <pre><code>curl "http://localhost:8080/control/record/start?app=application&amp;name=test&amp;rec=rec1"
  </code></pre>
  
  <p>But the recording event doesn't seem to trigger.</p>
  
  <p>Here is a simplified version of my <code>nginx.conf</code> file:                       </p>
  
  <pre><code>rtmp {                                                                    
    server {                                                                
    # ... more code here                                                    
      recorder rec1 {                                                       
        record all manual;                                                  
        record_suffix all.flv;                                              
        record_path /tmp/rec;                                               
        record_unique on;                                                   
      }                                                                     
    }                                                                       
  }                                                                         
  
  http {                                                                    
    server {                                                                
      listen 8080;                                                          
      server_name localhost;                                                
      location /control {                                                   
        rtmp_control all;                                                   
      }                                                                     
    }                                                                       
    # ... more code here                                                    
  }  
  </code></pre>
  
  <p><em>Note: checked both port 8080 and 1935 are open with <code>nmap</code>.</em></p>
  
  <p><strong><em>Note/Update:</em></strong></p>
  
  <p>I noticed that if I change <code>app=</code> to <code>live</code> I get an actual error message:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;500 Internal Server Error&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="white"&gt;
  &lt;center&gt;&lt;h1&gt;500 Internal Server Error&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx/1.11.1&lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><em>As opposed to the command with the actual app name which returns nothing. This tells me it is working to some extent but I still don't end up with a recoding.</em></p>
  
  <p><em>I'm also trying to switch <code>name=test</code> to <code>name=live</code> neither causes an error response.</em></p>
  
  <p><a href="https://gist.github.com/kirkins/fb811f8caf34d3cdf1d9874050fb1a62" rel="nofollow noreferrer"><em>Complete nginx.conf file.</em></a></p>
  
  <p><strong><em>Update #2:</em></strong></p>
  
  <p>I'm watching <code>/var/log/nginx/error.log</code> while I use the <code>curl</code> command above. Everytime I use it the following is logged:</p>
  
  <pre><code>client 127.0.0.1 closed keepalive connection
  </code></pre>