FFMpeg 源码编译 在ubuntu

1. ffmpeg的下载:我们就可以通过svn命令获取最新的ffmpeg,命令如下:

svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

进入ffmpeg目录

配置编译
   for x86
#./configure --prefix=/usr/local

它会依懒于yasm 一些模块,如果ubuntu没有安装该软件,需要到ubtuntu ->系统-》系统管理-》新立得软件包管理-》搜索并安装一下

默认安装

然后再执行#./configure --prefix=/usr/local

执行完,直接执行 make


2. support more

*xvid

安装xvid的获取地址如下:
http://www.xvid.org/
wget http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
配置编译
   for x86

andy@andy-desktop:~/FFMpeg/xvidcore-1.1.3$ find -name configure
./build/generic/configure
andy@andy-desktop:~/FFMpeg/xvidcore-1.1.3$ ./build/generic/configure --prefix=/usr/local
andy@andy-desktop:~/FFMpeg/xvidcore-1.1.3/build/generic$ make

andy@andy-desktop:~/FFMpeg/xvidcore-1.1.3/build/generic$ sudo make install
[sudo] password for andy:
  D: /usr/local/lib
  I: /usr/local/lib/libxvidcore.so.4.1
  I: /usr/local/lib/libxvidcore.a
  D: /usr/local/include
  I: /usr/local/include/xvid.h



*x264

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

Getting x264

The latest x264 source code can always be found by anonymous git repository:

# git clone git://git.videolan.org/x264.git


andy@andy-desktop:~/FFMpeg/x264/x264$ git clone git://git.videolan.org/x264.git

配置编译
   for x86
#./configure --enable-shared --prefix=/usr/local

可能会出现以下错误情况:

andy@andy-desktop:~/FFMpeg/x264/x264$ ./configure --enable-shared --prefix=/usr/local
Found yasm 0.8.0.2194
Minimum version is yasm-1.0.0
If you really want to compile without asm, configure with --disable-asm.
====》解决方法:可直接到yasm官网下载源码安装:

http://yasm.tortall.net/releases/Release1.2.0.html 下载1.0以上的版本

解压 然后make install

On UNIX-compatible operating systems, Yasm builds using the standard “./configure; make; make install” commands. GNU make is not required. While Yasm development requires a larger toolchain (see the HACKING file), building Yasm should not require more than just a C compiler.

===========

再次执行

andy@andy-desktop:~/FFMpeg/x264/x264$ ./configure --enable-shared --prefix=/usr/local
#make
#sudo make install

andy@andy-desktop:~/FFMpeg/x264/x264$ sudo make install
[sudo] password for andy:
install -d /usr/local/bin
install x264 /usr/local/bin
install -d /usr/local/include
install -d /usr/local/lib
install -d /usr/local/lib/pkgconfig
install -m 644 x264.h /usr/local/include
install -m 644 x264_config.h /usr/local/include
install -m 644 x264.pc /usr/local/lib/pkgconfig
ln -f -s libx264.so.120 /usr/local/lib/libx264.so
install -m 755 libx264.so.120 /usr/local/lib


*Lame

lame的获取地址如下: http://lame.sourceforge.net/index.php

解压tar -xvf lame-3.99.3.tar.gz

andy@andy-desktop:~/FFMpeg/lame-3.99.3$ ./configure --enable-shared --prefix=/usr/local
make

sudo make install 




  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值