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.

52 replies on “RTMPDump 2.4 binaries for OS X 10.7 Lion”

  1. Thanks for this binary.

    I’ve just tested it on this culinary trailer:
    and it worked fine.

    My config: Mac OS X 10.6.8/iMac11,2 (2011)/Intel Core i5@3,6 GHz.

  2. Hey, I’m trying to use your library in a mac osx application and I’m unsure of the header files I should use to use the library in my code. Could you point me in the right direction?

  3. Thanks for posting this binary, attempting to build myself almost brought me to tears. Where did you get the 2.4 source from though? on http://rtmpdump.mplayerhq.hu/ I could only find the 2.3 source (2.4 windows build was there however)

  4. Hi, thanks alot, I got the rtmp installed and everything!. But how do i use it from the Terminal?

    I can execute the script, but i am a bit confused as how to give it the right channel address and such, can you please give me the whole syntax for connecting to http://www.twitch.tv/tobiwandota ?

    Thanks alot :)

  5. From my home directory (and others) I get:

    -bash: rtmpdump: command not found

    Using osx 10.7.5

  6. sukoshi$ rtmpdump
    RTMPDump 2.4
    (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

  7. After install of rtmpdump 2.4, how will I start it? No app in applications, and I don’t find it from the unix command prompt either.

  8. I ran the pkg installer which said installation was successful, but it doesn’t appear to have installed anything. At least, not into /usr/local/bin or /usr/local/lib. Any ideas?

    I’m running 10.7.2.

  9. @Jeremy, you may be right. It hung just after saying “Connected” and didn’t appear to actually be downloading anything.

    I don’t have the knowledge to diagnose any further. 2.3 seems to work for now anyway.

    Out of interest, and if you have time to think about it, what do you think the problem with 2.4 might be? Would compiling in Xcode help ( not that I’d know how to do that necessarily!)?

  10. Your binary of rtmpdump 2.4 failed for me on Snow Leopard (10.6.8). It just hangs and the entire system grinds to a halt. You have to restart.

    Your binary of 2.3 for Snow Leopard did work though.

    I was calling both indirectly, through get_iplayer.

  11. Hi there, I’m getting the following error with version 2.4:
    WARNING: HandShake: Type mismatch: client sent 6, server answered 9

    Any ideas?

  12. Dear all who got the “Installed the package but keep getting “No suitable image found. Did find: /usr/local/lib/librtmp.dylib: stat() failed with errno=13″ error :

    just change the permission on the folder and content :

    sudo chmod -R 755 /usr/local/lib

    Et voilà !

  13. I was getting some build problems. I’d hacked the Makefile to make it build successfully, but then I got segfaults.

    I then realised none of that was necessary (“git reset –hard” time). All I needed to do was run “make SYS=darwin” (and “make SYS=darwin install”), and it worked great.

    Make sure you are using the git version from git://git.ffmpeg.org/rtmpdump (the tarballs are outdated).

  14. Timmyd, open terminal then type ‘cd /usr/local/bin’ (without the quotes). Then it’s ‘./rtmpdump’ to execute.
    You might have to run the shell under your account though (bash/shell), which case it’s ‘su (your username)’ and it’ll ask for your password.

    Still getting the librtmp errors though, hopefully Jan will be able to help.

  15. So I installed this on 10.7.3, but I cant find where it went…where is it. No usr/local/bin to install to

  16. Installed the package but keep getting “No suitable image found. Did find: /usr/local/lib/librtmp.dylib: stat() failed with errno=13” error.

    Any advice?

    *Did try using your 2.3 build which appears to work but all streams fail with the error “NetStream.Play.StreamNotFound”, yet the stream plays perfectly fine under Windows using rtmpdump 2.4.

  17. Hello !

    Can someone explain how to build RTMPDump from source under 10.7.3 Lion and Xcode 4.2.1 ?


  18. Hi Trick77, I really need your help with some rtmpe files! Please send me a mail so i can contact you.

  19. 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?


  20. Jan thanks for this great post but do you know how to uninstall this application from mac?

    Thanks in advance!

  21. 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.

  22. 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


  23. Your build works, but if the directories

    don’t already exist, they are created with wrong permissions, which leads to a nonfunctioning rtmpdump.

  24. Thanks for this! Have just upgraded to Lion, and was wondering why rtmpdump from MacPorts wasn’t working…

  25. 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:




    Then ‘make install SYS=darwin’ as normal

  26. I´m a total newbie. Excuse my question but how do I actually use it after installing the package.

    Regards and thanks in advance:)

  27. 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:


    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!

  28. 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

  29. 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!


  30. 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

  31. 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.

  32. 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.

  33. 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?


  34. 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!


Comments are closed.