编译libav(ffmpeg)库

1、下载最新的yasm1.20,编译安装(最新的x264会用到)
http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
2、下载最新的x264
 export PATH=$PATH:/home/xy/mywork/av/yasm-1.2.0
 ./configure  --enable-gpl


3、下载最新的libav
sudo apt-get install libsdl1.2-dev  (avplay 编译使用)

http://libav.org/releases/libav-snapshot.tar.bz2
export PATH=$PATH:/home/xy/mywork/av/yasm-1.2.0
./configure --enable-gpl  --enable-libx264   --extra-cflags="-I/home/xy/mywork/av/x264-snapshot-20140218-2245"  --extra-ldflags="-L/home/xy/mywork/av/x264-snapshot-20140218-2245" --extra-libs="-ldl"


其中:

1、编译加--enable-libx264选项时要加--enable-gql;为了找到x264要加上--extra-cflags和--extra-ldflags,要编译x264不出错;要加上--extra-libs="-ldl"

configure的结果:

xy@xy-laptop:~/mywork/av/libav-2014-03-02$ ./configure --enable-gpl  --enable-libx264   --extra-cflags="-I/home/xy/mywork/av/x264-snapshot-20140218-2245"  --extra-ldflags="-L/home/xy/mywork/av/x264-snapshot-20140218-2245" --extra-libs="-ldl"
install prefix            /usr/local
source path               .
C compiler                gcc
C library                 glibc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     no
yasm                      yes
MMX enabled               yes
MMXEXT enabled            yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
XOP enabled               yes
FMA3 enabled              yes
FMA4 enabled              yes
i686 features enabled     yes
CMOV is fast              no
EBX available             yes
EBP available             yes
debug symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
new filter support        yes
network support           yes
threading support         pthreads
safe bitstream reader     yes
SDL support               no

External libraries:
libx264			zlib

Enabled decoders:
aac			cllc			lagarith
aac_latm		comfortnoise		loco
aasc			cook			mace3
ac3			cscd			mace6
adpcm_4xm		cyuv			mdec
adpcm_adx		dca			metasound
adpcm_ct		dfa			mimic
adpcm_ea		dnxhd			mjpeg
adpcm_ea_maxis_xa	dpx			mjpegb
adpcm_ea_r1		dsicinaudio		mlp
adpcm_ea_r2		dsicinvideo		mmvideo
adpcm_ea_r3		dvbsub			motionpixels
adpcm_ea_xas		dvdsub			mp1
adpcm_g722		dvvideo			mp1float
adpcm_g726		dxa			mp2
adpcm_ima_amv		dxtory			mp2float
adpcm_ima_apc		eac3			mp3
adpcm_ima_dk3		eacmv			mp3adu
adpcm_ima_dk4		eamad			mp3adufloat
adpcm_ima_ea_eacs	eatgq			mp3float
adpcm_ima_ea_sead	eatgv			mp3on4
adpcm_ima_iss		eatqi			mp3on4float
adpcm_ima_qt		eightbps		mpc7
adpcm_ima_smjpeg	eightsvx_exp		mpc8
adpcm_ima_wav		eightsvx_fib		mpeg1video
adpcm_ima_ws		escape124		mpeg2video
adpcm_ms		escape130		mpeg4
adpcm_sbpro_2		ffv1			msa1
adpcm_sbpro_3		ffvhuff			msmpeg4v1
adpcm_sbpro_4		fic			msmpeg4v2
adpcm_swf		flac			msmpeg4v3
adpcm_thp		flashsv			msrle
adpcm_xa		flashsv2		mss1
adpcm_yamaha		flic			mss2
aic			flv			msvideo1
alac			fourxm			mszh
als			fraps			mts2
amrnb			frwu			mxpeg
amrwb			g2m			nellymoser
amv			g723_1			nuv
anm			gif			pam
ansi			gsm			pbm
ape			gsm_ms			pcm_alaw
ass			h261			pcm_bluray
asv1			h263			pcm_dvd
asv2			h263i			pcm_f32be
atrac1			h264			pcm_f32le
atrac3			hevc			pcm_f64be
atrac3p			hnm4_video		pcm_f64le
aura			huffyuv			pcm_lxf
aura2			iac			pcm_mulaw
avs			idcin			pcm_s16be
bethsoftvid		iff_byterun1		pcm_s16le
bfi			iff_ilbm		pcm_s16le_planar
bink			imc			pcm_s24be
binkaudio_dct		indeo2			pcm_s24daud
binkaudio_rdft		indeo3			pcm_s24le
bmp			indeo4			pcm_s24le_planar
bmv_audio		indeo5			pcm_s32be
bmv_video		interplay_dpcm		pcm_s32le
c93			interplay_video		pcm_s32le_planar
cavs			jpeg2000		pcm_s8
cdgraphics		jpegls			pcm_s8_planar
cdxl			jv			pcm_u16be
cinepak			kgv1			pcm_u16le
cljr			kmvc			pcm_u24be
pcm_u24le		sipr			vmdaudio
pcm_u32be		smackaud		vmdvideo
pcm_u32le		smacker			vmnc
pcm_u8			smc			vorbis
pcm_zork		sol_dpcm		vp3
pcx			sp5x			vp5
pgm			srt			vp6
pgmyuv			sunrast			vp6a
pgssub			svq1			vp6f
pictor			svq3			vp8
png			tak			vp9
ppm			targa			vqa
prores			theora			wavpack
ptx			thp			webp
qcelp			tiertexseqvideo		wmalossless
qdm2			tiff			wmapro
qdraw			tmv			wmav1
qpeg			truehd			wmav2
qtrle			truemotion1		wmavoice
r10k			truemotion2		wmv1
r210			truespeech		wmv2
ra_144			tscc			wmv3
ra_288			tscc2			wmv3image
ralf			tta			wnv1
rawvideo		twinvq			ws_snd1
rl2			txd			xan_dpcm
roq			ulti			xan_wc3
roq_dpcm		utvideo			xan_wc4
rpza			v210			xl
rv10			v210x			xsub
rv20			v410			xwd
rv30			vb			yop
rv40			vble			zerocodec
s302m			vc1			zlib
sgi			vc1image		zmbv
shorten			vcr1

