Live555: source code compilation and live555 source code compilation

Source: Internet
Author: User

Live555: source code compilation and live555 source code compilation
Live555: source code compilation

Live555 is a cross-platform C ++ open-source project that provides solutions for streaming media. It supports standard streaming media transmission protocols such as RTP/RTCP, RTSP, and SIP. Live555 provides streaming, receiving, and processing support for audio and video data in multiple audio and video encoding formats, including MPEG, H.263 +, DV, JPEG videos, and multiple audio encodings. At the same time, due to its good design, Live555 is very easy to extend its support for other formats. Currently, Live555 has been used to implement streaming media playing functions for multiple players, such as VLC (VideoLan) and MPlayer.

From today on, we will learn the live555 source code. The first step is to compile the live555 source code. Although there are many projects already configured on the Internet, it is another pleasure to compile on your own.

The Live555 source code contains four basic libraries: UsageEnvironmentr, groupsock, liveMedia, and BasicUsageEnvironment. Media Server (Server program) and various test code.
This article uses the vc2010 compiling environment.

1. Obtain the live555 source code
1. live555 official website
2. download it from csdn at

Shows the decompressed source code:

Includes the above four libraries and mediaServer server programs, as well as other test code.

2. Create a project

1. Open vc2010 and create a win32 console application. The project name is BasicUsageEnvironment. specify the location of the new solution. The solution name is live555, for example:

2. Click OK. In the subsequent configuration, follow the Configuration:

3. Add a new project and select the win32 console project named UsageEnvironment.

4. Click "OK" and "Next ".

5. Repeat Step 3 to add the groupsock and liveMedia projects.

6. Add the mediaServer project and configure it as follows:

7. All five projects have been created. The added solution structure is as follows:

3. Add source files to the Project

1. Open the source code directory and copy the include and cpp files under the BasicUsageEnvironment, UsageEnvironment, groupsock, mediaServer, and liveMedia directories to the project directories created above. BasicUsageEnvironment:

2. Add these files to the corresponding project, add cpp under each project to the source file filter, and add the header file to the header file filter. After adding the project structure:

3. Add dependency header files

Method 1: copy the header files of other libraries required by the project to the include directory of the project.
Method 2: Enter the path of the header file to be included in the property-> C/C ++-> General-> Add the include directory (recommended)

After adding BasicUsageEnvironment, the effect is as follows:

After being added, You can compile and generate the corresponding lib.

4. Add dependent libraries for MediaServer.
MediaServer depends on the lib generated by the above project. Therefore, you must copy the lib generated above to the MediaServer project directory. You can use either of the following methods:
I. Use # pragma
Add the following code in ive555MediaServer. cpp of MediaServer:

#pragma comment (lib, "Ws2_32.lib") #pragma comment (lib, "BasicUsageEnvironment.lib")#pragma comment (lib, "groupsock.lib")#pragma comment (lib, "liveMedia.lib")#pragma comment (lib, "UsageEnvironment.lib")

2. Project> Properties> Configuration Properties> connector> input> additional dependency


After that, you can compile and generate mediaserver.exe.

The effect after running is as follows:

5. Use VLC to test the LIVE555 server.
Now the RTSP server is running, waiting for requests from the client. You can use VLC as the client for testing.
1. Prepare a video file, such as aa.264 and put it in the same directory of mediaserver.exe. (There is no video file. Click here ).

2. Enable network streaming and enter the ip address of the Local Machine + video file name. For example, rtsp: //

Iii. Playback Effect

Click here to download the configured vc2010 project.

2014, 7, and 20 in Hangzhou, Zhejiang Province

I recently learned about the Streaming Media Server, and got the LIVE555 source code. The debugging was successful in WINDOWS, but the media file cannot be played.

You can find related forums, preferably those with high popularity, registering members, posting for help, and experts will help you.

Error Message

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.