Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

RTMPDump - how do I compile source code in Windows?

(http://stream-recorder.com/forum/showthread.php?t=8123)

Sam123 06-30-2009 06:44 PM

RTMPDump - how do I compile source code in Windows?


 
Ok, I got the source code for rtmpdump but what do I do with it? What do I use to compile it into a program?

Stream Recorder 07-01-2009 02:10 AM

Re: RTMPDump - how do I compile source code?


 
What OS do you want to compile for: Windows, Mac OS, Linux?

Related threads:
How do you compile rtmpdump in Mac OS X 10.6?
RTMPDump - how do I compile source code in Windows?

Sam123 07-01-2009 11:56 AM

Re: RTMPDump - how do I compile source code?


 
I use Windows XP.

qashairy 07-01-2009 12:18 PM

Re: RTMPDump - how do I compile source code?


 
I use Win 7

Stream Recorder 07-01-2009 09:33 PM

Re: RTMPDump - how do I compile source code?


 
The readme of rtmpdump says:
Code:

To compile just type

  $ make rtmpdump
  $ make streams

or to cross compile

 $ make -f MakefileWIN32 rtmpdump
 $ make -f MakefileARM rtmpdump
 $ make -f MakefileARM streams

So it seems to be pretty easy to compile rtmpdump in Linux. You just need the boost libraries and libssl-dev package.

I believe that in Windows you need cygwin, plus the boost libraries, libssl and gcc/c++ compiler should be available under cygwin.

I saw a blog post about compiling rtmpdump 1.3d with Visual Studio 2008 without cygwin, but it is about an old version an the author wasn't sure he did everything properly.

Please let me know how it goes...

Stream Recorder 07-01-2009 09:33 PM

Re: RTMPDump - how do I compile source code?


 
The readme of rtmpdump says:
Code:

To compile just type

  $ make rtmpdump
  $ make streams

or to cross compile

 $ make -f MakefileWIN32 rtmpdump
 $ make -f MakefileARM rtmpdump
 $ make -f MakefileARM streams

So it seems to be pretty easy to compile rtmpdump in Linux. You just need the boost libraries and libssl-dev package.

I believe that in Windows you need cygwin, plus the boost libraries, libssl and gcc/c++ compiler should be available under cygwin.

I saw a blog post about compiling rtmpdump 1.3d with Visual Studio 2008 without cygwin, but it is about an old version an the author wasn't sure he did everything properly.

Please let me know how it goes...

compn 07-26-2009 07:10 AM

Re: RTMPDump - how do I compile source code?


 
cygwin instructions:

install cygwin
during installation, get the following packages:
Code:

gcc4-core, gcc4-g++, make, zlib, binutils, tar, gzip, bzip2, bash, coreutils, crypt, boost, libboost, boost-devel, openssl, openssl-devel
download rtmpdump source from http://lkcl.net/rtmp/
start the cygwin console, and go into the dir with the source
e.g. cd /cygdrive/c/Documents\ and\ Settings/username/Desktop/
unpack source by typing tar -zxvf rtmpdump-v1.6.tar.gz
then cd rtmpdump-v1.6
use a good text program to edit MakefileWIN32 (not notepad!)
change mingw32-gcc to gcc
change mingw32-g++ to g++
change mingw32-ld to ld
save MakefileWIN32

in the cygwin console, type make -f MakefileWIN32
now it should make rtmpdump quickly and give you rtmpdump_win32.exe

common problems:
Quote:

help, i get this error when compiling rtmpdump!
Code:

In file included from rtmp.cpp:36:
rtmp.h:94: error: ISO C++ forbids declaration of 'DH' with no type
rtmp.h:94: error: expected ';' before '*' token
rtmp.h:95: error: ISO C++ forbids declaration of 'RC4_KEY' with no type
rtmp.h:95: error: expected ';' before '*' token
rtmp.h:96: error: ISO C++ forbids declaration of 'RC4_KEY' with no type


it means rtmpdump cant find openssl (in /usr/include/openssl). make sure you installed openssl-devel.
if you installed it somewhere else , you can specify it by editing the makefilewin32 and adding the correct path to your openssl to the cxxflags of MakefileWIN32:
Code:

-I /usr/local/ssl/include/
Quote:

help, i get this error
Code:

/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find
 -lssl


gcc cant find /usr/lib/libssl.a or /usr/lib/libssl.dll.a , make sure you have openssl installed properly (or copy those files to /usr/lib)

guardianx 12-31-2009 03:46 AM

Re: RTMPDump - how do I compile source code?


 
when i download the source file the file makeWIN32 is not there.. wtf?

hyc 12-31-2009 10:56 AM

Re: RTMPDump - how do I compile source code?


 
Read the README, that's what it's there for.

wuang 03-01-2010 10:17 PM

Re: RTMPDump - how do I compile source code?


 
hi,expert,i compiled the rtmpdump with cygwin,how can i remove the
cygwin1.dll depenence,i try use mingw to compile,but failed
help me

hyc 03-02-2010 10:04 PM

Re: RTMPDump - how do I compile source code?


 
Once you have built it as a cygwin build, you cannot remove the dependency on the cygwin DLL. You have to build it as a pure Windows/MinGW binary to avoid the cygwin dependency.

Why can't you just use the Windows build that we already published on the web site? It's a MinGW build.

wuang 03-03-2010 01:05 AM

Re: RTMPDump - how do I compile source code?


 
thank you,hyc

withermage 04-22-2010 06:46 AM

Re: RTMPDump - how do I compile source code?


 
I have of course read this thread.

I tried for about 4 hours to get something to compile it yesterday to no avail.

I was attempting to use MinGW which was referenced in another thread, however I am now downloading Cygwin. I just thought it would be relatively simple to compile the exe and put it some place for me to snag -- clearly thats not the case.

Hopefully I will get it compiled today. Thanks for the help.

withermage 04-22-2010 10:44 AM

Re: RTMPDump - how do I compile source code?


 
Uh yeah. The instructions are bad.

For one, I don't have a Makewin32 file in my source code.

For two, I can't compile the source code with Cygwin, all i get is a prompt that says "make posix" or "make mingw", neither of which work.


Could somebody please compile this source for me so I can grab the executable? it would be much appreciated ^.^

withermage 04-22-2010 11:30 AM

Re: RTMPDump - how do I compile source code?


 
I have progressed forward by moving r440 directory into cygwin/home/user/ directory.

I opened the 'makefile' and see there are other options like make cygwin.

I typed make cygwin and this is the error it's throwing:

The filename, directory or volume label syntax is incorrect

*** librtmp/librtmp.a


I looked in the librtmp directory, there is no file called 'librtmp.a'

withermage 04-22-2010 01:25 PM

Re: RTMPDump - how do I compile source code?


 
Finally compiled -- After clearing out all my previous installs of MinGW and Cygwin and deleting everything/starting fresh i was able to use cygwin to get it compiled. Thanks for this -- it worked wonderfully.

orihancol 10-11-2010 11:58 AM

Re: RTMPDump - how do I compile source code?


 
I was succesfull to compile it but get new error. When I use exercute file (ex: rtmpgw.exe) in Windows, this program get error: "Program too big to fit in memory". I don't know why? Can somebody give me some help? Thanks!

srpenn82 04-01-2011 08:36 AM

Re: compile rtmpdump on windows


 
this is the link to compile rtmpdump on windows

http://srpenn82.blogspot.com/2011/03/rtmpdump.html

Quote:

Originally Posted by srpenn82.blogspot.com
Install
MinGW - http://sourceforge.net/projects/mingw/
Slik SVN - http://www.sliksvn.com/en/download/

PolarSSL
polarssl.org - http://polarssl.org/

make CC=gcc LDFLAGS="-L../library -lpolarssl -lws2_32"

move polarssl-0.14.2\include\polarssl to
MinGW\include\polarssl

move polarssl-0.14.2\library\libpolarssl.a to
MinGW\lib\libpolarssl.a

Compile
svn co svn://svn.mplayerhq.hu/rtmpdump/trunk rtmpdump

mingw-get install libz

make CRYPTO=POLARSSL SHARED= SYS=mingw VERSION=r563

Notes:
if you have installed anything other than mingw-get install libz, you are going to need to reinstall MinGW


advisethis 08-17-2011 05:07 PM

Re: compile rtmpdump on windows


 
Quote:

Originally Posted by srpenn82 (Post 26808)
this is the link to compile rtmpdump on windows

http://srpenn82.blogspot.com/2011/03/rtmpdump.html

Any update on this as following the above directions doesn't work?

svnpenn 08-17-2011 06:46 PM

Re: RTMPDump - how do I compile source code in Windows?


 
http://svnpenn.blogspot.com/2011/06/rtmpdump-mingw.html

Install required packages
mingw-get install libz
mingw-get install msys-wget

Install PolarSSL
wget http://polarssl.org/code/releases/polarssl-0.14.3-gpl.tgz
tar fx polarssl-0.14.3-gpl.tgz
cd polarssl-0.14.3
make CC=gcc LDFLAGS="-L../library -lpolarssl -lws2_32"
make DESTDIR=/MinGW install

Install RTMPdump
wget http://repo.or.cz/w/rtmpdump.git/snapshot/HEAD.tar.gz
tar fx HEAD.tar.gz
cd rtmpdump
make SHARED= SYS=mingw CRYPTO=POLARSSL LIBZ="-lz -static"

Optional, make librtmp.dll
make SYS=mingw CRYPTO=POLARSSL LIBZ="-lz -static"

advisethis 08-17-2011 08:11 PM

Re: RTMPDump - how do I compile source code in Windows?


 
Code:

  Generate      test_suite_aes.c
make[1]: scripts/generate_code.pl: Command not found
make[1]: *** [test_suite_aes.c] Error 127
make: *** [all] Error 2

Keep getting that error

svnpenn 08-18-2011 12:35 AM

Re: RTMPDump - how do I compile source code in Windows?


 
You need to install Perl

mingw-get install msys-perl

advisethis 08-18-2011 12:40 AM

Re: RTMPDump - how do I compile source code in Windows?


 
Thanks for walking me through this.

any ANONYMOUS forum user 09-22-2011 01:41 PM

Re: RTMPDump - how do I compile source code in Windows?


 
I've tried following the directions here by svnpenn and I've gotten polarssl to compile but I cant get RTMPdump to.

I get the error below. Can someone help me out?
Code:

c:\Projects\rtmpdump>make SHARED= SYS=mingw CRYPTO=POLARSSL LIBZ="-lz -static"
make[1]: Entering directory `/c/Projects/rtmpdump/librtmp'
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_POLARSSL  -O2    -c -o rtmp.o rtmp
.c
rtmp.c: In function 'RTMP_Connect1':
rtmp.c:867:7: warning: implicit declaration of function 'ssl_set_ciphers'
rtmp.c:867:7: error: 'ssl_default_ciphers' undeclared (first use in this functio
n)
rtmp.c:867:7: note: each undeclared identifier is reported only once for each fu
nction it appears in
make[1]: *** [rtmp.o] Error 1
make[1]: Leaving directory `/c/Projects/rtmpdump/librtmp'
make: *** [librtmp/librtmp.a] Error 2

c:\Projects\rtmpdump>


AmazingMatze 09-23-2011 03:28 PM

Re: RTMPDump - how do I compile source code in Windows?


 
Hmm. I also had some problems compiling RTMPdump. But it seems to me that your polarssl installation is not correct. For example "ssl_default_ciphers" is a function that should be in here: "C:\MinGW\include\polarssl\ssl.h"

Maybe this command "make DESTDIR=/MinGW install" (copies files into the root directory of your MinGW installation) failed.

Verify that these directories do exit:

C:\MinGW\include\polarssl\*some_polarssl_files*
C:\MinGW\bin\*some_polarssl_files*
C:\MinGW\lib\libpolarssl.a

Btw, I also could only compile RTMPDump in this constellation:

mingw-get-inst-20110530.exe
-Use pre-packaged repository catalogues
-Selected: MinGW Developer Kit (includes Perl)

polarssl-0.14.3-gpl.tgz

svnpenn 09-24-2011 06:38 PM

Re: RTMPDump - how do I compile source code in Windows?


 
http://lists.mplayerhq.hu/pipermail/rtmpdump/2011-September/001627.html

[rtmpdump] branch master updated. 6230845 PolarSSL support now requires version 1.0.0.

Author: Howard Chu <hyc at highlandsun.com>
AuthorDate: Sun Sep 25 03:07:14 2011 -0700

_Nazar_ 03-22-2012 04:27 AM

Re: RTMPDump - how do I compile source code in Windows?


 
Does anyone tried to compile latest source from GIT?
Quote:

git://git.ffmpeg.org/rtmpdump
Quote:

make SHARED= SYS=mingw CRYPTO=POLARSSL LIBZ="-lz -static"
I got

Quote:

Could not locate specified path.
make: *** [librtmp/librtmp.a] Error 1

_Nazar_ 03-23-2012 08:21 AM

Re: RTMPDump - how do I compile source code in Windows?


 
Read this article http://svnpenn.github.com/2012/03/rt...-polarssl-100/

Everything fine.

RadiantThunder 04-07-2012 02:10 PM

Re: RTMPDump - how do I compile source code in Windows?


 
Does this still work ?

I did everything like in the article, but I get a load of 'undefined reference to' errors when issuing the command to make librtmp (the last make command).

The only different thing i did was not using git from inside MinGW to download the source. (of course i edited the make command so it wouldn't use the git version tag)

You can see what i mean in this screenshot

svnpenn 04-07-2012 09:27 PM

Re: RTMPDump - how do I compile source code in Windows?


 
Quote:

Originally Posted by RadiantThunder
Does this still work ?

The script works perfectly.

Honestly I dont know how you were able to mess it up.

RadiantThunder 04-08-2012 11:47 AM

Re: RTMPDump - how do I compile source code in Windows?


 
Quote:

Originally Posted by svnpenn (Post 43103)
The script works perfectly.

Honestly I dont know how you were able to mess it up.

Me neither :(

svnpenn 04-08-2012 12:05 PM

Re: RTMPDump - how do I compile source code in Windows?


 
You can just download the builds if you want

github.com/svnpenn/rtmpdump/downloads

ando824 03-06-2014 09:02 AM

Re: RTMPDump - how do I compile source code in Windows?


 
who can even provide a recent installation instructions for compiling rtmpdump under win 8 for disposal. whether mingw or cygwin I fail at all the old manuals on the net.

Luminal 06-19-2014 05:03 PM

Re: RTMPDump - how do I compile source code in Windows?


 
I'm trying to compile using mingw but I'm getting this error:
Code:

../mingw/bin/id.exe: cannot find -lz
collect2.exe: error ld returned 1 exit status

Is -lz the zlib? I have zlib 1.2.5 extracted into the corresponding bin/include/lib folders. Anyone know what's wrong?

Luminal 06-20-2014 07:39 PM

Re: RTMPDump - how do I compile source code in Windows?


 
Quote:

Originally Posted by Luminal (Post 68492)
I'm trying to compile using mingw but I'm getting this error:
Code:

../mingw/bin/id.exe: cannot find -lz
collect2.exe: error ld returned 1 exit status

Is -lz the zlib? I have zlib 1.2.5 extracted into the corresponding bin/include/lib folders. Anyone know what's wrong?

So I fixed this by installing the zlib 1.2.8 package in mingw. But now I'm getting
Code:

rtmpdump.exe - Entry Point Not Found.
The procedure entry point CRYPTO_memcmp could not be located in the dynamic link library LIBEAY32.dll

after compiling and trying to run rtmpdump. Any help on this?

H3om 09-14-2014 11:46 AM

Re: RTMPDump - how do I compile source code in Windows?


 
Hi to all rtmpdump developer,

i would be glad if a user of the forum could write a new step by step guide is explained in the how the rtmpdump source code with MinGW under Windows 7 is compiled. Unfortunately, many guides on the internet are outdated or the links to the necessary files no longer works.

many thanks :rolleyes:

H3om


All times are GMT -6. The time now is 01:17 AM.