Compile librtmp on windows
#1
Hi,

Can someone please shed some light on how to compile librtmp on windows?
I mean, can I setup a Visual Studio project and compile?

Thx.
Reply
#2
Ok,

I somehow picked enough info to make it, so if others are interested here is what I did:
(note this is for building rtmpdump + librtmp).

1) Download and install MinGW ("A native Windows port of the GNU Compiler Collection (GCC)"): here
2) Get rtmpdump from here and put it somewhere on your PC (like c:\rtmpdump)
3) Get OpenSSL developer from here (look for the download that says "Recommended for software developers", it is ~16MB), and install it somewhere (like c:\openssl).
4) Get the ZLib developer files from here and extract it somewhere (like c:\zlib)
5) Go to your <rtmpdump> folder and open the file "Makefile" (no extension), look for the line that starts "LIB_OPENSSL=", and replace it with
"LIB_OPENSSL=-llibeay32 -lssleay32 $(LIBZ)" (without the quotes, also you can add this line and comment the original line putting # at the beginning).
6) Go to <rtmpdump>/librtmp folder, open the "Makefile" and do the same (change LIB_OPENSSL).
7) Open mingw32 command prompt
8) Now we need to define 2 variables that will point to the OpenSSL and ZLib:
export XCFLAGS="-I/c/tools/OpenSSL-Win32/include -I/c/tools/zlib/include"
export XLDFLAGS="-L/c/tools/OpenSSL-Win32/lib -L/c/tools/zlib/lib"
NOTE: replace the path to the OpenSSL and zlib folders according to where you put it (I put it under c:\tools\...).
9) Navigate to your rtmpdump folder:
cd <rtmpdump folder>
10) Compile and link using this command:
make install SYS=mingw
11) All output files will be under: <MinGW root folder>\msys\1.0\local\bin and <MinGW root folder>\msys\1.0\local\sbin

This blog post contains some info...

That's it, worked for me !
Reply
#3
I've compiled librtmp once but even it compiled fine it didn't worked so we still just use precompiled binaries. unfortunately I found no open channel for testing and so I never tried it again. And ofc I need to get it compiled with the provided mingw env we have in our repo.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
Hi,

To be honest I didn't know it is part of the xbmc repo, so who does it "belongs" to?
Is there a team working on it?

The compiled files seem to work fine on my machine, I didn't try it with xbmc but just
rtmpdump as a standalone, can record flash stream.

As I needed to debug, and there was no way I'm using gdb, I created a visual studio solution for rtmpdump and librtmp, it builds fine (after some tweaks of course) and seems to work as a standalone, didn't try to debug yet in visual studio. Will update... Wink
Reply
#5
OK, can debug on VisualStudio, working great.
Now let's see why it is not playing some stream...
Reply
#6
cool.
What I meant is if we distribute libs with XBMC we would like to either compile it on our own or just use third party libs which everyone can download to make it for everyone possible to recompile XBMC without hassles.
Thus we have a mingw env in our repo which is used to compile some libs like ffmpeg, mpeg2 which can't be compiled with vs (or nobody wrote a project for it Wink
If you have a working project file great. Debug and fix what's needed and afterwards please provide patches to the original source, the project file and a readme (see other downloaded libs). Then we can make a third party lib bundle with every steps documented for compilation.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
Hi,

I don't have any fixes yet, but I put my VC project here if others are interested...

https://github.com/yuvalw/rtmpdump-vs
Reply

Logout Mark Read Team Forum Stats Members Help
Compile librtmp on windows1