Enabled encoders:
a64multi		h263p			pcm_u32le
a64multi5		huffyuv			pcm_u8
aac			jpegls			pcx
ac3			libx264			pgm
ac3_fixed		ljpeg			pgmyuv
adpcm_adx		mjpeg			png
adpcm_g722		mp2			ppm
adpcm_g726		mpeg1video		prores
adpcm_ima_qt		mpeg2video		qtrle
adpcm_ima_wav		mpeg4			ra_144
adpcm_ms		msmpeg4v2		rawvideo
adpcm_swf		msmpeg4v3		roq
adpcm_yamaha		nellymoser		roq_dpcm
alac			pam			rv10
ass			pbm			rv20
asv1			pcm_alaw		sgi
asv2			pcm_f32be		sunrast
bmp			pcm_f32le		svq1
cljr			pcm_f64be		targa
comfortnoise		pcm_f64le		tiff
dnxhd			pcm_mulaw		utvideo
dpx			pcm_s16be		v210
dvbsub			pcm_s16le		v410
dvdsub			pcm_s24be		vorbis
dvvideo			pcm_s24daud		wmav1
eac3			pcm_s24le		wmav2
ffv1			pcm_s32be		wmv1
ffvhuff			pcm_s32le		wmv2
flac			pcm_s8			xbm
flashsv			pcm_u16be		xsub
flv			pcm_u16le		xwd
gif			pcm_u24be		zlib
h261			pcm_u24le		zmbv
h263			pcm_u32be

Enabled hwaccels:

Enabled parsers:
aac			flac			mpegvideo
aac_latm		gsm			png
ac3			h261			pnm
adx			h263			rv30
cavsvideo		h264			rv40
cook			hevc			tak
dca			mjpeg			vc1
dirac			mlp			vorbis
dnxhd			mpeg4video		vp3
dvbsub			mpegaudio		vp8
dvdsub

