Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #11  
Old 11-19-2010, 01:38 PM
Spasticus Spasticus is offline
Junior Member
 
Join Date: Jun 2010
Posts: 13
Spasticus is on a distinguished road
Default

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
Reply With Quote
  #12  
Old 12-15-2010, 11:15 AM
warnabas warnabas is offline
Junior Member
 
Join Date: Dec 2010
Posts: 1
warnabas is on a distinguished road
Default

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
Reply With Quote
  #13  
Old 01-04-2011, 03:37 AM
Stream Recorder
 
Posts: n/a
Default

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.

Last edited by Stream Recorder : 04-04-2011 at 10:23 AM. Reason: removed SYS=Posix, since it is a default option
Reply With Quote
  #14  
Old 01-04-2011, 03:37 AM
Stream Recorder
 
Posts: n/a
Default

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'
Reply With Quote
  #15  
Old 03-08-2011, 05:17 PM
BirdOfPrey BirdOfPrey is offline
Junior Member
 
Join Date: Mar 2011
Posts: 3
BirdOfPrey is on a distinguished road
Default

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:

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!

Last edited by BirdOfPrey : 03-09-2011 at 07:03 AM. Reason: Error rectification on the compilation lines for Windows
Reply With Quote
  #16  
Old 03-15-2011, 06:49 PM
DaveFlash DaveFlash is offline
DaveFlash
 
Join Date: Mar 2011
Location: Netherlands
Posts: 4
DaveFlash is on a distinguished road
Default

How do you compile rtmpdump in Mac OS X 10.6?


Quote:
Originally Posted by BirdOfPrey View Post
....

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.

Last edited by DaveFlash : 03-15-2011 at 06:53 PM. Reason: additional information
Reply With Quote
  #17  
Old 03-16-2011, 06:39 AM
hyc hyc is offline
RTMPdump team
 
Join Date: Dec 2009
Posts: 169
hyc will become famous soon enoughhyc will become famous soon enough
Default

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


Quote:
Originally Posted by Stream Recorder View Post
[*]
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.
Reply With Quote
  #18  
Old 03-16-2011, 06:53 AM
hyc hyc is offline
RTMPdump team
 
Join Date: Dec 2009
Posts: 169
hyc will become famous soon enoughhyc will become famous soon enough
Default

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


Quote:
Originally Posted by DaveFlash View Post
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.
Reply With Quote
  #19  
Old 03-16-2011, 07:18 AM
hyc hyc is offline
RTMPdump team
 
Join Date: Dec 2009
Posts: 169
hyc will become famous soon enoughhyc will become famous soon enough
Default

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


Quote:
Originally Posted by BirdOfPrey View Post
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
Reply With Quote
  #20  
Old 03-17-2011, 06:40 PM
BirdOfPrey BirdOfPrey is offline
Junior Member
 
Join Date: Mar 2011
Posts: 3
BirdOfPrey is on a distinguished road
Default

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.
Reply With Quote
Reply Post New Thread
Tags: , , , , , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:23 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons