秀米云香港服务器

一提要说明

序列号 CPU RAM HDD 带宽 售价(美元) 免费试用
香港服务器1 E5-2620 32G 1T HDD 50M/无限流量 $196.00 立即申请
香港服务器2 E5-2650 32G 1T HDD 50M/无限流量 $256.00 立即申请
香港服务器3 E5-2680 32G 1T HDD 50M/无限流量 $316.00 立即申请
香港服务器4 E5-2690 32G 1T HDD 50M/无限流量 $336.00 立即申请
香港服务器5 E5-2697 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器6 E5-2620*2 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器7 E5-2650*2 32G 1T HDD 50M/无限流量 $436.00 立即申请
香港服务器8 E5-2680*2 32G 1T HDD 50M/无限流量 $476.00 立即申请
香港服务器9 E5-2690*2 32G 1T HDD 50M/无限流量 $556.00 立即申请
香港服务器10 E5-2697*2 32G 1T HDD 50M/无限流量 $596.00 立即申请
香港服务器11 E5-2680v4*2 32G 1T HDD 50M/无限流量 $696.00 立即申请
香港服务器12 E5-2698v4*2 32G 1T HDD 50M/无限流量 $796.00 立即申请

利用nginx搭建流媒体直播平台,目标就是要支持rtmp协议,实现用户利用rtmp(rtmp://192.168.201.128/myapp)协议推送流随处事器。然后其他用户点播该用户推送的视频流信息。既然是rtmp协议,所以客户端可以是flash措施,也可以OBS(OpenBroadcasterSoftware)这种较量普通化的直播客户端。小我私家是较量喜欢利用OBS的,诚恳说我其实也是flash和flex开拓者,开拓个多款WEB视频措施和视频集会会议系统。java程度也是很高的。接待打脸,我这种人就不怎么谦虚,因为我觉太谦虚就虚伪了.

再世面上有许多流媒体处事器。有贸易的也有开源,好比常用FMS,Red5,wowza.crtmpserver,等,假如是做小型视频集会会议,我小我私家强烈推荐Red5。Red5有很开放的api,对付开拓及时性要求较量高的很利便。开拓东西和开拓java的人上手也很快。

二情况筹备

1筹备一台linux的操纵系统,我的Centos5。windows再nignx上本身编译模块很贫苦的,directadmin安装directadmin汉化,所以我就在Centos上测试。我的系统信息如下:

Linuxlocalhost2.6.18-128.el5#1SMPWedJan2110:44:23EST2009i686athloni386GNU/Linux

2筹备软件包

nginx-1.4.7.tar.gz

nginx-rtmp-module-1.1.7.tar.gz

三开始安装

1安装nginx所需要的依赖包。留意差异系统可能模块需要的依赖包是纷歧样的。我这里值安装最根基的就行了。

"blog_20160205_1_6086627"name="code">[[email protected]html]#yuminstall-ygccgcc-c++[[email protected]html]#yuminstall–yopenssl-develpcre-develzlib-devel留意:最好不要用默认的yum源。都统一换成阿里云的yum源。

2 先解压包,这不没什么难度吧。然后执行ningx设置文件。执行没问题后,执行编译,安装

[[email protected]local]#tar-zvxfnginx-1.4.7.tar.gz[[email protected]local]#wgethttps://github.com/arut/nginx-rtmp-module/archive/v1.1.7.tar.gz[[email protected]local]#tarnginx-rtmp-module-1.1.7.tar.gz[[email protected]local]#tar-zxvfnginx-rtmp-module-1.1.7.tar.gz[[email protected]local]#cd/usr/local/nginx-1.4.7./configure--prefix=/usr/local/nginx--add-module=/usr/local/nginx-rtmp-module-1.1.7[[email protected]nginx-1.4.7]#make&&makeinstall输出日志我就不贴出来了。编译完成后。就该修改nginx的设置文件,让nginx支持rtmp协议。

3 修改设置文件后内容如下(改设置文件可以参考):

[[email protected] test]# pwd/usr/local/nginx-rtmp-module-1.1.7/test

[[email protected]test]#lltotal56-rwxrwxr-x1rootroot49Mar242015dump.sh-rwxrwxr-x1rootroot84Mar242015ffstream.sh-rw-rw-r--1rootroot1245Mar242015nginx.conf-rwxrwxr-x1rootroot59Mar242015play.sh-rw-rw-r--1rootroot499Mar242015README.mddrwxrwxr-x2rootroot4096Mar242015rtmp-pu

为了利便我把我的ngin的设置文件完整的贴出来:

#usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error.loginfo;#pidlogs/nginx.pid;events{worker_connections1024;}rtmp{server{listen1935;applicationmyapp{liveon;#recordkeyframes;#record_path/tmp;#record_max_size128K;#record_interval30s;#record_suffix.this.is.flv;#on_publishhttp://localhost:8080/publish;#on_playhttp://localhost:8080/play;#on_record_donehttp://localhost:8080/record_done;}}}http{includemime.types;default_typeapplication/octet-stream;#access_loglogs/access.logmain;sendfileon;#tcp_nopushon;#keepalive_timeout0;keepalive_timeout65;#gzipon;server{listen80;server_namelocalhost;location/{roothtml;indexindex.htmlindex.htm;}#error_page404/404.html;error_page500502503504/50x.html;location=/50x.html{roothtml;}}}四 启动处事器,测试

1 执行nginx/sbin/nginx 启动处事。你应该可以或许看随处事器也启用1935端口,就暗示nginx已经支持rtmp推送流了。

标题:使用nginx搭建流媒体直播平台

地址: https://www.yunhk.xyz/25755.html