How to check RTMP source stream is live or not?

Hits: 21643  
RTMP Source Check RTMP Source RTMP Live Stream

Dear Friends,
You can check RTMP Source is live or not using socket programming, but that will not give you exact output. Today I have tried Linux utility “rtmpdump” to test & check RTMP Source it produced quite interesting results on command line….

# rtmpdump -v -r rtmp:// -o /tmp/rtmp-checker.log

RTMP Output

 * RTMPChecker - by S V N L A B S () (
 * You can use and modify this code as long as the above reference to me still exists 😉

if(isset($_REQUEST['stream']) && $_REQUEST['stream']!="")

  exec("/usr/bin/rtmpdump -V  -v -r '".$_REQUEST['stream']."' -o /tmp/rtmp-checker.log 2>&1", $pp);
  echo implode("<br>", $pp);


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Check RTMP is live or not?</title>

<form name="rtmp" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="text" name="stream" value="rtmp://" /><br />
<input type="submit" name="check" value="check" />


Output may be…

Night is longer than day for those who dream & Day is longer than nights for those who MAKE their DREAMS come true…

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch