1 live555 source code analysis (1) - live555 compilation and operation

1. Overview of live555

live555 is an open source streaming media service solution developed based on C++, which implements standard streaming media transmission protocols (such as RTP/RTCP, RTSP, SIP). The official website address is http://www.live555.com/ .

Two, live555 source code download

live555 can be downloaded directly from the official website, and has been maintaining and updating, you can directly download the latest version http://www.live555.com/liveMedia/public/live555-latest.tar.gz .

Three, live555 compilation

live555 is cross-platform. This article uses the Linux platform for analysis, and does not study other platforms.

1. First unzip the latest live555 source code

tar -zxvf live555-latest.tar.gz

2. Enter the live folder and execute it ./genMakefiles linuxto generate a Makefile under linux

cd live/
./genMakefiles linux

3. Compile

make

After compiling, 4 core libraries will be generated libliveMedia.a libUsageEnvironment.a libBasicUsageEnvironment.a libgroupsock.a, all of which are in the directories corresponding to their names. testProgsAt the same time, a bunch of executable sample programs will be generated in the directory. What we are going to run this time testOnDemandRTSPServeris in this directory.

Four, live555 running

The purpose of this operation is to run on a virtual machine testOnDemandRTSPServer, and send the h264 file to VLC on the windows side through rtsp for playback.

  1. testOnDemandRTSPServerThe file has been compiled in the previous step, but the h264 file is not yet available. You can download it from the Internet yourself, or you can download it from the live555 official website http://www.live555.com/liveMedia/public/264/test.264 .

  2. Then put the downloaded test.264 file testOnDemandRTSPServerin the same directory, that is, testProgsthe directory.

  3. Run it ./testOnDemandRTSPServer, and you can see the corresponding print information and the URL address of the h264 stream.
    insert image description here

  4. Open VLC on the window side, media -> open network streaming, and enter the URL obtained in the previous step
    insert image description here

  5. Click play to start playing the h264 file stream
    insert image description here
    So far, the demo of live555 testOnDemandRTSPServerhas successfully sent the h264 stream to VLC.

Guess you like

Origin blog.csdn.net/qq_36383272/article/details/120889326