Update 2017-08-23

Thanks to @kwikwag for making a Windows batch file to simplify all this! Find it here.


Live555 is an excellent RTSP library for Windows, but can be a bit tricky to build. These are the instructions that I follow to build it in Visual Studio 2015 in Windows 10 Professional.

1) Extract the live555-latest.tar.gz into your source directory.

2) Make the following changes to the win32config file:

#!include <ntwin32.mak>

3) Run vsvars32.bat and build the make files

Open an MSBuild for Visual Studio 2015 command prompt. Set the environment variables by running this batch file:

"\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"

Build the make files run running:

genWindowsMakefiles

4) Build the project!

Now you’re ready to build! Build each of the components of the project in this order:

cd liveMedia
nmake /B -f liveMedia.mak
cd ..\groupsock
nmake /B -f groupsock.mak
cd ..\UsageEnvironment
nmake /B -f UsageEnvironment.mak
cd ..\BasicUsageEnvironment
nmake /B -f BasicUsageEnvironment.mak
cd ..\testProgs
nmake /B -f testProgs.mak
cd ..\mediaServer
nmake /B -f mediaServer.mak

If you encounter a linker errors when compiling any of the executable projects (like the Live555MediaServer) then build that project manually by entering the command displayed by nmake, but without the out: parameter and including the ws2_32 library, for example:

cl ws2_32.lib msvcrt.lib live555MediaServer.obj DynamicRTSPServer.obj ../liveMedia/libliveMedia.lib ../groupsock/libgroupsock.lib  ../BasicUsageEnvironment/libBasicUsageEnvironment.lib ../UsageEnvironment/libUsageEnvironment.lib

This should give a valid Live555MediaServer.exe that is ready to run!


Extending Live555MediaServer to cope with large frames

Live555MediaServer sometimes cannot handle large 1080p frames and will throw this error:

MultiFramedRTPSink::afterGettingFrame1(): The input frame data was too large for
our buffer size (100452).  3712 bytes of trailing data was dropped!  Correct th
is by increasing "OutPacketBuffer::maxSize" to at least 103712, *before* creatin
g this 'RTPSink'.  (Current value is 100000.)

Edit the file DynamicRTSPServer.cpp and any time this appears:

  OutPacketBuffer::maxSize = 100000;

change it to:

  OutPacketBuffer::maxSize = 200000;

Then rebuild the Live555MediaServer with these commands:

del *.obj
del Live555MediaServer.exe
cl ws2_32.lib msvcrt.lib live555MediaServer.obj DynamicRTSPServer.obj ../liveMedia/libliveMedia.lib ../groupsock/libgroupsock.lib  ../BasicUsageEnvironment/libBasicUsageEnvironment.lib ../UsageEnvironment/libUsageEnvironment.lib