すでにインストールされているNgixにモジュールh 264フローメディアサポートを追加します。

2100 ワード

公式説明はご覧ください。http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Nginx-Version2
コンパイルパラメータを表示
# /app/nginx/sbin/nginx -V
configure arguments: --prefix=/project/nginx-1.15.0 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_modul
 ダウンロードmod_h 264_streaming
# cd /source
# wget http://h264.code-shop.com/download/nginx_mod_h264_streaming-2.2.7.tar.gz
# tar -zxvf nginx_mod_h264_streaming-2.2.7.tar.gz
Ngixソースディレクトリに入る
# cd /source/nginx-1.15.0/
./configure --prefix=/project/nginx-1.15.0 --with-http_ssl_module 
--with-http_realip_module --with-http_addition_module 
--with-http_xslt_module --with-http_image_filter_module 
--with-http_sub_module --with-http_dav_module --with-http_flv_module 
--with-http_mp4_module --with-http_gzip_static_module 
--with-http_random_index_module --with-http_secure_link_module 
--with-http_stub_status_module 
--add-module=/source/nginx_mod_h264_streaming-2.2.7 #    
コンパイルがインストールされていません
# make
     make install 
Ngixファイルを置換
# cp /app/nginx/sbin/nginx /app/nginx/sbin/nginx.bak #   Nginx  
# /app/nginx/sbin/nginx -s stop
# cp /source/nginx-1.15.0/objs/nginx /app/nginx/sbin/
# /app/nginx/sbin/nginx
# /app/nginx/sbin/nginx -V 
Nginnxプロファイル
location ~ \.mp4$ {
  mp4;
}
 
 
璜芰芰ps:コンパイル中に発生したエラー:
1、make[1]:**[objs/addon/src/mp 4チャージャー.o]Error 1
解決策:
Objs/Makefile検索-Werrorに行ってこのパラメータを削除します。
2、make[1]:**[objs/addon/src/ghu 264_streamingumodule.o]error 1
解決策:
# vim /source/nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c

###   
    157   /* TODO: Win32 */
    158 /*  if (r->zero_in_uri)
    159   {
    160     return NGX_DECLINED;
    161   }
    162 */