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 Linux like Ubuntu?

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

Sam123 06-30-2009 06:44 PM

RTMPDump - how do I compile source code in Linux like Ubuntu?


 
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?


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

flysub 07-27-2009 06:19 AM

Re: RTMPDump - how do I compile source code?


 
What is the diference betwen rtmpdump compiled by myself and rtmpdump already compiled ???

Stream Recorder 07-27-2009 10:32 PM

Re: RTMPDump - how do I compile source code?


 
Quote:

Originally Posted by flysub (Post 12094)
What is the diference betwen rtmpdump compiled by myself and rtmpdump already compiled ???

IMHO some people don't like torrents, so they can't download the binary of rtmpdump, but the source code can be downloaded easily.

Plus compiling is useful for those who are intended to make changes to rtmpdump.

elch 03-21-2010 11:10 AM

Re: RTMPDump - how do I compile source code?


 
The boost libs are not necessary anymore since it is now plain C code.

marsm 09-16-2010 08:34 AM

Re: RTMPDump - how do I compile source code?


 
I've been trying to compile the latest version (2.30) of RTMP in Centos, 64-bit... keep getting errors - can someone please point me in the right direction...

I type in make sys-linux

I then get this back:

# make sys=linux
make[1]: Entering directory `/rtmpdump/librtmp'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/rtmpdump/librtmp'
gcc -Wall -o rtmpgw rtmpgw.o thread.o -Llibrtmp -lrtmp -lssl -lcrypto -lz
thread.o: In function `ThreadCreate':
thread.c.text+0x46): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [rtmpgw] Error 1

Any help would be massively appreciated.

I've also done this:

# make linux
make: *** No rule to make target `linux'. Stop.

marsm 09-16-2010 09:01 AM

Re: RTMPDump - how do I compile source code?


 
I have finally complied it - now I have a new error:

rtmpdump: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory

Once again, any advice would be appreciated.

orihancol 10-11-2010 04:26 AM

Re: RTMPDump - how do I compile source code?


 
Hello Marsm!

I also get error like you do:
thread.o: In function `ThreadCreate':
thread.c.text+0x46): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [rtmpgw] Error 1

Can you help me fix this error ?
Thanks much!

Skeeve 10-30-2010 03:17 PM

Re: RTMPDump - how do I compile source code?


 
I fixed it by installing openssl not to /usr/local/openssl but to /usr/local

Skeeve 10-31-2010 02:08 AM

Re: RTMPDump - how do I compile source code?


 
Quote:

Originally Posted by Skeeve (Post 22632)
I fixed it by installing openssl not to /usr/local/openssl but to /usr/local

