第一步:安装必要的库

  1. $:sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libMP3lame-dev libsdl1.-dev libtheora-dev libx11-dev zlib1g-dev

第二步:安装SDL(否则可能编译不出ffplay)

  1. $:sudo apt-get install libsdl1.-dev
  2. $:sudo apt-get install libsdl-image1.-dev libsdl-mixer1.-dev libsdl-ttf2.-dev libsdl-gfx1.-dev

第三步:安装YASM(否则不能编译汇编语言)

  1. git clone git://github.com/yasm/yasm.git
  2. cd yasm-1.2.
  3. ./configure
  4. make
  5. sudo checkinstall

我用的源码下载地址:http://download.csdn.net/detail/gjianw217/5847841

官网下载:http://yasm.tortall.net/Download.html

第四步:安装X264

  1. $git clone git://git.videolan.org/x264.git
  2. $cd x264
  3. $./configure enable-shared
  4. $make
  5. $sudo make install

我用的源码下载地址:http://download.csdn.net/detail/gjianw217/5847845

官网下载:http://www.videolan.org/developers/x264.html

第五步:安装FFMpeg

  1. $:git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
  2. $:cd ffmpeg.2.0
  3. $:./configure --enable-memalign-hack --enable-static --enable-gpl --enable-libx264 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
  4. $:make
  5. $:make install

 注:其中--extra-cflags=-I/home/video/ffmpeg-set/include和--extra-ldflags=-L/home/video/ffmpeg-set/lib/指定x264库的位置

我用的源码下载地址:http://download.csdn.net/detail/gjianw217/5847875

官网下载:http://www.ffmpeg.org/download.html

第六步:通过以上步骤,基本上安装成了带有X264的ffmpeg,但使用过程中会提示

ERROR: libx264 not found

找了很多解决方案:具体有:

http://blog.csdn.net/ljh081231/article/details/7595556

http://blog.csdn.net/webdisk008/article/details/6618777

http://code.google.com/p/x264-ffmpeg-up-to-date/issues/detail?id=13

最好我的解决方法是:将libx264所在的目录,添加到文件ld.so.conf中,就可以了。具体的代码如下:

  1. $:sudo vi /etc/ld.so.conf
  2. .....................
  3. $:sudo ldconfig /etc/ld.so.conf

ubuntu下安装ffmpeg和X264的更多相关文章

  1. ubuntu 下安装ffmpeg

    FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.采用LGPL或GPL许可证.它提供了录制.转换以及流化音视 频的完整解决方案.它包含了非常先进的音频/视频编解码库 ...

  2. ubuntu下安装ffmpeg

    sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next sudo apt-get update sudo apt-get install ff ...

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

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

  4. ubuntu下安装ffmpeg扩展

    可通过PPA进行安装 sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next sudo apt-get update sudo apt-get ...

  5. 【FFMPEG】Ubuntu上安装FFMPEG

    在之前,我们成功地使用mingw+msys在Windows平台下编译FFmpeg(见 http://www.linuxidc.com/Linux/2014-11/109839.htm),并生成了ffp ...

  6. 在Ubuntu下安装ovs-dpdk

    在Ubuntu下安装ovs-dpdk 参考资料:https://software.intel.com/zh-cn/articles/using-open-vswitch-with-dpdk-on-ub ...

  7. Ubuntu 下安装QT

    Ubuntu 下安装QT 本文使用的环境 QT Library: qt-everywhere-opensource-src-4.7.4.tar.gz QT Creator: qt-creator-li ...

  8. Ubuntu下安装JDK以及相关配置

    1.查看系统位数,输入以下命令即可 getconf LONG_BIT 2.下载对应的JDK文件,我这里下载的是jdk-8u60-linux-64.tar.gz 3.创建目录作为JDK的安装目录,这里选 ...

  9. Ubuntu下安装mod_python报错(GIT错误)

    Ubuntu下安装mod_python3.4.1版本报出如下错误: writing byte-compilation script '/tmp/tmpE91VXZ.py' /usr/bin/pytho ...

随机推荐

  1. reset.css(详细说明)

    @charset "utf-8";/************************************************************************ ...

  2. MYSQL基础笔记(三)-表操作基础

    数据表的操作 表与字段是密不可分的. 新增数据表 Create table [if not exists] 表名( 字段名 数据类型, 字段名 数据类型, 字段n 数据类型 --最后一行不需要加逗号 ...

  3. ASP.NET弹出模态对话框【转】

    主页面 PageBase.aspx.cs 中的代码 protected void Page_Load(object sender, EventArgs e) {    if (!this.IsPost ...

  4. 手把手教你使用Size Class

    在 iOS8 中,我们不用再像以前那样,一个页面新建多个 xib 文件来适配不同类型的屏幕,现在我们可以把各种尺寸屏幕的适配工作放在一个文件中完成,然后可以通过不同类别的 Size 来定制各种尺寸的界 ...

  5. Objective-C ,ios,iphone开发基础:http网络编程

    - (IBAction)loadData:(id)sender { NSURL* url = [NSURL URLWithString:@"http://162.105.65.251:808 ...

  6. java 网络编程-tcp/udp

    --转自:http://blog.csdn.net/nyzhl/article/details/1705039 直接把代码写在这里,解释看这里吧:http://blog.csdn.net/nyzhl/ ...

  7. jboss使用(eap 6.0以后版本)

    以6.3版本为例,下载地址 https://www.jboss.org/products/eap/download/,这个地址现在有问题了,下不了好像要redhat账号还要花钱?不知咋回事 下载完成后 ...

  8. AutoCAD 2014 win 32bit破解版

    AutoCAD 2014 win 32bit破解版 百度云盘:http://pan.baidu.com/s/1nu2u6Hr

  9. ActiveMQ 的安装

    1. 在 http://activemq.apache.org/ 下载 ActiveMQ.Windows 系统选择下载 apache-activemq-x.x.x-bin.zip,Unix/Linux ...

  10. JQuery合并列(可用于导出Word)

    在网上找了一些JQuery合并列的例子,但是都是用.hide()的方式,这样导致了在导出Word的时候表格严重变形 自己写了一个用.remove()方式的合并列 function arrangeTab ...