安装ffmpeg及nginx模块

安装ffmpeg:

下载文件

wget http://ffmpeg.org/releases/ffmpeg-1.0.1.tar.gz

tar -xf ffmpeg-1.0.1.tar.gz

cd ffmpeg-1.0.1

./configure

显示错误:

[root@tester ffmpeg-1.0.1]# ./configure
yasm not found, use --disable-yasm for a crippled build
If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

yum install yasm

然后再编译

./make

./make install

安装libx264

http://www.cnblogs.com/MikeZhang/archive/2012/07/21/installFFmpegFromSourceCode.html

http://zhidao.baidu.com/question/192172258.html

nginx和nginx_mod_h264_streaming模块

安装这个模块的目的是让视频可以在线播放,否则视频就只能下载下来才能看了

下载nginx-1.2.6和nginx_mod_h264_streaming源码

./configure --add-module=/XXXX/nginx_mod_h264_streaming/

./make

make的时候可能会出现错误:

In file included from /root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_h264_streaming_module.c:2:
/root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c: In function ‘ngx_streaming_handler’:
/root/software/nginx_mod_h264_streaming-2.2.7//src/ngx_http_streaming_module.c:158: error: ‘ngx_http_request_t’ has no member named ‘zero_in_uri’
make[1]: *** [objs/addon/src/ngx_http_h264_streaming_module.o] Error 1
make[1]: Leaving directory `/root/software/nginx-1.2.6'
make: *** [build] Error 2

解决方法:

注释掉nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c的158到161行

http://lxneng.com/posts/160

然后重新make,make install就安装成功了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值