Crtmpserver Streaming Media Server () label: crtmpserver C ++ rtmp server rtmp Adobe FMS (flash med Streaming Media Server Type: crtmpserver
Preface
Adobe's FMS (Flash Media Server) is very useful. However, money and limited functions are available for hierarchical authorization. Since commercial things are useless and impede our technological progress, we can only turn to the open-source community. Crtmpserver is one of the alternatives to FMS.
1. About crtmpserverFunctions of crtmpserver:
- Supports receiving rtmp streams pushed to it and distributing player requests;
- Build a tree network cluster of rtmp streaming media servers;
- Supports iPhone and Android.
The following is the Function and Application of the home page of the official website (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 you to do:
- Audio/Video Conferencing
- Online gaming
- Online Collaboration
- Simple/complex chat applications
2. Setting up a crtmpserver Streaming Media Server (Linux platform)Its Compilation and build environment requires first installing some Linux Tool 2.1 cmake to 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
2.2 OpenSSL installation download openssl-0.9.8 edition (crtmpserver currently only supports this version, I am using a 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
2.3 crtmpserver compilation and Installation
- # 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. Lua
Note: A. If make is successful, run the "./crtmpserver. Lua" configuration script to start the "crtmpserver" service. B. The directory of the last command line is under "builders/cmake. 2.4 After receiving and distributing the last command line of the test stream is executed, you can see the service started and the corresponding port in the default script configuration. For example, the "rtmp" protocol corresponds to port 1935. As shown in the following figure: --- --------------- ------------------------- | TCP | 0.0.0.0 | 1935 | inboundrtmp | appselector | --- --------------- --------------------- ------------------------- push: Adobe fmle (Flash Media live encoder) can be used) push rtmp streams to this server. After the operation is successful, a log message is displayed. You can also use FFMPEG to push rtmp streams to this server. After the operation is successful, a log message is displayed. However, you must use "librtmp" to successfully push the rtmp stream to FFMPEG. If you use the rtmp push that comes with FFMPEG, it will cause a failure. The reason should be that the rtmp program provided by FFmpeg is incomplete and cannot parse the packet information sent by the service during the second handshake. Watch: After the push is successful, the user end can use flash player or player that can play rtmp stream (such as http://flv-player.us/index_mdv.php) to watch your push program. You can also use software like rtmpdump to record rtmp streams into files.
3. Simple Configuration ModificationSometimes the server limits some ports. In this case, you need to specify the port, such as port 80. This requirement can be achieved by modifying its configuration script "crtmpserver/crtmpserver. Lua. To add the "rtmp" service on port 80, you can add the following code to "crtmpserver/crtmpserver. Lua. (The code that contains the first braces of "Port = 80" is to be added)
- Default = true,
- Acceptors =
- {
- {
- IP = "0.0.0.0 ",
- Port = 80,
- Protocol = "inboundrtmp"
- },
- {
- IP = "0.0.0.0 ",
- Port = 1935,
- Protocol = "inboundrtmp"
- },
- ...
- }
- }
Restart the service and you will see that the port is effective. Then you can receive the rtmp stream from "80.