title: How to Check RTMP Live stream is on or off
body: <p>I want to check RTMP live stream  is on or off for mic.</p>
  <p>I have used RTMP DUMP</p>
  <pre><code>exec(&quot;/usr/bin/rtmpdump -V -v -r rtmp://www.exapmle.com/etc./13/mic1 -o /tmp/rtmp-checker.log 2&gt;&amp;1&quot;, $pp);
  </code></pre>
  <p>I have found this trick from
  <a href="http://blog.svnlabs.com/how-to-check-rtmp-source-stream-is-live-or-not/" rel="nofollow noreferrer">http://blog.svnlabs.com/how-to-check-rtmp-source-stream-is-live-or-not/</a></p>
  <p>But I am not satisfied with the result because it doesn't always work, and generates a random string as a result.</p>
  <p>![So some time i am facing this type of error. any perfect solution for this.?][1]
  [1]: http://i.stack.imgur.com/ZrTco.png</p>
  <p>I'm looking for solutions with ffmpeg, or something else.</p>