由于公司网站需要放置视频,但是默认的服务器环境是没有编译这个支持的模块,视频文件只能缓冲完了在播放,非常麻烦。

 
之前呢也安装了一个nginx_mod_h264_streaming来支持,效果很不错,但是服务器最近系统更新后出了点问题,只好从新编译,今天在nginx官网看到了nginx在新版本中已经支持了--with-http_mp4_module --with-http_flv_module这2个模块。所以就来自己编译吧。
 
编译之前我们需要看看之前编译的参数,使用nginx -V查看得到如下参数
 
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
 
接下来就进入之前安装的目录,我用的是lnmp1.0的脚本安装的,文件地址在/root/lnmp1.0-full
 
当然我的nginx是我后来更新过的,版本是1.4.3,再次进入nginx-1.4.3这个目录
 
备份之前的程序配置
 
 
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
 
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_mp4_module --with-http_flv_module
等待结束,查看是否报错(应该不会报错,因为用的都是nginx默认支持的模块,不是外挂的)正常文件如
 
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library
 
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
编译
 
 
make
nginx -t
如果提示如下命令就证明没有问题,就可以升级了
 
 
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
 
make install
 
nginx version: nginx/1.4.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_mp4_module --with-http_flv_module

NGINX 添加MP4、FLV视频支持模块的更多相关文章

  1. Ubuntu 14.10下基于Nginx搭建mp4/flv流媒体服务器(可随意拖动)并支持RTMP/HLS协议(含转码工具)

    Ubuntu 14.10下基于Nginx搭建mp4/flv流媒体服务器(可随意拖动)并支持RTMP/HLS协议(含转码工具) 最近因为项目关系,收朋友之托,想制作秀场网站,但是因为之前一直没有涉及到这 ...

  2. CentOS6下基于Nginx搭建mp4/flv流媒体服务器

    CentOS6下基于Nginx搭建mp4/flv流媒体服务器(可随意拖动)并支持RTMP/HLS协议(含转码工具) 1.先添加几个RPM下载源 1.1)安装RPMforge的CentOS6源 [roo ...

  3. CentOS6下基于Nginx搭建mp4/flv流媒体服务器(可随意拖动)并支持RTMP/HLS协议(含转码工具)

    1.先添加几个RPM下载源 1.1)安装RPMforge的CentOS6源     [root@AY130611215205Z ~]# wget -c http://pkgs.repoforge.or ...

  4. CentOS6.4下基于Nginx搭建mp4/flv流媒体服务器

    我的步骤如下:1. 安装依赖包: yum install glibc.i686#yum –y update#yum -y install gcc glibc glibc-devel make nasm ...

  5. ckeditor添加插入flv视频的插件

    首发:个人博客,更新&纠错&回复 昨天写在网页中播放flv的博文的时候,想在博文中插入视频,但是发现无法实现.因为用的编辑器是ckeditor,决定自己写个插件插入视频.官方的教程在这 ...

  6. nginx+jwplayer配置flv/MP4点播系统, 视频拖动支持

    一 配置nginx 1. 下载 nginx 最新版 http://nginx.org/ 2. 安装依赖库, 以ubuntu为例 apt-get install libpcre3 libpcre3-de ...

  7. 视频支持拖动进度条播放的实现(基于nginx)

    http协议下的flv/mp4流式播放支持的三个要点: 1 服务器端要支持flv/mp4流式播放,现在nginx或者lighttpd都是支持这样的应用的,还支持mp4的流式播放(默认编译版本一般都是打 ...

  8. 用nginx搭建http/rtmp/hls协议的MP4/FLV流媒体服务器

    前前后后搭建了两三个星期,终于可以告一段落,nginx实在是有点强大.写一篇笔记来记录一下这个过程中的思路和解决方案. 一.搭建nginx平台: 基本是基于http://blog.csdn.net/x ...

  9. Flv视频格式如何转换成MP4格式

    如何将flv视频格式转换成MP4格式呢?随着现在视频格式的不断多样化,视频格式转换的问题也成了现在生活中常见的问题,那么我们应该怎样将flv视频格式转换成MP4格式呢?下面我们就一起来看一下吧. 操作 ...

随机推荐

  1. 框架-springmvc源码分析(二)

    框架-springmvc源码分析(二) 参考: http://www.cnblogs.com/leftthen/p/5207787.html http://www.cnblogs.com/leftth ...

  2. A TLS packet with unexpected length was received 解决方法

    参考:A TLS packet with unexpected length was received. 系统环境 主系统 OS X,虚拟机 Ubuntu 14.04 64bit. 问题描述 在git ...

  3. [笔记] SQL性能优化 - 常用语句(二)

    1.查询CPU开销大的语句 total_worker_time/execution_count AS avg_cpu_cost, plan_handle, execution_count, ( , ( ...

  4. UVa 11732 strcmp()函数(左孩子右兄弟表示法)

    #include<iostream> #include<algorithm> #include<string> #include<cstring> #i ...

  5. Cool Auto-Suggest 插件使用方法

    刚入职的时候公司主管曾经让我用Cool Auto-Suggest 插件写过后台管理页面内的自动填充及搜索功能. 其实这个插件的使用很简单,网上也有相应的翻译文档,但是明显的机翻看着无法忍受.我写一下使 ...

  6. thinkphp5的auth权限认证(转自thinkphp官方文档+自己总结)

    thinkphp5的auth权限认证(转自thinkphp官方文档+自己总结) 一.总结 一句话总结:相当于就是用其它thinkphp的扩展一样,都是引入扩展,配置扩展,然后使用 引入 配置 使用 基 ...

  7. 2243: [SDOI2011]染色 树链剖分+线段树染色

    给定一棵有n个节点的无根树和m个操作,操作有2类: 1.将节点a到节点b路径上所有点都染成颜色c: 2.询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段), 如“112221”由3段组 ...

  8. java 实现断点续传

    请求头一:>>>>>>>>>>>>>>>>>>>>>>>> ...

  9. RALL资源获取初始化,删除器

    body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...

  10. Nginx实践01-ngnix编译安装-测试

    1.下载nginx安装包 下载地址:http://nginx.org/en/download.html(里面有nginx各个版本) 解压到指定目录: 解压出来的目录简单介绍: src:软件的所有源代码 ...