Enabled demuxers:
aac			image2			pcm_u32be
ac3			image2pipe		pcm_u32le
adx			ingenient		pcm_u8
aea			ipmovie			pmp
aiff			iss			pva
amr			iv8			qcp
anm			ivf			r3d
apc			jv			rawvideo
ape			latm			rl2
asf			lmlm4			rm
ass			lxf			roq
au			m4v			rpl
avi			matroska		rso
avs			mjpeg			rtp
bethsoftvid		mlp			rtsp
bfi			mm			sap
bink			mmf			sdp
bmv			mov			segafilm
c93			mp3			shorten
caf			mpc			siff
cavsvideo		mpc8			smacker
cdg			mpegps			smjpeg
cdxl			mpegts			sol
daud			mpegtsraw		sox
dfa			mpegvideo		spdif
dirac			msnwc_tcp		srt
dnxhd			mtv			str
dsicin			mvi			swf
dts			mxf			tak
dv			mxg			thp
dxa			nc			tiertexseq
ea			nsv			tmv
ea_cdata		nut			truehd
eac3			nuv			tta
ffm			ogg			tty
ffmetadata		oma			txd
filmstrip		pcm_alaw		vc1
flac			pcm_f32be		vc1t
flic			pcm_f32le		vmd
flv			pcm_f64be		voc
fourxm			pcm_f64le		vqf
g722			pcm_mulaw		w64
g723_1			pcm_s16be		wav
gsm			pcm_s16le		wc3
gxf			pcm_s24be		wsaud
h261			pcm_s24le		wsvqa
h263			pcm_s32be		wtv
h264			pcm_s32le		wv
hevc			pcm_s8			xa
hls			pcm_u16be		xmv
hnm			pcm_u16le		xwma
idcin			pcm_u24be		yop
iff			pcm_u24le		yuv4mpegpipe
ilbc

Enabled muxers:
a64			image2			pcm_s16be
ac3			image2pipe		pcm_s16le
adts			ipod			pcm_s24be
adx			ismv			pcm_s24le
aiff			ivf			pcm_s32be
amr			latm			pcm_s32le
asf			m4v			pcm_s8
asf_stream		matroska		pcm_u16be
ass			matroska_audio		pcm_u16le
au			md5			pcm_u24be
avi			mjpeg			pcm_u24le
avm2			mlp			pcm_u32be
cavsvideo		mmf			pcm_u32le
crc			mov			pcm_u8
daud			mp2			psp
dirac			mp3			rawvideo
dnxhd			mp4			rm
dts			mpeg1system		roq
dv			mpeg1vcd		rso
eac3			mpeg1video		rtp
f4v			mpeg2dvd		rtsp
ffm			mpeg2svcd		sap
ffmetadata		mpeg2video		segment
filmstrip		mpeg2vob		smjpeg
flac			mpegts			smoothstreaming
flv			mpjpeg			sox
framecrc		mxf			spdif
framemd5		mxf_d10			srt
g722			null			swf
gif			nut			tg2
gxf			ogg			tgp
h261			oma			truehd
h263			pcm_alaw		vc1t
h264			pcm_f32be		voc
hds			pcm_f32le		wav
hevc			pcm_f64be		webm
hls			pcm_f64le		wv
ilbc			pcm_mulaw		yuv4mpegpipe

Enabled protocols:
concat			httpproxy		rtmpt
crypto			md5			rtp
ffrtmphttp		mmsh			srtp
file			mmst			tcp
gopher			pipe			udp
hls			rtmp			unix
http

Enabled filters:
aformat			drawbox			overlay
amix			fade			pad
anull			fieldorder		pixdesctest
anullsink		format			resample
anullsrc		fps			rgbtestsrc
asetpts			framepack		scale
ashowinfo		gradfun			select
asplit			hflip			setdar
asyncts			hqdn3d			setpts
atrim			interlace		setsar
blackframe		join			settb
boxblur			lut			showinfo
channelmap		lutrgb			split
channelsplit		lutyuv			testsrc
color			movie			transpose
compand			negate			trim
copy			noformat		unsharp
crop			null			vflip
cropdetect		nullsink		volume
delogo			nullsrc			yadif

Enabled bsfs:
aac_adtstoasc		imx_dump_header		noise
chomp			mjpeg2jpeg		remove_extradata
dump_extradata		mjpega_dump_header	text2movsub
h264_mp4toannexb	mov2textsub

Enabled indevs:
dv1394			oss			v4l2
fbdev

Enabled outdevs:
oss

License: GPL version 2 or later
Creating config.mak and config.h...
config.h is unchanged
config.asm is unchanged
libavutil/avconfig.h is unchanged
xy@xy-laptop:~/mywork/av/libav-2014-03-02$ make -j20


相关代码已打包上传到:

http://download.csdn.net/detail/xyyangkun/6990663


评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值