Preface
Adobe's FMS (Flash Media Server) is very useful. But it is the money and limited functionality that are available for hierarchical authorization. Since we can't afford to use commercial things and hinder our technological progress, we can only resort to the open source community. And Crtmpserver is one of the alternatives to FMS.
1. Crtmpserver Introduction
Crtmpserver's function is always:
The following is the homepage of the official website function and application introduction (http://www.rtmpd.com/)
Crtmpserver It is a high performance streaming server able to stream (live or recorded) in the following technologies:
To and from Flash (Rtmp,rtmpe, Rtmps, Rtmpt, Rtmpte)
To and from embedded Devices:iphone, Android
From surveillance cameras
Ip-tv using Mpeg-ts and RTSP/RTCP/RTP protocols
Also, Crtmpserver can be used as a high performance rendes-vous server. For example, it enables the do:
2. Crtmpserver Streaming media server (Linux platform)
Its compilation and build environment requires some Linux tools to be installed first
Installation of 2.1 CMake
Download the latest cmake (http://www.cmake.org/).
#tar -zxvf cmake-2. 8. 7. Tar. Gz
#cd cmake-2. 8. 7
#. /Bootstrap
#gmake
#make Install
Installation of 2.2 OpenSSL
Download openssl-0.9.8 version (Crtmpserver only support this version, I use the openssl-0.9.8t. http://www.openssl.org/)
#tar -zxvf OpenSSL-0. 9. 8t. Tar. Gz
#cd OpenSSL-0. 9. 8t
#. / Configure
#make .
#make Install
Compilation and installation of 2.3 crtmpserver
#svn Co --Username anonymous--password "" HTTPS:/ /svn. RTMPD. COM/crtmpserver/branches/1. 0 Crtmpserver
#cd Crtmpserver
#sh . /cleanup. Sh
#cd Builders/CMake
#cmake .
#make
#. /crtmpserver/crtmpserver. /crtmpserver/crtmpserver. Lua
Note:
A. If make succeeds, the last line of command is "./Crtmpserver/Crtmpserver.Lua"starts the Crtmpserver service for the configuration script."
B. The directory for the last line of commands is under "Builders/cmake".
2.4 Receiving and distributing the test flow
After the last line of commands is executed, you can see the services started and the corresponding ports under the default script configuration. The "RTMP" protocol corresponds to the "1935" Port.
As shown below:
--- --------------- ----- ------------------------- -------------------------
|tcp| 0.0.0.0 |1935| inboundrtmp | appselector|
--- --------------- ----- ------------------------- -------------------------
Push:
You can use Adobe's Fmle (Flash Media Live Encoder) to push rtmp streams to this server. There will be a corresponding log message when successful.
You can also use FFmpeg Push the rtmp stream to this server. There will be a corresponding log message when successful. Note, however, that FFmpeg pushes the rtmp stream to make sure that it uses "librtmp" to succeed. Using the FFmpeg to bring the rtmp push will cause a failure. The reason should be that FFmpeg's own rtmp program is incomplete, unable to parse the second handshake when the service sent packet information.
Watch:
After the push is successful, the client can see the program you pushed with the Flash Player or the player that can play the rtmp stream (such as http://flv-player.us/index_mdv.php).
You can also use the software like Rtmpdump to record rtmp streams as files.
3. Simple configuration changes
Sometimes the server restricts certain ports, so you need to specify the ports yourself, such as "80" ports. This requirement can be modified by modifying its configuration script " crtmpserver / crtmpserver lua "
"rtmp" service to add "80" port, you can give " crtmpserver / crtmpserver lua "
Default=true,
acceptors =
{
{
IP="0.0.0.0",
Port=.
Protocol="inboundrtmp"
},
{
IP="0.0.0.0",
Port=1935,
Protocol="inboundrtmp"
},
. . .
}
}
Restart the service to see the port in effect, you can receive the rtmp stream from "80".
Introduction and construction of Crtmpserver streaming media server