Not fixed :-(

When running rtmpdump I get

Quote:

RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
dyld: lazy symbol binding failed: Symbol not found: _EVP_sha256
Referenced from: /usr/local/lib/librtmp.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _EVP_sha256
Referenced from: /usr/local/lib/librtmp.0.dylib
Expected in: flat namespace

Trace/BPT trap
rtmpsrv gives me a Bus Error when accessing it :(

Spasticus 11-19-2010 12:38 PM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
What am I doing wrong here? I have OpenSSL installed.

crossleyd@VMU:~/rtmpdump$ make rtmpdump
make[1]: Entering directory `/home/crossleyd/rtmpdump/librtmp'
gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o rtmp.o rtmp.c
rtmp.c:40:25: error: openssl/ssl.h: No such file or directory
rtmp.c:41:25: error: openssl/rc4.h: No such file or directory

warnabas 12-15-2010 10:15 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
TO ALL WHO HAVE THIS ERROR
Code:

rtmpdump: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory
when you have installed rtmpdump, you should enter the librtmp directory and make a couple of steps:
1. make
2. sudo cp librtmp.so.0 /lib

so, thats it!

p.s. btw, you should enter SYS=posix, not SYS=linux

Stream Recorder 01-04-2011 02:37 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Just compiled rtmpdump from SVN in Ubuntu 10.10 Maverick:
  1. Install the tools needed for accessing the code and compilation:
    Code:

    sudo apt-get install build-essential gcc make subversion libssl0.9.8 libssl-dev libssl0.9.8
  2. Check out the latest code from the Subversion repository:
    Code:

    svn co svn://svn.mplayerhq.hu/rtmpdump rtmpdump
  3. Code:

    cd rtmpdump
    cd trunk

  4. Code:

    make

And use the following to install:
Code:

sudo make install
Please correct me if something is wrong in my steps.

Stream Recorder 01-04-2011 02:37 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Code:

streamrecorder@ripmachine:~$ sudo apt-get install build-essential gcc make subversion libssl0.9.8 libssl-dev libssl0.9.8
[sudo] password for streamrecorder:
Reading package lists... Done
Building dependency tree     
Reading state information... Done
build-essential is already the newest version.
gcc is already the newest version.
make is already the newest version.
libssl-dev is already the newest version.
libssl0.9.8 is already the newest version.
subversion is already the newest version.
The following package was automatically installed and is no longer required:
  libtextcat-data-utf8
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
streamrecorder@ripmachine:~$ svn co svn://svn.mplayerhq.hu/rtmpdump rtmpdump
U    rtmpdump/trunk/librtmp/librtmp.pc.in
U    rtmpdump/trunk/librtmp/rtmp.c
U    rtmpdump/trunk/librtmp/handshake.h
U    rtmpdump/trunk/librtmp/Makefile
U    rtmpdump/trunk/rtmpsrv.c
U    rtmpdump/web/index.html
Checked out revision 565.
streamrecorder@ripmachine:~$ cd rtmpdump/trunk
streamrecorder@ripmachine:~/rtmpdump/trunk$ make
make[1]: Entering directory `/home/streamrecorder/rtmpdump/trunk/librtmp'
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC  -c -o rtmp.o rtmp.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC  -c -o log.o log.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC  -c -o amf.o amf.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC  -c -o hashswf.o hashswf.c
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC  -c -o parseurl.o parseurl.c
ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
gcc -shared -Wl,-soname,librtmp.so.0  -o librtmp.so.0 rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz
ln -sf librtmp.so.0 librtmp.so
make[1]: Leaving directory `/home/streamrecorder/rtmpdump/trunk/librtmp'
gcc -Wall  -o rtmpdump rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz 
gcc -Wall  -o rtmpgw rtmpgw.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz 
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.3\"  -O2  -c -o rtmpsrv.o rtmpsrv.c
gcc -Wall  -o rtmpsrv rtmpsrv.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz 
gcc -Wall  -o rtmpsuck rtmpsuck.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz 
streamrecorder@ripmachine:~/rtmpdump/trunk$ sudo make install
make[1]: Entering directory `/home/streamrecorder/rtmpdump/trunk/librtmp'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/streamrecorder/rtmpdump/trunk/librtmp'
mkdir -p /usr/local/bin /usr/local/sbin /usr/local/man/man1 /usr/local/man/man8
cp rtmpdump /usr/local/bin
cp rtmpgw rtmpsrv rtmpsuck /usr/local/sbin
cp rtmpdump.1 /usr/local/man/man1
cp rtmpgw.8 /usr/local/man/man8
make[1]: Entering directory `/home/streamrecorder/rtmpdump/trunk/librtmp'
sed -e "s;@prefix@;/usr/local;" -e "s;@libdir@;/usr/local/lib;" \
                -e "s;@VERSION@;v2.3;" \
                -e "s;@CRYPTO_REQ@;libssl,libcrypto;" \
                -e "s;@PRIVATE_LIBS@;;" librtmp.pc.in > librtmp.pc
mkdir -p /usr/local/include/librtmp /usr/local/lib/pkgconfig /usr/local/man/man3
cp amf.h http.h log.h rtmp.h /usr/local/include/librtmp
cp librtmp.a /usr/local/lib
cp librtmp.pc /usr/local/lib/pkgconfig
cp librtmp.3 /usr/local/man/man3
cp librtmp.so.0 /usr/local/lib
cd /usr/local/lib; ln -sf librtmp.so.0 librtmp.so
make[1]: Leaving directory `/home/streamrecorder/rtmpdump/trunk/librtmp'


BirdOfPrey 03-08-2011 04:17 PM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Hi all!
I'm quite a fan of RTMPDump as it allows me to schedule the download of my favourite live streams and watch them when I have the time for them, with a little program I made.

In some cases when an error was thrown RTMPDump2.3 does not close the window (specifically when recv receives -1) so I needed to modify librtmp to suit my needs.
Although the README file on the source package is quite helpful it seems it is a bit outdated, so here is a guide to compile RTMPDump with the current release.

Here is my experience with compiling RTMPDump2.3 with Ubuntu Maverick.
First compile I compiled for linux to see if all is ok.
Download and install OpenSSL:
Code:

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./config
make
sudo make install

Download and install libz:
Code:

wget http://zlib.net/zlib-1.2.5.tar.gz
tar xvzf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure
make
sudo make install

go to cd rtmpdump-2.3 directory and edit Makefile line
Code:

LIB_OPENSSL=-lssl -lcrypto
to
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl
finally make the project
Code:

make INC=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib
If all goes ok, you'll get the rtmpdump binary built!

Having the linux version built I started the adventure of cross compiling it for windows
So I extracted the rtmpdump-2.3 tgz to another folder, rtmpdump-2.3Win in order not to screw up the linux built version
Code:

wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz
tar xvzf rtmpdump-2.3.tgz rtmpdump-2.3Win
cd rtmpdump-2.3Win/

PS-the svn version didn't compile, use the tzg version!

To cross compile anything for windows you need mingw32 which you get with the command
Code:

sudo apt-get install mingw32

Then configure the openSSL for windows
Code:

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./Configure mingw --prefix=`pwd`/win32libs -DL_ENDIAN -DOPENSSL_NO_HW  --cross-compile-prefix=i586-mingw32msvc-
make

Get zlib already compiled for windows (less hassle this way)
Code:

wget http://zlib.net/zlib125-dll.zip
unzip zlib125-dll.zip
cd lib
cp zdll.lib libz.a

Then issue this magic command, where you should replace
  • -I/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/include/ for the path where the openssl includes are located (ssl.h, rc4.h, etc).
  • -I/home/birdofprey/rtmpdump-2.3Win/include/ for the path where the zlib includes are located (zlib.h, zconf.h)
  • -L/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/ with the path that leads you to the newly built windows libs libcrypto.a and libssl.a
  • -L/home/birdofprey/rtmpdump-2.3Win/lib for the path of your extracted libz.a.


Code:

make SYS=mingw INC="-I/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/include/ -I/home/birdofprey/rtmpdump-2.3Win/include/ -I/usr/i586-mingw32msvc/include/ -I/usr/local/include/" LDFLAGS="-L/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/ -L/usr/i586-mingw32msvc/lib/ -L/home/birdofprey/rtmpdump-2.3Win/lib" XCFLAGS="-DWIN32 -D_WIN32" CROSS_COMPILE=i586-mingw32msvc-
et voila you get a brand new rtmpdump.exe

to test it on linux do
Code:

sudo apt-get install wine
wine rtmpdump

and you'll get the marvelous strings::D

Code:

RTMPDump v2.3 Mod BirdOfPrey
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
ERROR: You must specify a hostname (--host) or url (-r "rtmp://host[:port]/playpath") containing a hostname

To put it working on windows you need to put rtmpdump.exe, librtmp.dll and zlib1.dll in the same folder.

Have fun compiling RTMPDump!:cool: :cool:

DaveFlash 03-15-2011 05:49 PM

How do you compile rtmpdump in Mac OS X 10.6?


 
Quote:

Originally Posted by BirdOfPrey (Post 25888)
....

go to cd rtmpdump-2.3 directory and edit Makefile line
Code:

LIB_OPENSSL=-lssl -lcrypto
to
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl
finally make the project
Code:

make INC=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib
If all goes ok, you'll get the rtmpdump binary built!

Having the linux version built I started the adventure of cross compiling it for windows
So I extracted the rtmpdump-2.3 tgz to another folder, rtmpdump-2.3Win in order not to screw up the linux built version
Code:

wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz
tar xvzf rtmpdump-2.3.tgz rtmpdump-2.3Win
cd rtmpdump-2.3Win/

PS-the svn version didn't compile, use the tzg version!
...

While looking for a solution to the same problem as you guys "handshake.h:67:2: error: #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256" rtmpdump 2.3 apparently is not recognizing openssl1.0.0d as higher version than the minimum req. 0.9.8.

I'm have an iMac with OS X 10.5.8 and a Snow Leopard dualbooted macbookpro (both 10.6.6 [stable] + 10.6.7 [beta]), on both machine and all 3 OS versions I get the same error. The reason I specifically quoted the above was that I though trying the same edit on the makefile
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl
would make the problem go away, but it didn't.

So any help will be appreciated. Also, even though you use Linux, it doesn't make a difference, because both linux and mac os ar based on Unix, which means the comandline/terminal is the same.

//Dave

UPDATE: I currently have rtmpdump 2.2 installed via macports,
but the reason to manually build directly from src of "rtmpdump.mplayerhq.hu" is because the port for it hasn't been updated to v2.3 yet.
So for me i cannot currently use macports to update it. Also, both openssl and zlib are installed in their latest version, so that can't be why it fails to build.

hyc 03-16-2011 05:39 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by Stream Recorder (Post 24233)
[*]
Code:

make SYS=posix
And use the following to install:
Code:

sudo make install
Please correct me if something is wrong in my steps.

"SYS=posix" is the default in the Makefile so there's actually no need to set it explicitly. But for consistency, if you're going to specify it, you should also set it on the "make install" command.

hyc 03-16-2011 05:53 AM

Re: How do you compile rtmpdump in Mac OS X 10.6?


 
Quote:

Originally Posted by DaveFlash (Post 26220)
While looking for a solution to the same problem as you guys "handshake.h:67:2: error: #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256" rtmpdump 2.3 apparently is not recognizing openssl1.0.0d as higher version than the minimum req. 0.9.8.

I'm have an iMac with OS X 10.5.8 and a Snow Leopard dualbooted macbookpro (both 10.6.6 [stable] + 10.6.7 [beta]), on both machine and all 3 OS versions I get the same error. The reason I specifically quoted the above was that I though trying the same edit on the makefile
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl
would make the problem go away, but it didn't.

So any help will be appreciated. Also, even though you use Linux, it doesn't make a difference, because both linux and mac os ar based on Unix, which means the comandline/terminal is the same.

//Dave

No, unfortunately MacOSX is NOT the same as every other Unix system. That's why the README says to use "make SYS=darwin" on MacOSX.

You can't just go typing random stuff in here. If you don't know how to compile software on your OS, go learn how. MacOSX has no libdl, so of course randomly adding "-ldl" to a Makefile variable won't fix any of your problems. It would only cause more problems. If you don't understand what that sentence meant, you need to go learn more before you're ready to build this.

Quote:

finally make the project
Code:

make INC=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib

This is the key step. If you installed a private copy of OpenSSL, you have to tell where that copy resides, and this is how it's done. If you don't get these paths right, then the compiler will only find the old version of OpenSSL that's in your default system location, and that's why you still get the complaint that your OpenSSL is too old even though you installed a newer one.

hyc 03-16-2011 06:18 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by BirdOfPrey (Post 25888)
Hi all!
I'm quite a fan of RTMPDump as it allows me to schedule the download of my favourite live streams and watch them when I have the time for them, with a little program I made.

In some cases when an error was thrown RTMPDump2.3 does not close the window (specifically when recv receives -1) so I needed to modify librtmp to suit my needs.
Although the README file on the source package is quite helpful it seems it is a bit outdated, so here is a guide to compile RTMPDump with the current release.

Here is my experience with compiling RTMPDump2.3 with Ubuntu Maverick.
First compile I compiled for linux to see if all is ok.
Download and install OpenSSL:
Code:

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./config
make
sudo make install


It would have been sufficient just to use
Code:

apt-get install libssl-dev
Note that most distros provide OpenSSL built with shared libraries. If you want to build it yourself, you should have used
Code:

./config shared
And then you would not have needed to add "-ldl" to LIB_OPENSSL.
Generally if you're on Linux and you think that you need to edit the Makefile, you're doing something wrong.

Quote:

go to cd rtmpdump-2.3 directory and edit Makefile line
Code:

LIB_OPENSSL=-lssl -lcrypto
to
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl


BirdOfPrey 03-17-2011 05:40 PM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
hyc tkx very much for the tips! I didn't know I had to use the shared library version of openssl, I just fixed the issues as they came along;)

Although the modded version I did works as expected, now exiting in a specific error that rtmpdump gives, I think it's not very normal for this to happen, as this problem is happening too often now. I'll post the problem in main forum.

bat999 04-29-2011 01:14 PM

Re: Where can I download the latest version of rtmpdump (source + binaries)?


 
Hi
Thanks for your work KSV.
I've used the binaries with Windows.:)

When the program runs it says:-
Code:

RTMPDump v2.3 r568 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL

But when I compile RTMPDump from SVN for Linux, it says:-
Code:

RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL

Please can somebody explain how I can get my SVN compiled Linux RTMPDump to display the revision number?
Is it a matter of editing a file before I compile?:confused:

svnpenn 04-29-2011 02:46 PM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
make VERSION=r568

bat999 04-29-2011 03:13 PM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by svnpenn (Post 28304)
make VERSION=r568

Very close! :D

make VERSION=r568 gives:-
Code:

RTMPDump r568
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL

So I've used:-
make VERSION="v2.3\ r568"

This gives:-
Code:

RTMPDump v2.3 r568
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL

Thanks for the help.:cool: :cool:

In case anyone's interested, this is the command I used to compile for Ubuntu:-

Code:

svn co svn://svn.mplayerhq.hu/rtmpdump/trunk rtmpdump && \
cd rtmpdump && \
make VERSION="v2.3\ r568" && \
sudo checkinstall --pakdir "$HOME/Desktop" --pkgname rtmpdump \
--pkgversion "2.3-r568" --backup=no --deldoc=yes --default && sudo ldconfig


tommieie 08-28-2011 04:54 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by BirdOfPrey (Post 25888)
Hi all!
I'm quite a fan of RTMPDump as it allows me to schedule the download of my favourite live streams and watch them when I have the time for them, with a little program I made.

In some cases when an error was thrown RTMPDump2.3 does not close the window (specifically when recv receives -1) so I needed to modify librtmp to suit my needs.
Although the README file on the source package is quite helpful it seems it is a bit outdated, so here is a guide to compile RTMPDump with the current release.

Here is my experience with compiling RTMPDump2.3 with Ubuntu Maverick.
First compile I compiled for linux to see if all is ok.
Download and install OpenSSL:
Code:

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./config
make
sudo make install

Download and install libz:
Code:

wget http://zlib.net/zlib-1.2.5.tar.gz
tar xvzf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure
make
sudo make install

go to cd rtmpdump-2.3 directory and edit Makefile line
Code:

LIB_OPENSSL=-lssl -lcrypto
to
Code:

LIB_OPENSSL=-lssl -lcrypto -ldl
finally make the project
Code:

make INC=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib
If all goes ok, you'll get the rtmpdump binary built!

Having the linux version built I started the adventure of cross compiling it for windows
So I extracted the rtmpdump-2.3 tgz to another folder, rtmpdump-2.3Win in order not to screw up the linux built version
Code:

wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz
tar xvzf rtmpdump-2.3.tgz rtmpdump-2.3Win
cd rtmpdump-2.3Win/

PS-the svn version didn't compile, use the tzg version!

To cross compile anything for windows you need mingw32 which you get with the command
Code:

sudo apt-get install mingw32

Then configure the openSSL for windows
Code:

wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
tar xvzf openssl-1.0.0d.tar.gz
cd openssl-1.0.0d
./Configure mingw --prefix=`pwd`/win32libs -DL_ENDIAN -DOPENSSL_NO_HW  --cross-compile-prefix=i586-mingw32msvc-
make

Get zlib already compiled for windows (less hassle this way)
Code:

wget http://zlib.net/zlib125-dll.zip
unzip zlib125-dll.zip
cd lib
cp zdll.lib libz.a

Then issue this magic command, where you should replace
  • -I/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/include/ for the path where the openssl includes are located (ssl.h, rc4.h, etc).
  • -I/home/birdofprey/rtmpdump-2.3Win/include/ for the path where the zlib includes are located (zlib.h, zconf.h)
  • -L/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/ with the path that leads you to the newly built windows libs libcrypto.a and libssl.a
  • -L/home/birdofprey/rtmpdump-2.3Win/lib for the path of your extracted libz.a.


Code:

make SYS=mingw INC="-I/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/include/ -I/home/birdofprey/rtmpdump-2.3Win/include/ -I/usr/i586-mingw32msvc/include/ -I/usr/local/include/" LDFLAGS="-L/home/birdofprey/rtmpdump-2.3Win/openssl-1.0.0d/ -L/usr/i586-mingw32msvc/lib/ -L/home/birdofprey/rtmpdump-2.3Win/lib" XCFLAGS="-DWIN32 -D_WIN32" CROSS_COMPILE=i586-mingw32msvc-
et voila you get a brand new rtmpdump.exe

to test it on linux do
Code:

sudo apt-get install wine
wine rtmpdump

and you'll get the marvelous strings::D

Code:

RTMPDump v2.3 Mod BirdOfPrey
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
ERROR: You must specify a hostname (--host) or url (-r "rtmp://host[:port]/playpath") containing a hostname

To put it working on windows you need to put rtmpdump.exe, librtmp.dll and zlib1.dll in the same folder.

Have fun compiling RTMPDump!:cool: :cool:

Can you help me with this compile? I'm fairly new to compiling C-code in Ubuntu, but I did follow your manual very carefully, however I get the following error:

tom@ubuntu:~/Downloads/rtmpdump-2.3$ make INC=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib
make[1]: Entering directory `/home/tom/Downloads/rtmpdump-2.3/librtmp'
gcc -shared -Wl,-soname,librtmp.so.0 -L/usr/local/ssl/lib -o librtmp.so.0 rtmp.o log.o amf.o hashswf.o parseurl.o -lssl -lcrypto -lz
/usr/bin/ld: /usr/local/ssl/lib/libssl.a(s23_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [librtmp.so.0] Error 1
make[1]: Leaving directory `/home/tom/Downloads/rtmpdump-2.3/librtmp'
make: *** [librtmp/librtmp.a] Error 2
tom@ubuntu:~/Downloads/rtmpdump-2.3$

Can you please give an indication where it does go wrong?

Thanks!

bat999 08-28-2011 06:45 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by tommieie (Post 32004)
Can you help me with this compile? I'm fairly new to compiling C-code in Ubuntu

Which version of Ubuntu is installed?

tommieie 08-29-2011 12:44 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Ubuntu 11.04 it is

bat999 08-29-2011 05:03 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by tommieie (Post 32024)
Ubuntu 11.04 it is

No need to compile RTMPDump v2.3 yourself.
It's in the 11.04 repo.
Code:

sudo apt-get install rtmpdump

tommieie 08-30-2011 11:16 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
thank you mr, that worked!

karlo2105 09-20-2011 02:15 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
For Ubuntu linux users, you can add this PPA to get the latest rtmpdump version. :D

StreamRecorder 09-29-2013 03:28 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
How to compile rtmpdump with KSV patches in Ubuntu 13.04
Download rtmpdump from git://git.ffmpeg.org/rtmpdump
Code:

git clone git://git.ffmpeg.org/rtmpdump
Install dependencies
Code:

sudo apt-get install build-essential gcc make subversion libssl-dev
Download KSV patch from https://github.com/K-S-V/Scripts/releases/tag/v2.4. Extract the archive and put the Patch.diff file into the folder with rtmpdump sources. Apply the KSV patch:
Code:

patch -p0 -i Patch.diff
If rtmpdump is already installed via sudo apt-get install, then do the following:
Code:

rtmpdump installed
cd librtmp
make
sudo cp librtmp.so.0 /lib
cd ..

Compile and install rtmpdump
Code:

make SYS=posix
sudo make install


yetanotherday 03-21-2014 05:52 AM

Re: RTMPDump - how do I compile source code in Linux like Ubuntu?


 
Quote:

Originally Posted by StreamRecorder (Post 63479)
How to compile rtmpdump with KSV patches in Ubuntu 13.04
Download rtmpdump from git://git.ffmpeg.org/rtmpdump
Code:

git clone git://git.ffmpeg.org/rtmpdump
Install dependencies
Code:

sudo apt-get install build-essential gcc make subversion libssl-dev
Download KSV patch from https://github.com/K-S-V/Scripts/releases/tag/v2.4. Extract the archive and put the Patch.diff file into the folder with rtmpdump sources. Apply the KSV patch:
Code:

patch -p0 -i Patch.diff
If rtmpdump is already installed via sudo apt-get install, then do the following:
Code:

rtmpdump installed
cd librtmp
make
sudo cp librtmp.so.0 /lib
cd ..

Compile and install rtmpdump
Code:

make SYS=posix
sudo make install


you are my hero :D

greek33 07-10-2014 04:47 AM

Re: RTMPDump - how do I compile source code?


 
I couldn't find an rtmpdump file on my pc. do I create one?


All times are GMT -6. The time now is 01:03 PM.