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 linux
to 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. testProgs
At the same time, a bunch of executable sample programs will be generated in the directory. What we are going to run this time testOnDemandRTSPServer
is 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.
-
testOnDemandRTSPServer
The 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 . -
Then put the downloaded test.264 file
testOnDemandRTSPServer
in the same directory, that is,testProgs
the directory. -
Run it
./testOnDemandRTSPServer
, and you can see the corresponding print information and the URL address of the h264 stream.
-
Open VLC on the window side, media -> open network streaming, and enter the URL obtained in the previous step
-
Click play to start playing the h264 file stream
So far, the demo of live555testOnDemandRTSPServer
has successfully sent the h264 stream to VLC.