安装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就安装成功了

目录
相关文章
|
2月前
|
应用服务中间件 nginx
Nginx安装nginx-rtmp-module模块
【2月更文挑战第4天】 nginx中的模块虽然就是类似插件的概念,但是它无法像VsCode那样轻松的安装扩展。 nginx要安装其它模块必须同时拿到nginx源代码和模块源代码,然后手动编译,将模块打到nginx中,最终生成一个名为nginx的可执行文件。
89 6
|
9月前
|
缓存 负载均衡 算法
nginx源代码安装和基础配置
nginx源代码安装和基础配置
104 0
|
应用服务中间件 nginx
安装nginx-rtmp-module模块与配置
安装nginx-rtmp-module模块与配置
|
11月前
|
缓存 负载均衡 算法
源代码安装nginx和基础配置
源代码安装nginx和基础配置
124 0
|
JavaScript Ubuntu Java
零基础开发 nginx 模块
推荐学习资料: * nginx 开发指南: http://nginx.org/en/docs/dev/development_guide.html * nginx 动态模块编译博客文章: https://www.nginx.com/blog/compiling-dynamic-modules-nginx-plus/ * nginx 源码: https://github.com/nginx
4321 1
|
安全 Java 应用服务中间件
Nginx系列:安全下载模块
ngx_http_secure_link_module模块用于检查请求链接的真伪,保护资源免受未经授权的访问,限制链接的生命周期。
437 0
Nginx系列:安全下载模块
|
应用服务中间件 nginx
想查看下编译安装的nginx默认都带有哪些模块
查看nginx软件包里的auto文件夹里的option文件,带YES的表示默认安装时候自带的模块. 这些模块使用-V是查看不到的.
567 0
|
应用服务中间件 nginx Linux
|
应用服务中间件 nginx
|
NoSQL 应用服务中间件 nginx