Archive for December, 2011

Compiling rtmpdump from source

2011-12-29

Today I needed to upgrade rtmpdump to a newer version than the one supplied with Ubuntu 11.10. Compiling and installing was very easy:

git clone git://git.ffmpeg.org/rtmpdump
cd rtmpdump
make
sudo make install

But the resulting binary still failed with this error message:

WARNING: HandShake: Type mismatch: client sent 6, server answered 9
WARNING: HandShake: Server not genuine Adobe!
ERROR: RTMP_Connect1, handshake failed.

After a bit of digging it turned out that my new rtmpdump used the old dynamic library. I had to set the rpath of the new binary, so that it used the new version of the library. There are several ways to do this; I choose to recompile with:

make clean
make XLDFLAGS='-Xlinker -rpath -Xlinker /usr/local/lib'
sudo make instal