1. 安装X264
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-shared --disable-asm
make
sudo make install
2. 安装ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-libx264 --enable-shared --disable-asm --enable-gpl
如果配置成功,如下所示:
lc@lc:~/weidong/softPackage/ffmpeg$ ./configure --enable-libx264 --enable-shared --disable-asm --enable-gpl
install prefix /usr/local
source path .
C compiler gcc
C library glibc
ARCH c (generic)
big-endian no
runtime cpu detection yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared yes
postprocessing support yes
network support yes
threading support pthreads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
External libraries:
iconv libxcb_shape lzma
libx264 libxcb_shm zlib
libxcb libxcb_xfixes
External libraries providing hardware acceleration:
v4l2_m2m
Libraries:
avcodec avformat swresample
avdevice avutil swscale
avfilter postproc
Programs:
ffmpeg ffprobe
Enabled decoders:
aac flic pictor
aac_fixed flv pixlet
aac_latm fmvc pjs
aasc fourxm png
ac3 fraps ppm
ac3_fixed frwu prores
adpcm_4xm g2m prosumer
adpcm_adx g723_1 psd
adpcm_afc g729 ptx
adpcm_agm gdv qcelp
adpcm_aica gif qdm2
adpcm_ct gremlin_dpcm qdmc
adpcm_dtk gsm qdraw
adpcm_ea gsm_ms qpeg
adpcm_ea_maxis_xa h261 qtrle
adpcm_ea_r1 h263 r10k
adpcm_ea_r2 h263_v4l2m2m r210
adpcm_ea_r3 h263i ra_144
adpcm_ea_xas h263p ra_288
adpcm_g722 h264 ralf
adpcm_g726 h264_v4l2m2m rasc
adpcm_g726le hap rawvideo
adpcm_ima_amv hcom realtext
adpcm_ima_apc hevc rl2
adpcm_ima_dat4 hnm4_video roq
adpcm_ima_dk3 hq_hqa roq_dpcm
adpcm_ima_dk4 hqx rpza
adpcm_ima_ea_eacs huffyuv rscc
adpcm_ima_ea_sead hymt rv10
adpcm_ima_iss iac rv20
adpcm_ima_oki idcin rv30
adpcm_ima_qt idf rv40
adpcm_ima_rad iff_ilbm s302m
adpcm_ima_smjpeg ilbc sami
adpcm_ima_wav imc sanm
adpcm_ima_ws imm4 sbc
adpcm_ms indeo2 scpr
adpcm_mtaf indeo3 screenpresso
adpcm_psx indeo4 sdx2_dpcm
adpcm_sbpro_2 indeo5 sgi
adpcm_sbpro_3 interplay_acm sgirle
adpcm_sbpro_4 interplay_dpcm sheervideo
adpcm_swf interplay_video shorten
adpcm_thp jacosub sipr
adpcm_thp_le jpeg2000 smackaud
adpcm_vima jpegls smacker
adpcm_xa jv smc
adpcm_yamaha kgv1 smvjpeg
agm kmvc snow
aic lagarith sol_dpcm
alac loco sonic
alias_pix lscr sp5x
als m101 speedhq
amrnb mace3 srgc
amrwb mace6 srt
amv magicyuv ssa
anm mdec stl
ansi metasound subrip
ape microdvd subviewer
apng mimic subviewer1
aptx mjpeg sunrast
aptx_hd mjpegb svq1
arbc mlp svq3
ass mmvideo tak
asv1 motionpixels targa
asv2 movtext targa_y216
atrac1 mp1 tdsc
atrac3 mp1float text
atrac3al mp2 theora
atrac3p mp2float thp
atrac3pal mp3 tiertexseqvideo
atrac9 mp3adu tiff
aura mp3adufloat tmv
aura2 mp3float truehd
avrn mp3on4 truemotion1
avrp mp3on4float truemotion2
avs mpc7 truemotion2rt
avui mpc8 truespeech
ayuv mpeg1_v4l2m2m tscc
bethsoftvid mpeg1video tscc2
bfi mpeg2_v4l2m2m tta
bink mpeg2video twinvq
binkaudio_dct mpeg4 txd
binkaudio_rdft mpeg4_v4l2m2m ulti
bi