nginx流媒体服务器性能,搭建nginx流媒体服务器(支持HLS)

  • Post author:
  • Post category:其他


环境搭建

(一)下载源代码

nginx,地址:http://nginx.org/可以选择需要的版本下载

nginx_mod_h264_streaming-2.2.7.tar.gz ,支持MP4流,具体的说明在下面的这个网页

ffmpeg:媒体编解码工具,这里做为HLS 直播流的发布工具

(二)安装nginx

tar -zxvf nginx_mod_h264_streaming-2.2.7.tar.gz

tar -zxvf nginx-1.4.4.tar.gz

cd nginx-1.4.4

./configure  –prefix=/usr/local/nginx-stream –with-debug  –with-http_dav_module  –with-http_gzip_static_module  –with-http_ssl_module   –with-ipv6 –with-sha1=/usr/include/openssl  –with-md5=/usr/include/openssl  –add-module=../nginx_mod_h264_streaming-2.2.7  –with-http_flv_module  –with-http_mp4_module

如果没有出现错误

make

如果出现错误类似:‘ngx_http_request_t’ 没有名为 ‘zero_in_uri’ 的成员,则进入 nginx_mod_h264_streaming-2.2.7目录,进入src,修改 ngx_http_streaming_module.c,注释掉 TODO window32 模块下的:

if (r->zero_in_uri) {