1、安装汇编编译器(一般系统自带吧)。假设没有依照以下的命令安装吧

  yum install yasm

2、使用最新x264源代码编译(仅仅支持编码)
    在x264官网下载最新的代码http://www.videolan.org/developers/x264.html

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make
make install

注意--enable-static --enable-shared 后面要加上。否则在编译ffmpeg的时候会报错。

make install 应该出现以下的画面说明成功安装了。

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc2ppbl8xMzE0/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

会在当前文件夹下生成静态库libx264.a,动态库在/usr/local/lib,头文件/usr/local/include文件夹下。

3、使用最新的ffmpeg源代码编译
在ffmpeg官网下载最新的代码https://www.ffmpeg.org/download.html

	git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
#编译成动态库
./configure --enable-shared --disable-static --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-pthreads
#编译成静态库
./configure --enable-static --disable-shared --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-pthreads

參考资料:

1、http://www.helyar.net/2010/how-to-compile-ffmpeg-from-source/

2、https://help.ubuntu.com/community/FFmpeg#Source_Build

centos编译ffmpeg x264的更多相关文章

  1. android编译ffmpeg+x264

    下载最新版的x264ftp://ftp.videolan.org/pub/videolan/x264/snapshots/1.解压到指定的目录2.切换当前目录为该目录3.创建一个shell脚本buil ...

  2. 阿里云服务器---centos编译安装ffmpeg

    环境 系统环境:CentOS release 6.7 (Final) 需求 编译安装ffmpeg 获取依赖 安装依赖包 yum install -y autoconf automake cmake f ...

  3. centos 在CentOS下编译FFmpeg

    所需软件 准备 yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel  -y 新版还 ...

  4. 64位 CentOS NDK 编译 FFMPEG

    64位 CentOS NDK 编译 FFMPEG 一.           参考文章: http://www.cnblogs.com/baopu/p/4733029.html http://www.c ...

  5. MinGW-MSYS Bundle Win32编译ffmpeg 生成DLL并加入X264模块

    组件资源站点 1)MinGW-MSYS Bundle http://sourceforge.net/projects/mingwbundle/files/ 2)yasm汇编器 http://yasm. ...

  6. linux 编译ffmpeg 支持x264, x265

    1. 前言 本教程涉及的ffmpeg, x264, x265 2. 环境依赖 2.1 删除系统中安装的ffmpeg等库 sudo apt-get --purge remove ffmpeg mplay ...

  7. [笔记] Ubuntu下编译ffmpeg+openh264+x264

    [下载代码]   - ffmpeg: git clone git://source.ffmpeg.org/ffmpeg.git - openh264: git clone https://github ...

  8. 基于v4l2 ffmpeg x264的视频远程监控(附上编译好的库文件)

    说明:主要是基于ghostyu网友整理的< arm mini2440 基于v4l2 ffmpeg x264的视频远程监控>.自己做了一遍,遇到不少问题,就整理记录下来. 1.平台 硬件:a ...

  9. linux下编译ffmpeg 引入外部库x264

    Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure ...

随机推荐

  1. c++迭代器失效问题

    参考两篇文章:https://blog.csdn.net/skyroben/article/details/70877008 https://lichanghao.github.io/2016/08/ ...

  2. 最详细的CentOS 6与7对比(二):服务管理对比

    本主题将从3个角度进行对比 常见设置(CentOS 6 vs CentOS 7) 服务管理(Sysvinit vs Upstart vs Systemd) 性能测试(cpu/mem/io/oltp) ...

  3. C# WinForm DataGridView 给标题列增加序号及格式化某个字段

    DataGridView 给标题列增加序号 private void dataGridView1_DataBindingComplete(object sender, DataGridViewBind ...

  4. Eric6中编译窗体时,弹出提示:无法启动pyuic5的解决方案

    用 Eric6 与 PyQt5 结合,非常方便的实现界面与逻辑分离,满足python的极速GUI编程,不需要在界面上花很多时间. 这是一对GUI开发完美的组合! Eric6中设计窗体时,弹出提示:‘无 ...

  5. Spring学习笔记之依赖的注解(2)

    Spring学习笔记之依赖的注解(2) 1.0 注解,不能单独存在,是Java中的一种类型 1.1 写注解 1.2 注解反射 2.0 spring的注解 spring的 @Controller@Com ...

  6. Android 消息队列机制

    在非UI线程使用Handler进行线程通信时,一般都需要进行3个步骤: 创建Looper Looper.prepar() 创建Handler 启动消息循环Looper.loop() 通过这3步,基本就 ...

  7. 【原创】打印GC log

    -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:c:/gc.log

  8. C# 响应一个html页面

    System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<html><head ...

  9. concurrently - npm 同时运行前端和后台服务

    项目基于vue(前端)+node(后台),需要启动两个服务 0.文件夹结构及package.json内容: 1.客户端 npm run dev 2.服务器 cd server npm run serv ...

  10. 从无到有创建一个grunt项目

    在安装好grunt的前提下创建一个grunt的项目: 1.首先创建一个项目文件 就叫grunt-project 2.进入这个文件 创建一个index.html 在创建一个js文件,进去创建一个inde ...