概述
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以上的版本
- Source .tar.gz
解压 然后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
最后
以上就是昏睡毛豆为你收集整理的FFMpeg 源码编译 在ubuntuGetting x264的全部内容,希望文章能够帮你解决FFMpeg 源码编译 在ubuntuGetting x264所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复