编译
1.ffmpeg官网找个一个历史稳定版本。
2.右键获取下载地址,用wget下载。
3.解压源文件。
4.安装ffmpeg依赖的yasm包,yum install yasm -y
5.进入文件夹,./configure –enable-shared –prefix=/usr/ffmpeg –enable-openssl
6.make && make install
7.修改文件: /etc/ld.so.conf 在文件后面添加: /usr/ffmpeg/lib/ 然后执行ldconfig命令使配置文件生效,这个文件记录了编译时使用的动态链接库的路径。
8.配置环境变量,使用 vim /etc/profile命令打开profile文件,在文件末添加环境变量:
#set ffmpeg environment
export PATH=$PATH:/usr/ffmpeg/bins
9.配置完成后执行,执行source /etc/profile
10.查看是否配置ffmpeg成功,执行命令:ffmpeg -version
gcc编译命令
常用参数:
参数 含义
-o 指定输出文件路径
-E 只对源文件进行预处理,输出.i文件
-S 对源文件进行预处理、编译,输出.s文件
-c 对源文件进行预处理、编译、汇编,输出.o文件
-I 大写的i,包含头文件路径,如 gcc -I real/cool/include/
-L 大写的l,链接库文件路径,如 gcc -L real/cool/lib/
-l 小写的l,链接库文件,如链接librealcool.a:gcc -lrealcool
-fPIC 生成位置无关代码(position-independent code)
-Wall 对代码所有可能有问题的地方发出警告
-g 在目标文件中嵌入调试信息,便于gdb调试
-v 查看编译过程
版本能力集
版本: ffmpeg-4.4.2
install prefix /usr/ffmpeg
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler yasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available yes
debug symbols yes
strip symbols yes
optimize for size no
optimizations yes
static yes
shared yes
postprocessing support no
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:
bzlib libxcb_shape openssl
iconv libxcb_shm xlib
libxcb libxcb_xfixes zlib
External libraries providing hardware acceleration:
xvmc
Libraries:
avcodec avfilter avutil swscale
avdevice avformat swresample
Programs:
ffmpeg ffprobe
Enabled decoders:
aac cyuv mp2float sami
aac_fixed dca mp3 sanm
aac_latm dds mp3adu sbc
aasc derf_dpcm mp3adufloat scpr
ac3 dfa mp3float screenpresso
ac3_fixed dirac mp3on4 sdx2_dpcm
acelp_kelvin dnxhd mp3on4float sga
adpcm_4xm dolby_e mpc7 sgi
adpcm_adx dpx mpc8 sgirle
adpcm_afc dsd_lsbf mpeg1video sheervideo
adpcm_agm dsd_lsbf_planar mpeg2video shorten
adpcm_aica dsd_msbf mpeg4 simbiosis_imx
adpcm_argo dsd_msbf_planar mpegvideo sipr
adpcm_ct dsicinaudio mpl2 siren
adpcm_dtk dsicinvideo msa1 smackaud
adpcm_ea dss_sp mscc smacker
adpcm_ea_maxis_xa dst msmpeg4v1 smc
adpcm_ea_r1 dvaudio msmpeg4v2 smvjpeg
adpcm_ea_r2 dvbsub msmpeg4v3 snow
adpcm_ea_r3 dvdsub msp2 sol_dpcm
adpcm_ea_xas dvvideo msrle sonic
adpcm_g722 dxa mss1 sp5x
adpcm_g726 dxtory mss2 speedhq
adpcm_g726le dxv msvideo1 srgc
adpcm_ima_alp eac3 mszh srt
adpcm_ima_amv eacmv mts2 ssa
adpcm_ima_apc eamad mv30 stl
adpcm_ima_apm eatgq mvc1 subrip
adpcm_ima_cunning eatgv mvc2 subviewer
adpcm_ima_dat4 eatqi mvdv subviewer1
adpcm_ima_dk3 eightbps mvha sunrast
adpcm_ima_dk4 eightsvx_exp mwsc svq1
adpcm_ima_ea_eacs eightsvx_fib mxpeg svq3
adpcm_ima_ea_sead escape124 nellymoser tak
adpcm_ima_iss escape130 notchlc targa
adpcm_ima_moflex evrc nuv targa_y216
adpcm_ima_mtf exr on2avc tdsc
adpcm_ima_oki fastaudio opus text
adpcm_ima_qt ffv1 paf_audio theora
adpcm_ima_rad ffvhuff paf_video thp
adpcm_ima_smjpeg ffwavesynth pam tiertexseqvideo
adpcm_ima_ssi fic pbm tiff
adpcm_ima_wav fits pcm_alaw tmv
adpcm_ima_ws flac pcm_bluray truehd
adpcm_ms flashsv pcm_dvd truemotion1
adpcm_mtaf flashsv2 pcm_f16le truemotion2
adpcm_psx flic pcm_f24le truemotion2rt
adpcm_sbpro_2 flv pcm_f32be truespeech
adpcm_sbpro_3 fmvc pcm_f32le tscc
adpcm_sbpro_4 fourxm pcm_f64be tscc2
adpcm_swf fraps pcm_f64le tta
adpcm_thp frwu pcm_lxf twinvq
adpcm_thp_le g2m pcm_mulaw txd
adpcm_vima g723_1 pcm_s16be ulti
adpcm_xa g729 pcm_s16be_planar utvideo
adpcm_yamaha gdv pcm_s16le v210
adpcm_zork gif pcm_s16le_planar v210x
agm gremlin_dpcm pcm_s24be v308
aic gsm pcm_s24daud v408
alac gsm_ms pcm_s24le v410
alias_pix h261 pcm_s24le_planar vb
als h263 pcm_s32be vble
amrnb h263i pcm_s32le vc1
amrwb h263p pcm_s32le_planar vc1image
amv h264 pcm_s64be vcr1
anm hap pcm_s64le vmdaudio
ansi hca pcm_s8 vmdvideo
ape hcom pcm_s8_planar vmnc
apng hevc pcm_sga vorbis
aptx hnm4_video pcm_u16be vp3
aptx_hd hq_hqa pcm_u16le vp4
arbc hqx pcm_u24be vp5
argo huffyuv pcm_u24le vp6
ass hymt pcm_u32be vp6a
asv1 iac pcm_u32le vp6f
asv2 idcin pcm_u8 vp7
atrac1 idf pcm_vidc vp8
atrac3 iff_ilbm pcx vp9
atrac3al ilbc pfm vplayer
atrac3p imc pgm vqa
atrac3pal imm4 pgmyuv wavpack
atrac9 imm5 pgssub wcmv
aura indeo2 pgx webp
aura2 indeo3 photocd webvtt
av1 indeo4 pictor wmalossless
avrn indeo5 pixlet wmapro
avrp interplay_acm pjs wmav1
avs interplay_dpcm png wmav2
avui interplay_video ppm wmavoice
ayuv ipu prores wmv1
bethsoftvid jacosub prosumer wmv2
bfi jpeg2000 psd wmv3
bink jpegls ptx wmv3image
binkaudio_dct jv qcelp wnv1
binkaudio_rdft kgv1 qdm2 wrapped_avframe
bintext kmvc qdmc ws_snd1
bitpacked lagarith qdraw xan_dpcm
bmp loco qpeg xan_wc3
bmv_audio lscr qtrle xan_wc4
bmv_video m101 r10k xbin
brender_pix mace3 r210 xbm
c93 mace6 ra_144 xface
cavs magicyuv ra_288 xl
ccaption mdec ralf xma1
cdgraphics metasound rasc xma2
cdtoons microdvd rawvideo xpm
cdxl mimic realtext xsub
cfhd mjpeg rl2 xwd
cinepak mjpegb roq y41p
clearvideo mlp roq_dpcm ylc
cljr mmvideo rpza yop
cllc mobiclip rscc yuv4
comfortnoise motionpixels rv10 zero12v
cook movtext rv20 zerocodec
cpia mp1 rv30 zlib
cri mp1float rv40 zmbv
cscd mp2 s302m
Enabled encoders:
a64multi eac3 pcm_s16be_planar sbc
a64multi5 exr pcm_s16le sgi
aac ffv1 pcm_s16le_planar snow
ac3 ffvhuff pcm_s24be sonic
ac3_fixed fits pcm_s24daud sonic_ls
adpcm_adx flac pcm_s24le speedhq
adpcm_argo flashsv pcm_s24le_planar srt
adpcm_g722 flashsv2 pcm_s32be ssa
adpcm_g726 flv pcm_s32le subrip
adpcm_g726le g723_1 pcm_s32le_planar sunrast
adpcm_ima_alp gif pcm_s64be svq1
adpcm_ima_amv h261 pcm_s64le targa
adpcm_ima_apm h263 pcm_s8 text
adpcm_ima_qt h263p pcm_s8_planar tiff
adpcm_ima_ssi huffyuv pcm_u16be truehd
adpcm_ima_wav jpeg2000 pcm_u16le tta
adpcm_ms jpegls pcm_u24be ttml
adpcm_swf ljpeg pcm_u24le utvideo
adpcm_yamaha magicyuv pcm_u32be v210
alac mjpeg pcm_u32le v308
alias_pix mlp pcm_u8 v408
amv movtext pcm_vidc v410
apng mp2 pcx vc2
aptx mp2fixed pfm vorbis
aptx_hd mpeg1video pgm wavpack
ass mpeg2video pgmyuv webvtt
asv1 mpeg4 png wmav1
asv2 msmpeg4v2 ppm wmav2
avrp msmpeg4v3 prores wmv1
avui msvideo1 prores_aw wmv2
ayuv nellymoser prores_ks wrapped_avframe
bmp opus qtrle xbm
cfhd pam r10k xface
cinepak pbm r210 xsub
cljr pcm_alaw ra_144 xwd
comfortnoise pcm_dvd rawvideo y41p
dca pcm_f32be roq yuv4
dnxhd pcm_f32le roq_dpcm zlib
dpx pcm_f64be rpza zmbv
dvbsub pcm_f64le rv10
dvdsub pcm_mulaw rv20
dvvideo pcm_s16be s302m
Enabled hwaccels:
mpeg1_xvmc mpeg2_xvmc
Enabled parsers:
aac dnxhd h263 rv30
aac_latm dolby_e h264 rv40
ac3 dpx hevc sbc
adx dvaudio ipu sipr
av1 dvbsub jpeg2000 tak
avs2 dvd_nav mjpeg vc1
avs3 dvdsub mlp vorbis
bmp flac mpeg4video vp3
cavsvideo g723_1 mpegaudio vp8
cook g729 mpegvideo vp9
cri gif opus webp
dca gsm png xbm
dirac h261 pnm xma
Enabled demuxers:
aa filmstrip lrc rm
aac fits luodat roq
aax flac lvf rpl
ac3 flic lxf rsd
ace flv m4v rso
acm fourxm matroska rtp
act frm mca rtsp
adf fsb mcc s337m
adp fwse mgsts sami
ads g722 microdvd sap
adx g723_1 mjpeg sbc
aea g726 mjpeg_2000 sbg
afc g726le mlp scc
aiff g729 mlv sdp
aix gdv mm sdr2
alp genh mmf sds
amr gif mods sdx
amrnb gsm moflex segafilm
amrwb gxf mov ser
anm h261 mp3 sga
apc h263 mpc shorten
ape h264 mpc8 siff
apm hca mpegps simbiosis_imx
apng hcom mpegts sln
aptx hevc mpegtsraw smacker
aptx_hd hls mpegvideo smjpeg
aqtitle hnm mpjpeg smush
argo_asf ico mpl2 sol
argo_brp idcin mpsub sox
asf idf msf spdif
asf_o iff msnwc_tcp srt
ass ifv msp stl
ast ilbc mtaf str
au image2 mtv subviewer
av1 image2_alias_pix musx subviewer1
avi image2_brender_pix mv sup
avr image2pipe mvi svag
avs image_bmp_pipe mxf svs
avs2 image_cri_pipe mxg swf
avs3 image_dds_pipe nc tak
bethsoftvid image_dpx_pipe nistsphere tedcaptions
bfi image_exr_pipe nsp thp
bfstm image_gif_pipe nsv threedostr
bink image_j2k_pipe nut tiertexseq
binka image_jpeg_pipe nuv tmv
bintext image_jpegls_pipe obu truehd
bit image_pam_pipe ogg tta
bmv image_pbm_pipe oma tty
boa image_pcx_pipe paf txd
brstm image_pgm_pipe pcm_alaw ty
c93 image_pgmyuv_pipe pcm_f32be v210
caf image_pgx_pipe pcm_f32le v210x
cavsvideo image_photocd_pipe pcm_f64be vag
cdg image_pictor_pipe pcm_f64le vc1
cdxl image_png_pipe pcm_mulaw vc1t
cine image_ppm_pipe pcm_s16be vividas
codec2 image_psd_pipe pcm_s16le vivo
codec2raw image_qdraw_pipe pcm_s24be vmd
concat image_sgi_pipe pcm_s24le vobsub
data image_sunrast_pipe pcm_s32be voc
daud image_svg_pipe pcm_s32le vpk
dcstr image_tiff_pipe pcm_s8 vplayer
derf image_webp_pipe pcm_u16be vqf
dfa image_xbm_pipe pcm_u16le w64
dhav image_xpm_pipe pcm_u24be wav
dirac image_xwd_pipe pcm_u24le wc3
dnxhd ingenient pcm_u32be webm_dash_manifest
dsf ipmovie pcm_u32le webvtt
dsicin ipu pcm_u8 wsaud
dss ircam pcm_vidc wsd
dts iss pjs wsvqa
dtshd iv8 pmp wtv
dv ivf pp_bnk wv
dvbsub ivr pva wve
dvbtxt jacosub pvf xa
dxa jv qcp xbin
ea kux r3d xmv
ea_cdata kvag rawvideo xvag
eac3 live_flv realtext xwma
epaf lmlm4 redspark yop
ffmetadata loas rl2 yuv4mpegpipe
Enabled muxers:
a64 framecrc mpeg1vcd rso
ac3 framehash mpeg1video rtp
adts framemd5 mpeg2dvd rtp_mpegts
adx g722 mpeg2svcd rtsp
aiff g723_1 mpeg2video sap
alp g726 mpeg2vob sbc
amr g726le mpegts scc
amv gif mpjpeg segafilm
apm gsm mxf segment
apng gxf mxf_d10 singlejpeg
aptx h261 mxf_opatom smjpeg
aptx_hd h263 null smoothstreaming
argo_asf h264 nut sox
asf hash oga spdif
asf_stream hds ogg spx
ass hevc ogv srt
ast hls oma stream_segment
au ico opus streamhash
avi ilbc pcm_alaw sup
avm2 image2 pcm_f32be swf
avs2 image2pipe pcm_f32le tee
bit ipod pcm_f64be tg2
caf ircam pcm_f64le tgp
cavsvideo ismv pcm_mulaw truehd
codec2 ivf pcm_s16be tta
codec2raw jacosub pcm_s16le ttml
crc kvag pcm_s24be uncodedframecrc
dash latm pcm_s24le vc1
data lrc pcm_s32be vc1t
daud m4v pcm_s32le voc
dirac matroska pcm_s8 w64
dnxhd matroska_audio pcm_u16be wav
dts md5 pcm_u16le webm
dv microdvd pcm_u24be webm_chunk
eac3 mjpeg pcm_u24le webm_dash_manifest
f4v mkvtimestamp_v2 pcm_u32be webp
ffmetadata mlp pcm_u32le webvtt
fifo mmf pcm_u8 wtv
fifo_test mov pcm_vidc wv
filmstrip mp2 psp yuv4mpegpipe
fits mp3 rawvideo
flac mp4 rm
flv mpeg1system roq
Enabled protocols:
async gopher mmst rtp
cache gophers pipe srtp
concat hls prompeg subfile
crypto http rtmp tcp
data httpproxy rtmpe tee
ffrtmpcrypt https rtmps tls
ffrtmphttp icecast rtmpt udp
file md5 rtmpte udplite
ftp mmsh rtmpts unix
Enabled filters:
abench blend graphmonitor scale
abitscope bm3d greyedge scale2ref
acompressor bwdif haas scdet
acontrast cas haldclut scroll
acopy cellauto haldclutsrc select
acrossfade channelmap hdcd selectivecolor
acrossover channelsplit headphone sendcmd
acrusher chorus hflip separatefields
acue chromahold highpass setdar
addroi chromakey highshelf setfield
adeclick chromanr hilbert setparams
adeclip chromashift histogram setpts
adelay ciescope hqx setrange
adenorm codecview hstack setsar
aderivative color hue settb
adrawgraph colorbalance hwdownload shear
aecho colorchannelmixer hwmap showcqt
aemphasis colorcontrast hwupload showfreqs
aeval colorcorrect hysteresis showinfo
aevalsrc colorhold identity showpalette
aexciter colorize idet showspatial
afade colorkey il showspectrum
afftdn colorlevels inflate showspectrumpic
afftfilt colorspace interleave showvolume
afifo colortemperature join showwaves
afir compand kirsch showwavespic
afirsrc compensationdelay lagfun shuffleframes
aformat concat lenscorrection shufflepixels
afreqshift convolution life shuffleplanes
agate convolve limiter sidechaincompress
agraphmonitor copy loop sidechaingate
ahistogram crop loudnorm sidedata
aiir crossfeed lowpass sierpinski
aintegral crystalizer lowshelf signalstats
ainterleave cue lumakey silencedetect
alimiter curves lut silenceremove
allpass datascope lut1d sinc
allrgb dblur lut2 sine
allyuv dcshift lut3d smptebars
aloop dctdnoiz lutrgb smptehdbars
alphaextract deband lutyuv sobel
alphamerge deblock mandelbrot spectrumsynth
amerge decimate maskedclamp speechnorm
ametadata deconvolve maskedmax split
amix dedot maskedmerge sr
amovie deesser maskedmin ssim
amplify deflate maskedthreshold stereotools
amultiply deflicker maskfun stereowiden
anequalizer dejudder mcompand streamselect
anlmdn derain median superequalizer
anlms deshake mergeplanes surround
anoisesrc despill mestimate swaprect
anull detelecine metadata swapuv
anullsink dilation midequalizer tblend
anullsrc displace minterpolate telecine
apad dnn_processing mix testsrc
aperms doubleweave monochrome testsrc2
aphasemeter drawbox movie thistogram
aphaser drawgraph msad threshold
aphaseshift drawgrid negate thumbnail
apulsator drmeter nlmeans tile
arealtime dynaudnorm noformat tlut2
aresample earwax noise tmedian
areverse ebur128 normalize tmidequalizer
arnndn edgedetect null tmix
aselect elbg nullsink tonemap
asendcmd entropy nullsrc tpad
asetnsamples epx oscilloscope transpose
asetpts equalizer overlay treble
asetrate erosion pad tremolo
asettb estdif pal100bars trim
ashowinfo exposure pal75bars unpremultiply
asidedata extractplanes palettegen unsharp
asoftclip extrastereo paletteuse untile
asplit fade pan v360
astats fftdnoiz perms vectorscope
astreamselect fftfilt photosensitivity vflip
asubboost field pixdesctest vfrdet
asubcut fieldhint pixscope vibrance
asupercut fieldmatch premultiply vibrato
asuperpass fieldorder prewitt vif
asuperstop fifo pseudocolor vignette
atadenoise fillborders psnr vmafmotion
atempo firequalizer qp volume
atrim flanger random volumedetect
avectorscope floodfill readeia608 vstack
avgblur format readvitc w3fdif
axcorrelate fps realtime waveform
bandpass framepack remap weave
bandreject framerate removegrain xbr
bass framestep removelogo xfade
bbox freezedetect replaygain xmedian
bench freezeframes reverse xstack
bilateral gblur rgbashift yadif
biquad geq rgbtestsrc yaepblur
bitplanenoise gradfun roberts yuvtestsrc
blackdetect gradients rotate zoompan
Enabled bsfs:
aac_adtstoasc h264_metadata mp3_header_decompress text2movsub
av1_frame_merge h264_mp4toannexb mpeg2_metadata trace_headers
av1_frame_split h264_redundant_pps mpeg4_unpack_bframes truehd_core
av1_metadata hapqa_extract noise vp9_metadata
chomp hevc_metadata null vp9_raw_reorder
dca_core hevc_mp4toannexb opus_metadata vp9_superframe
dump_extradata imx_dump_header pcm_rechunk vp9_superframe_split
eac3_core mjpeg2jpeg prores_metadata
extract_extradata mjpega_dump_header remove_extradata
filter_units mov2textsub setts
Enabled indevs:
fbdev oss xcbgrab
lavfi v4l2
Enabled outdevs:
fbdev oss v4l2 xv
License: LGPL version 2.1 or later
代码编译测试
./configure --enable-shared --prefix=/usr --disable-asm
make && make install
编译结果
install -d /usr/bin
install x264 /usr/bin
install -d /usr/include
install -d /usr/lib/pkgconfig
install -m 644 ./x264.h x264_config.h /usr/include
install -m 644 x264.pc /usr/lib/pkgconfig
install -d /usr/lib
ln -f -s libx264.so.164 /usr/lib/libx264.so
install -m 755 libx264.so.164 /usr/lib
执行./make-Makefiles.bash生成makefile
make && make install
编译结果
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libx265.a
-- Installing: /usr/local/include/x265.h
-- Installing: /usr/local/include/x265_config.h
-- Installing: /usr/local/lib/libx265.so.191
-- Installing: /usr/local/lib/libx265.so
-- Installing: /usr/local/lib/pkgconfig/x265.pc
-- Installing: /usr/local/bin/x265
-- Set runtime path of "/usr/local/bin/x265" to ""
yum install autoconf automake libtool -y
执行./autogen.sh, 以生成configure文件:
./configure --enable-shared -prefix=/usr
make[1]: Entering directory `/data/cpp-project/ffmpeg-learn/ffmpeg-pkg/fdk-aac_202007/fdk-aac-master'
/usr/bin/mkdir -p '/usr/lib'
/bin/sh ./libtool --mode=install /usr/bin/install -c libfdk-aac.la '/usr/lib'
libtool: install: /usr/bin/install -c .libs/libfdk-aac.so.2.0.1 /usr/lib/libfdk-aac.so.2.0.1
libtool: install: (cd /usr/lib && { ln -s -f libfdk-aac.so.2.0.1 libfdk-aac.so.2 || { rm -f libfdk-aac.so.2 && ln -s libfdk-aac.so.2.0.1 libfdk-aac.so.2; }; })
libtool: install: (cd /usr/lib && { ln -s -f libfdk-aac.so.2.0.1 libfdk-aac.so || { rm -f libfdk-aac.so && ln -s libfdk-aac.so.2.0.1 libfdk-aac.so; }; })
libtool: install: /usr/bin/install -c .libs/libfdk-aac.lai /usr/lib/libfdk-aac.la
libtool: install: /usr/bin/install -c .libs/libfdk-aac.a /usr/lib/libfdk-aac.a
libtool: install: chmod 644 /usr/lib/libfdk-aac.a
libtool: install: ranlib /usr/lib/libfdk-aac.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/local/java/jdk1.8.0_191/bin:/usr/local/hadoop/hadoop-2.7.7/bin:/usr/local/hadoop/hadoop-2.7.7/sbin:/usr/local/zookeeper/zookeeper-3.4.10/bin:/usr/local/scala/scala-2.11.8/bin:/usr/local/kafka/kafka-2.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/go/bin:/usr/ffmpeg/bin:/root/bin:/sbin" ldconfig -n /usr/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/usr/bin/mkdir -p '/usr/include/fdk-aac'
/usr/bin/install -c -m 644 ./libSYS/include/machine_type.h ./libSYS/include/genericStds.h ./libSYS/include/FDK_audio.h ./libSYS/include/syslib_channelMapDescr.h ./libAACenc/include/aacenc_lib.h ./libAACdec/include/aacdecoder_lib.h '/usr/include/fdk-aac'
/usr/bin/mkdir -p '/usr/lib/pkgconfig'
/usr/bin/install -c -m 644 fdk-aac.pc '/usr/lib/pkgconfig'
make[1]: Leaving directory `/data/cpp-project/ffmpeg-learn/ffmpeg-pkg/fdk-aac_202007/fdk-aac-master'
下载pkg-config:wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.tar.g
解压:tar -zxvf pkg-config-0.29.tar.gz
cd 进入解压文件夹
运行配置文件进行系统配置 : ./configure --with-internal-glib
出现编译问题 在glibc中增加这个 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
编译 pkgconfig : make
安装包自检测 : make check
安装 :make install
[root@slave1 ffmpeg-4.4.2]# ./configure --enable-shared --prefix=/usr/ffmpeg --disable-programs --enable-ffplay --enable-ffmpeg --enable-ffprobe --enable-libx264 --enable-gpl --enable-libfdk-aac --enable-nonfree --enable-libx265
install prefix /usr/ffmpeg
source path .
C compiler gcc
C library glibc
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler nasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available yes
EBP available 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:
bzlib iconv libfdk_aac libx264 libx265 xlib zlib
External libraries providing hardware acceleration:
xvmc
Libraries:
avcodec avdevice avfilter avformat avutil postproc swresample swscale
Programs:
ffmpeg ffprobe
Enabled decoders:
aac alac dca h261 mp3 pcm_s24le_planar sbc vble
aac_fixed alias_pix dds h263 mp3adu pcm_s32be scpr vc1
aac_latm als derf_dpcm h263i mp3adufloat pcm_s32le screenpresso vc1image
aasc amrnb dfa h263p mp3float pcm_s32le_planar sdx2_dpcm vcr1
ac3 amrwb dirac h264 mp3on4 pcm_s64be sga vmdaudio
ac3_fixed amv dnxhd hap mp3on4float pcm_s64le sgi vmdvideo
acelp_kelvin anm dolby_e hca mpc7 pcm_s8 sgirle vmnc
adpcm_4xm ansi dpx hcom mpc8 pcm_s8_planar sheervideo vorbis
adpcm_adx ape dsd_lsbf hevc mpeg1video pcm_sga shorten vp3
adpcm_afc apng dsd_lsbf_planar hnm4_video mpeg2video pcm_u16be simbiosis_imx vp4
adpcm_agm aptx dsd_msbf hq_hqa mpeg4 pcm_u16le sipr vp5
adpcm_aica aptx_hd dsd_msbf_planar hqx mpegvideo pcm_u24be siren vp6
adpcm_argo arbc dsicinaudio huffyuv mpl2 pcm_u24le smackaud vp6a
adpcm_ct argo dsicinvideo hymt msa1 pcm_u32be smacker vp6f
adpcm_dtk ass dss_sp iac mscc pcm_u32le smc vp7
adpcm_ea asv1 dst idcin msmpeg4v1 pcm_u8 smvjpeg vp8
adpcm_ea_maxis_xa asv2 dvaudio idf msmpeg4v2 pcm_vidc snow vp9
adpcm_ea_r1 atrac1 dvbsub iff_ilbm msmpeg4v3 pcx sol_dpcm vplayer
adpcm_ea_r2 atrac3 dvdsub ilbc msp2 pfm sonic vqa
adpcm_ea_r3 atrac3al dvvideo imc msrle pgm sp5x wavpack
adpcm_ea_xas atrac3p dxa imm4 mss1 pgmyuv speedhq wcmv
adpcm_g722 atrac3pal dxtory imm5 mss2 pgssub srgc webp
adpcm_g726 atrac9 dxv indeo2 msvideo1 pgx srt webvtt
adpcm_g726le aura eac3 indeo3 mszh photocd ssa wmalossless
adpcm_ima_alp aura2 eacmv indeo4 mts2 pictor stl wmapro
adpcm_ima_amv av1 eamad indeo5 mv30 pixlet subrip wmav1
adpcm_ima_apc avrn eatgq interplay_acm mvc1 pjs subviewer wmav2
adpcm_ima_apm avrp eatgv interplay_dpcm mvc2 png subviewer1 wmavoice
adpcm_ima_cunning avs eatqi interplay_video mvdv ppm sunrast wmv1
adpcm_ima_dat4 avui eightbps ipu mvha prores svq1 wmv2
adpcm_ima_dk3 ayuv eightsvx_exp jacosub mwsc prosumer svq3 wmv3
adpcm_ima_dk4 bethsoftvid eightsvx_fib jpeg2000 mxpeg psd tak wmv3image
adpcm_ima_ea_eacs bfi escape124 jpegls nellymoser ptx targa wnv1
adpcm_ima_ea_sead bink escape130 jv notchlc qcelp targa_y216 wrapped_avframe
adpcm_ima_iss binkaudio_dct evrc kgv1 nuv qdm2 tdsc ws_snd1
adpcm_ima_moflex binkaudio_rdft exr kmvc on2avc qdmc text xan_dpcm
adpcm_ima_mtf bintext fastaudio lagarith opus qdraw theora xan_wc3
adpcm_ima_oki bitpacked ffv1 libfdk_aac paf_audio qpeg thp xan_wc4
adpcm_ima_qt bmp ffvhuff loco paf_video qtrle tiertexseqvideo xbin
adpcm_ima_rad bmv_audio ffwavesynth lscr pam r10k tiff xbm
adpcm_ima_smjpeg bmv_video fic m101 pbm r210 tmv xface
adpcm_ima_ssi brender_pix fits mace3 pcm_alaw ra_144 truehd xl
adpcm_ima_wav c93 flac mace6 pcm_bluray ra_288 truemotion1 xma1
adpcm_ima_ws cavs flashsv magicyuv pcm_dvd ralf truemotion2 xma2
adpcm_ms ccaption flashsv2 mdec pcm_f16le rasc truemotion2rt xpm
adpcm_mtaf cdgraphics flic metasound pcm_f24le rawvideo truespeech xsub
adpcm_psx cdtoons flv microdvd pcm_f32be realtext tscc xwd
adpcm_sbpro_2 cdxl fmvc mimic pcm_f32le rl2 tscc2 y41p
adpcm_sbpro_3 cfhd fourxm mjpeg pcm_f64be roq tta ylc
adpcm_sbpro_4 cinepak fraps mjpegb pcm_f64le roq_dpcm twinvq yop
adpcm_swf clearvideo frwu mlp pcm_lxf rpza txd yuv4
adpcm_thp cljr g2m mmvideo pcm_mulaw rscc ulti zero12v
adpcm_thp_le cllc g723_1 mobiclip pcm_s16be rv10 utvideo zerocodec
adpcm_vima comfortnoise g729 motionpixels pcm_s16be_planar rv20 v210 zlib
adpcm_xa cook gdv movtext pcm_s16le rv30 v210x zmbv
adpcm_yamaha cpia gif mp1 pcm_s16le_planar rv40 v308
adpcm_zork cri gremlin_dpcm mp1float pcm_s24be s302m v408
agm cscd gsm mp2 pcm_s24daud sami v410
aic cyuv gsm_ms mp2float pcm_s24le sanm vb
Enabled encoders:
a64multi apng ffv1 mlp pcm_s16be_planar pcx snow wavpack
a64multi5 aptx ffvhuff movtext pcm_s16le pfm sonic webvtt
aac aptx_hd fits mp2 pcm_s16le_planar pgm sonic_ls wmav1
ac3 ass flac mp2fixed pcm_s24be pgmyuv speedhq wmav2
ac3_fixed asv1 flashsv mpeg1video pcm_s24daud png srt wmv1
adpcm_adx asv2 flashsv2 mpeg2video pcm_s24le ppm ssa wmv2
adpcm_argo avrp flv mpeg4 pcm_s24le_planar prores subrip wrapped_avframe
adpcm_g722 avui g723_1 msmpeg4v2 pcm_s32be prores_aw sunrast xbm
adpcm_g726 ayuv gif msmpeg4v3 pcm_s32le prores_ks svq1 xface
adpcm_g726le bmp h261 msvideo1 pcm_s32le_planar qtrle targa xsub
adpcm_ima_alp cfhd h263 nellymoser pcm_s64be r10k text xwd
adpcm_ima_amv cinepak h263p opus pcm_s64le r210 tiff y41p
adpcm_ima_apm cljr huffyuv pam pcm_s8 ra_144 truehd yuv4
adpcm_ima_qt comfortnoise jpeg2000 pbm pcm_s8_planar rawvideo tta zlib
adpcm_ima_ssi dca jpegls pcm_alaw pcm_u16be roq ttml zmbv
adpcm_ima_wav dnxhd libfdk_aac pcm_dvd pcm_u16le roq_dpcm utvideo
adpcm_ms dpx libx264 pcm_f32be pcm_u24be rpza v210
adpcm_swf dvbsub libx264rgb pcm_f32le pcm_u24le rv10 v308
adpcm_yamaha dvdsub libx265 pcm_f64be pcm_u32be rv20 v408
alac dvvideo ljpeg pcm_f64le pcm_u32le s302m v410
alias_pix eac3 magicyuv pcm_mulaw pcm_u8 sbc vc2
amv exr mjpeg pcm_s16be pcm_vidc sgi vorbis
Enabled hwaccels:
mpeg1_xvmc mpeg2_xvmc
Enabled parsers:
aac bmp dolby_e g723_1 hevc mpegvideo sipr webp
aac_latm cavsvideo dpx g729 ipu opus tak xbm
ac3 cook dvaudio gif jpeg2000 png vc1 xma
adx cri dvbsub gsm mjpeg pnm vorbis
av1 dca dvd_nav h261 mlp rv30 vp3
avs2 dirac dvdsub h263 mpeg4video rv40 vp8
avs3 dnxhd flac h264 mpegaudio sbc vp9
Enabled demuxers:
aa bfi fits image_gif_pipe lvf nut rsd tmv
aac bfstm flac image_j2k_pipe lxf nuv rso truehd
aax bink flic image_jpeg_pipe m4v obu rtp tta
ac3 binka flv image_jpegls_pipe matroska ogg rtsp tty
ace bintext fourxm image_pam_pipe mca oma s337m txd
acm bit frm image_pbm_pipe mcc paf sami ty
act bmv fsb image_pcx_pipe mgsts pcm_alaw sap v210
adf boa fwse image_pgm_pipe microdvd pcm_f32be sbc v210x
adp brstm g722 image_pgmyuv_pipe mjpeg pcm_f32le sbg vag
ads c93 g723_1 image_pgx_pipe mjpeg_2000 pcm_f64be scc vc1
adx caf g726 image_photocd_pipe mlp pcm_f64le sdp vc1t
aea cavsvideo g726le image_pictor_pipe mlv pcm_mulaw sdr2 vividas
afc cdg g729 image_png_pipe mm pcm_s16be sds vivo
aiff cdxl gdv image_ppm_pipe mmf pcm_s16le sdx vmd
aix cine genh image_psd_pipe mods pcm_s24be segafilm vobsub
alp codec2 gif image_qdraw_pipe moflex pcm_s24le ser voc
amr codec2raw gsm image_sgi_pipe mov pcm_s32be sga vpk
amrnb concat gxf image_sunrast_pipe mp3 pcm_s32le shorten vplayer
amrwb data h261 image_svg_pipe mpc pcm_s8 siff vqf
anm daud h263 image_tiff_pipe mpc8 pcm_u16be simbiosis_imx w64
apc dcstr h264 image_webp_pipe mpegps pcm_u16le sln wav
ape derf hca image_xbm_pipe mpegts pcm_u24be smacker wc3
apm dfa hcom image_xpm_pipe mpegtsraw pcm_u24le smjpeg webm_dash_manifest
apng dhav hevc image_xwd_pipe mpegvideo pcm_u32be smush webvtt
aptx dirac hls ingenient mpjpeg pcm_u32le sol wsaud
aptx_hd dnxhd hnm ipmovie mpl2 pcm_u8 sox wsd
aqtitle dsf ico ipu mpsub pcm_vidc spdif wsvqa
argo_asf dsicin idcin ircam msf pjs srt wtv
argo_brp dss idf iss msnwc_tcp pmp stl wv
asf dts iff iv8 msp pp_bnk str wve
asf_o dtshd ifv ivf mtaf pva subviewer xa
ass dv ilbc ivr mtv pvf subviewer1 xbin
ast dvbsub image2 jacosub musx qcp sup xmv
au dvbtxt image2_alias_pix jv mv r3d svag xvag
av1 dxa image2_brender_pix kux mvi rawvideo svs xwma
avi ea image2pipe kvag mxf realtext swf yop
avr ea_cdata image_bmp_pipe live_flv mxg redspark tak yuv4mpegpipe
avs eac3 image_cri_pipe lmlm4 nc rl2 tedcaptions
avs2 epaf image_dds_pipe loas nistsphere rm thp
avs3 ffmetadata image_dpx_pipe lrc nsp roq threedostr
bethsoftvid filmstrip image_exr_pipe luodat nsv rpl tiertexseq
Enabled muxers:
a64 caf framehash ismv mpeg2dvd pcm_s16be rtsp ttml
ac3 cavsvideo framemd5 ivf mpeg2svcd pcm_s16le sap uncodedframecrc
adts codec2 g722 jacosub mpeg2video pcm_s24be sbc vc1
adx codec2raw g723_1 kvag mpeg2vob pcm_s24le scc vc1t
aiff crc g726 latm mpegts pcm_s32be segafilm voc
alp dash g726le lrc mpjpeg pcm_s32le segment w64
amr data gif m4v mxf pcm_s8 singlejpeg wav
amv daud gsm matroska mxf_d10 pcm_u16be smjpeg webm
apm dirac gxf matroska_audio mxf_opatom pcm_u16le smoothstreaming webm_chunk
apng dnxhd h261 md5 null pcm_u24be sox webm_dash_manifest
aptx dts h263 microdvd nut pcm_u24le spdif webp
aptx_hd dv h264 mjpeg oga pcm_u32be spx webvtt
argo_asf eac3 hash mkvtimestamp_v2 ogg pcm_u32le srt wtv
asf f4v hds mlp ogv pcm_u8 stream_segment wv
asf_stream ffmetadata hevc mmf oma pcm_vidc streamhash yuv4mpegpipe
ass fifo hls mov opus psp sup
ast fifo_test ico mp2 pcm_alaw rawvideo swf
au filmstrip ilbc mp3 pcm_f32be rm tee
avi fits image2 mp4 pcm_f32le roq tg2
avm2 flac image2pipe mpeg1system pcm_f64be rso tgp
avs2 flv ipod mpeg1vcd pcm_f64le rtp truehd
bit framecrc ircam mpeg1video pcm_mulaw rtp_mpegts tta
Enabled protocols:
async data gopher icecast pipe rtp tee
cache ffrtmphttp hls md5 prompeg srtp udp
concat file http mmsh rtmp subfile udplite
crypto ftp httpproxy mmst rtmpt tcp unix
Enabled filters:
abench anullsink chorus doubleweave highshelf movie scdet surround
abitscope anullsrc chromahold drawbox hilbert mpdecimate scroll swaprect
acompressor apad chromakey drawgraph histeq mptestsrc select swapuv
acontrast aperms chromanr drawgrid histogram msad selectivecolor tblend
acopy aphasemeter chromashift drmeter hqdn3d negate sendcmd telecine
acrossfade aphaser ciescope dynaudnorm hqx nlmeans separatefields testsrc
acrossover aphaseshift codecview earwax hstack nnedi setdar testsrc2
acrusher apulsator color ebur128 hue noformat setfield thistogram
acue arealtime colorbalance edgedetect hwdownload noise setparams threshold
addroi aresample colorchannelmixer elbg hwmap normalize setpts thumbnail
adeclick areverse colorcontrast entropy hwupload null setrange tile
adeclip arnndn colorcorrect epx hysteresis nullsink setsar tinterlace
adelay aselect colorhold eq identity nullsrc settb tlut2
adenorm asendcmd colorize equalizer idet oscilloscope shear tmedian
aderivative asetnsamples colorkey erosion il overlay showcqt tmidequalizer
adrawgraph asetpts colorlevels estdif inflate owdenoise showfreqs tmix
aecho asetrate colormatrix exposure interlace pad showinfo tonemap
aemphasis asettb colorspace extractplanes interleave pal100bars showpalette tpad
aeval ashowinfo colortemperature extrastereo join pal75bars showspatial transpose
aevalsrc asidedata compand fade kerndeint palettegen showspectrum treble
aexciter asoftclip compensationdelay fftdnoiz kirsch paletteuse showspectrumpic tremolo
afade asplit concat fftfilt lagfun pan showvolume trim
afftdn astats convolution field lenscorrection perms showwaves unpremultiply
afftfilt astreamselect convolve fieldhint life perspective showwavespic unsharp
afifo asubboost copy fieldmatch limiter phase shuffleframes untile
afir asubcut cover_rect fieldorder loop photosensitivity shufflepixels uspp
afirsrc asupercut crop fifo loudnorm pixdesctest shuffleplanes v360
aformat asuperpass cropdetect fillborders lowpass pixscope sidechaincompress vaguedenoiser
afreqshift asuperstop crossfeed find_rect lowshelf pp sidechaingate vectorscope
agate atadenoise crystalizer firequalizer lumakey pp7 sidedata vflip
agraphmonitor atempo cue flanger lut premultiply sierpinski vfrdet
ahistogram atrim curves floodfill lut1d prewitt signalstats vibrance
aiir avectorscope datascope format lut2 pseudocolor signature vibrato
aintegral avgblur dblur fps lut3d psnr silencedetect vif
ainterleave axcorrelate dcshift framepack lutrgb pullup silenceremove vignette
alimiter bandpass dctdnoiz framerate lutyuv qp sinc vmafmotion
allpass bandreject deband framestep mandelbrot random sine volume
allrgb bass deblock freezedetect maskedclamp readeia608 smartblur volumedetect
allyuv bbox decimate freezeframes maskedmax readvitc smptebars vstack
aloop bench deconvolve fspp maskedmerge realtime smptehdbars w3fdif
alphaextract bilateral dedot gblur maskedmin remap sobel waveform
alphamerge biquad deesser geq maskedthreshold removegrain spectrumsynth weave
amerge bitplanenoise deflate gradfun maskfun removelogo speechnorm xbr
ametadata blackdetect deflicker gradients mcdeint repeatfields split xfade
amix blackframe dejudder graphmonitor mcompand replaygain spp xmedian
amovie blend delogo greyedge median reverse sr xstack
amplify bm3d derain haas mergeplanes rgbashift ssim yadif
amultiply boxblur deshake haldclut mestimate rgbtestsrc stereo3d yaepblur
anequalizer bwdif despill haldclutsrc metadata roberts stereotools yuvtestsrc
anlmdn cas detelecine hdcd midequalizer rotate stereowiden zoompan
anlms cellauto dilation headphone minterpolate sab streamselect
anoisesrc channelmap displace hflip mix scale super2xsai
anull channelsplit dnn_processing highpass monochrome scale2ref superequalizer
Enabled bsfs:
aac_adtstoasc dca_core h264_metadata hevc_mp4toannexb mp3_header_decompress opus_metadata text2movsub vp9_superframe
av1_frame_merge dump_extradata h264_mp4toannexb imx_dump_header mpeg2_metadata pcm_rechunk trace_headers vp9_superframe_split
av1_frame_split eac3_core h264_redundant_pps mjpeg2jpeg mpeg4_unpack_bframes prores_metadata truehd_core
av1_metadata extract_extradata hapqa_extract mjpega_dump_header noise remove_extradata vp9_metadata
chomp filter_units hevc_metadata mov2textsub null setts vp9_raw_reorder
Enabled indevs:
fbdev lavfi oss v4l2
Enabled outdevs:
fbdev oss v4l2 xv
License: nonfree and unredistributable
调试
gdb ffmpeg_g
set args **
b main
r
设置探测的大小和时间
ffmpeg -probesize 50M -analyzeduration 100M -re -stream_loop -1 -i 1.mp4 -c copy -f rtsp rtsp://127.0.0.1:8554/stream -loglevel trace
ffmpeg播放之前会进行探测, -probesize 探测的buffer大小 -analyzeduration 探测的时时间