nginx 播放mp4

系统依赖

sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install zlib1g zlib1g.dev
sudo apt-get install openssl libssl-dev

安装Nginx

### 开启MP4模块,注意: 一定要开启ssl模块
./configure --prefix=/usr/local/mNginx --with-http_ssl_module --with-http_mp4_module
make && sudo make install

### 配置rtmp
./configure --add-module=/home/focus/live_streaming/nginx-rtmp-module
make && sudo make install

### 配置h264
./configure --add-module=/home/focus/live_streaming/nginx_mod_h264_streaming-2.2.7
make && sudo make install

不出意外的话, make会报两个 error

在文件: h264源码目录/src/ngx_http_streaming_module.c
将如下部分注释掉:

/* TODO: Win32 */

if (r->zero_in_uri)
{
return NGX_DECLINED;
}

在文件: nginx源码目录/objs/Makefile
删除参数 -Werror

前端页面测试


  

  
  



  

  

你可能感兴趣的:(nginx 播放mp4)