Introduction and Setup of crtmpserver Streaming Media Server

Source: Internet
Author: User
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 /).
  1. # Tar-zxvf cmake-2.8.7.tar.gz
  2. # Cd cmake-2.8.7
  3. #./Bootstrap
  4. # Gmake
  5. # 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 /)
  1. # Tar-zxvf openssl-0.9.8t.tar.gz
  2. # Cd openssl-0.9.8t
  3. #./Configure
  4. # Make.
  5. # Make install
2.3 crtmpserver compilation and Installation
  1. # SVN co -- username Anonymous -- password "" https://svn.rtmpd.com/crtmpserver/branches/1.0 crtmpserver
  2. # Cd crtmpserver
  3. # Sh./cleanup. Sh
  4. # Cd builders/cmake
  5. # Cmake.
  6. # Make
  7. #./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)
  1. Default = true,
  2. Acceptors =
  3. {
  4. {
  5. IP = "0.0.0.0 ",
  6. Port = 80,
  7. Protocol = "inboundrtmp"
  8. },
  9. {
  10. IP = "0.0.0.0 ",
  11. Port = 1935,
  12. Protocol = "inboundrtmp"
  13. },
  14. ...
  15. }
  16. }
Restart the service and you will see that the port is effective. Then you can receive the rtmp stream from "80.
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: info-contact@alibabacloud.com 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.