FFMpeg Compile

1. get ffmpeg:

use git

link: http://www.ffmpeg.org/download.html

 

2. support more

2.1 mp3  (linux lame)

lame:http://lame.sourceforge.net/

install: http://lame.sourceforge.net/download.php

 

tar zvxf lame-3.99.2.tar.gz

cd ./lame-3.99.2

./configure --enable-shared --prefix=/usr

make

sudo make install

 

#defaul install path is /usr/local, but for ffmpeg complier, change to /usr.

 

2.2 Ogg Vorbis

link: http://www.vorbis.com/

libogg / libvorbis / vorbis-tools: These are the standard software that allows you to play and encode Ogg Vorbis files. They are included in most OSs. If not you can compile from the sources .

 

2.3 xvid

link:http://www.xvid.org/

download: http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz

 

tar zvxf xvidcore-1.3.2.tar.gz

cd ./xvidcore

#you can get install information in doc/INSATLL

cd ./build/generic

./configure --prefix=/usr

make

sudo make install

 

2.4 x264

link:http://www.videolan.org/developers/x264.html

#you can find download way in this page.

download: ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2

 

tar jxvf last_x264.tar.bz2

cd ./x264-snapshot-20111123-2245

make

sudo make install

 

#when ./configure you will get this:

#Found no assembler
#Minimum version is yasm-1.0.0
#If you really want to compile without asm, configure with --disable-asm.

#you can install yasm:

sudo apt-get install yasm

#Or you can visit:

#http://yasm.tortall.net/Download.html

#to make sure the Minimun version of yasm is 1.0.0

 

#if you get the configure err or libx264 not found:

#unsatisfied condition: X264_BUILD >=118

#then you should get the source from git.  see @link at the beginning of this section.

cd x264

./configure --prefix=/usr --enable-shared

make

sudo make install

 

2.5 AC3

as4 OS is AC3 supported, then you just need add --enable-a52 --enable-gpl when compiling.

 

2.6 dts

link: http://www.videolan.org/developers/libdca.html

 

i have not found libdts. just see some information about libdca.

I have given up it.

 

2.7 mpg4 aac(we just install faad2 and faac)

link: http://sourceforge.net/projects/faac/

download: http://sourceforge.net/projects/faac/files/

 

faad2:

./configure --prefix=/usr --with-mp4v2 --enable-shared
make
make install

 

#problem:

#need install autoconf : apt-get install autoconf

#if use autoreconf -vif will recive some errors. I dont know why.

 

faac:

chmod +x bootstrap
./bootstrap
./configure --prefix=/usr --with-mp4v2 --enable-shared
make
make install

 

#problem:

#need install libtool: apt-get install libtool

#some code error:

new declaration ‘char* strcasestr(const char*, const char*)

#you should change the code:

#ifdef __cplusplus
extern "C " {
#endif
char * strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif

 

to:


#ifdef __cplusplus
extern "C++ " {
#endif
const char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif

 

see:http://topic.youkuaiyun.com/u/20100820/15/bbf7190f-1ab8-44fa-9c9b-fabd7e388e62.html

 

and all about faac and faad2, you can also see :

http://home.chinavideo.org/space.php?uid=1&do=thread&id=6

 

2.8 3gp

need add options when compiling:

--enable-amr_nb --enable-amr_wb

and get codes:

http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip

#put the codes of it into libavcodec/amrwb_float

 

http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip

#put the codes of it into libavcodec/amr_float

 

//==========================

http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510.zip

#if you use options --enable-amr_nb-fixed instad of --enable-amr_nb

put the codes of it into libavcodec/amr

edit libavcodec/amr/makefile:

change:

CFLAGS = -Wall -pedantic-errors -I. $(CFLAGS_$(MODE)) -D$(VAD)

to:

CFLAGS = -Wall -I. $(CFLAGS_$(MODE)) -D$(VAD) -DMMS_IO

//==========================

if any problem occured, see http://bbs.chinavideo.org/viewthread.php?tid=2469&extra=page%3D1

 

 

3 complie

 

/configure --prefix=/usr --enable-gpl --enable-shared --enable-mp3lame --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2 --enable-libogg --enable-vorbis --enable-xvid --enable-a52 --enable-a52bin --enable-dts --enable-pp --enable-faad --enable-faadbin --enable-faac --enable-x264 --enable-pthreads --disable-ffserver --disable-ffplay
make
make install

 

4. other

if you wanna support rmvb or wma9, try goole and make it.

 

 

this is a note of compiling ffmpeg.

 

5. notice

 

you can see the base aticle:

 

http://www.chinavideo.org/viewthread.php?tid=697&extra=page%3D1

 

本网所有文章建立在 创作公用 协议下。版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及以上“创作共用”声明。

 

over!

thanks.

 

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值