RTMPDump 2.4 binaries for OS X 10.7 Lion
I just got word from a commenter that RTMPDump 2.4 is out (thanks!). Since the release of Xcode 4 I have been unable to compile the RTMPDump binaries using the supplied Makefile. Actually, the binaries are all there but I always get a signal fault when the rtmpdump binary tries to establish a connection to a target server. I had to resort to plan B which was to import the RTMPDump sources into Xcode and to create a proper console application project.
Since I’m an Xcode noob that was quite a steep learning curve, I tell ya!
Eventually, I succeeded to build combined Intel 32/64 bit binaries but I’ve been unable to verify if they run in OS X versions older than 10.7 Lion. Let me know. Apparently, the rtmpdump binary runs fine in Snow Leopard as well. I’m not sure about rtmpgw, rtmpsrv and rtmpsuck though, so let me know if they’re working properly as well.
Check out the downloads area for the RTMPDump 2.4 package installer.
The package installer will install the librtmp library to /usr/local/lib and the rtmpdump binaries to /usr/local/bin.
You may also be interested to read:
- RTMPDump WARNING: HandShake: Server not genuine Adobe
Since a few days you may get a warning using RTMPDump v2.3 saying “WARNING: HandShake: Server not genuine Adobe!”. RTMPDump v2.3 usually quits with a... - Capture Flash .flv streams with RTMPDump on the Mac
RTMPDump is a very powerful software to download/capture Flash streams. It’s incredibly useful for sites that don’t let you download Flash videos for offline usage.... - Tips & tricks using XPC for Mac OS X 10.7 Lion developer preview 2
The latest XPC EFI boot loader version 0.83.02 allows you to install Mac OS X 10.7 Lion dev preview 2 without having to change or...
Comments(25)








this is working on my MacBook 1,1 OS 10.6.7
thanks
A question… Did you build librtmp.dylib as an entirely separate project? Do you know why Xcode managed to build a working binary but not llvm itself?
Also, when I compare your librtmp.dylib with the librtmp.dylib produced using gmake/llvm in a Terminal, the sizes are drastically different, but the dependencies and exports as reported by otool and nm are similar, except the versioning (your librtmp.dylib reports itself as current+compat v 1.0.0, whereas cmdline built librtmp.dylib reports itself as current+compat v 0.0.0 in an otool -L), is this what makes it “break” or just a weird side effect?
Thankful for your insights, rtmpdump isn’t the only thing that builds on the commandline but breaks when running, so if you know why/how this is happening I’d really appreciate a response!
Marcus.
Marcus, yes, that’s exactly what I did, building the librtmp in its own project. However, I have no idea what goes wrong with the command line make but maybe if you build a debug version, you could gdb into the command line made rtmpdump executable and check at what point the internal exception/signal handler gets called? It may have something to do with SSL since the _sigIntHandler gets triggered in the very early phase of the connection handshake. Are the other “things” you’re referring to using SSL too?
Cheers,
Jan
Looks like it’s not SSL related: The seg fault seems to occur in RTMP_ClientPacket while calling HandleInvoke. Just by looking at the code I think it all happens ins AMF_Decode.
More specifically, it happens in amf.c -> AMFProp_Dump while accessing the property type of a received object (which is the first property of type AMF_OBJECT). Accessing prop->p_type will trigger the segfault if the project was built using Makefile. Does that make any sense?! I guess the problem starts earlier when the object of type AMF_OBJECT is being decoded from the incoming data stream.
Hi,
Just got the comment update notification via mail so I have only given amf.c a cursory glance, but it’s weird, because the way I figure, the pointer is either initialized or not (not, being the case when sigsegv-ing)… The only place AMFProp_Dump seems to be called would be in AMF_Dump, or called recursively from AMFProp_Dump.
From a very quick look you are absolutely correct in your follow-up post, it happens on line 2358 of rtmp.c, so my guess is that the AMF_Decode() a few lines up actually fails to initialize the pointer, or a member of the struct that it points to. I’ll investigate more tomorrow, but I’m still a bit baffled why Xcode succeeds where the regular build doesn’t. Could it be a versioning problem? Since otool -L shows different output for the two different builds of librtmp? Maybe the dynamic loading is dependent on version resolution and it just … breaks? =P
Marcus, did you see the latest change in the rtmpdump repo? It says: “Bring in line with current practice for Darwin dynamic libs” and contains a few changes in the shared object linker flags in Makefile. Looks like you were spot on with your assumption!
Cheers,
Jan
Strangely I’ve seen a simialr behaviour under Ubuntu. Everything is fine until it tries to actually download and then it segfaults. After playing around I found if you disable the shared library when building then it suddenly starts working.
So I built with the command
make SYS=posix SHARED=
Hope that helps anyone else who comes across this post when trying to figure out how to build v2.4
Thanks Mark, but this problem seems to be specific to OS X, more particularly 32bit vs. 64bit architectures and what LLVM does when building them. I believe the problem encountered is the same as here:
https://bugs.kde.org/show_bug.cgi?id=267997
I came across this when building valgrind for Lion, exactly the same segfault upon loading vg’s shared libraries and found this post that explains it all. I figure this is going to be somewhat of a common problem for people building familiar things from source on Lion!
I´m a total newbie. Excuse my question but how do I actually use it after installing the package.
Regards and thanks in advance:)
You can build a working rtmpdump without Xcode by using the clang compiler instead of llvm. To do this, edit both Makefile and librtmp/Makefile, replacing:
CC=$(CROSS_COMPILE)gcc
with
CC=$(CROSS_COMPILE)clang
Then ‘make install SYS=darwin’ as normal
That’s a brilliant tip, Ben. Thanks!
Cheers,
Jan
brilliant binary build. works flawlessly on 10.7 “Lion”.
Thanxxxxxx !
Thanks for this! Have just upgraded to Lion, and was wondering why rtmpdump from MacPorts wasn’t working…
Your build works, but if the directories
/usr/local/bin
/usr/local/lib
don’t already exist, they are created with wrong permissions, which leads to a nonfunctioning rtmpdump.
Frank, thanks for the heads up. Xcode’s PackageMaker doesn’t care about permissions of new directories and since I didn’t include a post-install script in the .pkg you have to set the permissions manually in this case using something like:
sudo chown 0:0 /usr/local/bin && sudo chown 0:0 /usr/local/lib
Cheers,
Jan
Jan, yes I know how to fix it. :)
sudo chown root:wheel xxx
sudo chmod 755 xxx
I just wanted to let you know that you forgot the post-install script. ;)
I suggest you include it for convenience.
Could you post the xcode-project for download?
That’d be great :)
Thanks in advance!
Great work. Thanks for sharing Jan
Ben’s suggestion to change the compiler to clang worked like a charm! Been banging my head for a day with this problem….THANKS!
Jan thanks for this great post but do you know how to uninstall this application from mac?
Thanks in advance!
Works very well on my 10.7. Thank you.
Hi,
how can I build rtmpdump on a powerpc-apple-darwin9.0 ? I don’t have XCode. Where do I get clang?
Following the instructions of Ben #comment-2846, I get the message:
sudo: make: command not found
Or is there already a binary anywhere out there for this plattform?
Thanks!
Hi Trick77, I really need your help with some rtmpe files! Please send me a mail so i can contact you.