Install rtmpdump in CentOS


Hits: 9743  

I was compiling FFmpeg with RTMP support, but it requires librtmp >= 2.2.f

[root@svnlabs ffmpeg]# ./configure –enable-gpl –enable-nonfree –enable-libmp3lame –enable-libfaac –enable-librtmp –enable-libtheora –enable-libvorbis –enable-libx264 –enable-shared –enable-postproc –disable-yasm
Package librtmp was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtmp.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘librtmp’ found
ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.log” produced by configure as this will help
solving the problem.
  
[root@svnlabs ffmpeg]# rtmpdump -v
RTMPDump v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname

Compiling latest rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# yum install openssl-devel

[root@svnlabs rtmpdump-2.3]# wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# tar xvf rtmpdump-2.3.tgz

[root@svnlabs rtmpdump-2.3]# cd rtmpdump-2.3
[root@svnlabs rtmpdump-2.3]# make
[root@svnlabs rtmpdump-2.3]# make install

Latest rtmpdump successfully installed…

[root@svnlabs rtmpdump-2.3]# rtmpdump
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname
 
 
[root@svnlabs rtmpdump-2.3]# whereis librtmp
librtmp: /usr/local/lib/librtmp.a /usr/local/lib/librtmp.so

If You still have issue … you can try magic path command 😉

# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

 

How to check RTMP source stream is live or not?

 

How to check RTMP source stream is live or not?


Hits: 21659  
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://giraldatvlivefs.fplive.net/giraldatvlive-live/stream001 -o /tmp/rtmp-checker.log

RTMP Output
<?php

/* 
 * 
 * RTMPChecker - by S V N L A B S () (blog.svnlabs.com)
 * 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);

}


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

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

</body>
</html>

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…