系统信息
Debian 11
Nvidia GTX 1650
语言环境 中文
下载FFmpeg源码 终端执行
git clone https://git.ffmpeg.org/ffmpeg.git
前往Cuda ToolKit Download
选择Linux X86_64 Debian 11 deb(local)
逐行复制下方生成内容并在终端执行
如果之前使用.run
方式安装的Cuda会提示与.deb
安装方式冲突,选择是
,之后会提示X server
可能崩溃,选择是
重启
前往FFmpeg/nv-codec-headers 下载ZIP
压缩包 或使用终端执行
git clone https://github.com/FFmpeg/nv-codec-headers.git
切换到库目录并安装
cd nv-codec-headers make sudo make install
构建 FFmpeg
查看发行版包管理器中的FFmpeg编译选项
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg'
这里我们要configuration
中内容
切换至FFmpeg目录
配置FFmpeg编译选项 终端执行,其实建议存到.sh
文件里,方便编辑,因为后续大概率出问题
./configure --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-ffnvcodec --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
需要发行版中的configuration
和nvidia给出的编译选项
成功后会显示启用的选项
install prefix /usr source path . C compiler gcc C library glibc ARCH x86 (generic) version string suffix 0+deb11u1 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 AVX-512ICL 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 no 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 yes makeinfo supports HTML yes xmllint enabled yes External libraries: alsa libgsm libvpx bzlib libiec61883 libwebp chromaprint libjack libx264 frei0r libmp3lame libx265 gnutls libmysofa libxcb iconv libopenjpeg libxcb_shape ladspa libopenmpt libxcb_shm libaom libopus libxcb_xfixes libass libpulse libxml2 libbluray librabbitmq libxvid libbs2b librsvg libzmq libcaca librubberband libzvbi libcdio libshine lv2 libcodec2 libsnappy lzma libdav1d libsoxr openal libdc1394 libspeex opengl libdrm libsrt pocketsphinx libflite libssh sdl2 libfontconfig libtheora sndio libfreetype libtwolame xlib libfribidi libvidstab zlib libgme libvorbis External libraries providing hardware acceleration: cuda libnpp opencl cuvid nvdec v4l2_m2m ffnvcodec nvenc vaapi libmfx omx vdpau Libraries: avcodec avformat swresample avdevice avutil swscale avfilter postproc Programs: ffmpeg ffplay ffprobe Enabled decoders: aac frwu pcx aac_fixed ftr pdv aac_latm g2m pfm aasc g723_1 pgm ac3 g729 pgmyuv ac3_fixed gdv pgssub acelp_kelvin gem pgx adpcm_4xm gif phm adpcm_adx gremlin_dpcm photocd adpcm_afc gsm pictor adpcm_agm gsm_ms pixlet adpcm_aica h261 pjs adpcm_argo h263 png adpcm_ct h263_v4l2m2m ppm adpcm_dtk h263i prores adpcm_ea h263p prosumer adpcm_ea_maxis_xa h264 psd adpcm_ea_r1 h264_cuvid ptx adpcm_ea_r2 h264_qsv qcelp adpcm_ea_r3 h264_v4l2m2m qdm2 adpcm_ea_xas hap qdmc adpcm_g722 hca qdraw adpcm_g726 hcom qoi adpcm_g726le hdr qpeg adpcm_ima_acorn hevc qtrle adpcm_ima_alp hevc_cuvid r10k adpcm_ima_amv hevc_qsv r210 adpcm_ima_apc hevc_v4l2m2m ra_144 adpcm_ima_apm hnm4_video ra_288 adpcm_ima_cunning hq_hqa ralf adpcm_ima_dat4 hqx rasc adpcm_ima_dk3 huffyuv rawvideo adpcm_ima_dk4 hymt realtext adpcm_ima_ea_eacs iac rka adpcm_ima_ea_sead idcin rl2 adpcm_ima_iss idf roq adpcm_ima_moflex iff_ilbm roq_dpcm adpcm_ima_mtf ilbc rpza adpcm_ima_oki imc rscc adpcm_ima_qt imm4 rv10 adpcm_ima_rad imm5 rv20 adpcm_ima_smjpeg indeo2 rv30 adpcm_ima_ssi indeo3 rv40 adpcm_ima_wav indeo4 s302m adpcm_ima_ws indeo5 sami adpcm_ms interplay_acm sanm adpcm_mtaf interplay_dpcm sbc adpcm_psx interplay_video scpr adpcm_sbpro_2 ipu screenpresso adpcm_sbpro_3 jacosub sdx2_dpcm adpcm_sbpro_4 jpeg2000 sga adpcm_swf jpegls sgi adpcm_thp jv sgirle adpcm_thp_le kgv1 sheervideo adpcm_vima kmvc shorten adpcm_xa lagarith simbiosis_imx adpcm_xmd libaom_av1 sipr adpcm_yamaha libcodec2 siren adpcm_zork libdav1d smackaud agm libgsm smacker aic libgsm_ms smc alac libopus smvjpeg alias_pix librsvg snow als libspeex sol_dpcm amrnb libvorbis sonic amrwb libvpx_vp8 sp5x amv libvpx_vp9 speedhq anm libzvbi_teletext speex ansi loco srgc anull lscr srt apac m101 ssa ape mace3 stl apng mace6 subrip aptx magicyuv subviewer aptx_hd mdec subviewer1 arbc media100 sunrast argo metasound svq1 ass microdvd svq3 asv1 mimic tak asv2 misc4 targa atrac1 mjpeg targa_y216 atrac3 mjpeg_cuvid tdsc atrac3al mjpeg_qsv text atrac3p mjpegb theora atrac3pal mlp thp atrac9 mmvideo tiertexseqvideo aura mobiclip tiff aura2 motionpixels tmv av1 movtext truehd av1_cuvid mp1 truemotion1 av1_qsv mp1float truemotion2 avrn mp2 truemotion2rt avrp mp2float truespeech avs mp3 tscc avui mp3adu tscc2 ayuv mp3adufloat tta bethsoftvid mp3float twinvq bfi mp3on4 txd bink mp3on4float ulti binkaudio_dct mpc7 utvideo binkaudio_rdft mpc8 v210 bintext mpeg1_cuvid v210x bitpacked mpeg1_v4l2m2m v308 bmp mpeg1video v408 bmv_audio mpeg2_cuvid v410 bmv_video mpeg2_qsv vb bonk mpeg2_v4l2m2m vble brender_pix mpeg2video vbn c93 mpeg4 vc1 cavs mpeg4_cuvid vc1_cuvid cbd2_dpcm mpeg4_v4l2m2m vc1_qsv ccaption mpegvideo vc1_v4l2m2m cdgraphics mpl2 vc1image cdtoons msa1 vcr1 cdxl mscc vmdaudio cfhd msmpeg4v1 vmdvideo cinepak msmpeg4v2 vmnc clearvideo msmpeg4v3 vnull cljr msnsiren vorbis cllc msp2 vp3 comfortnoise msrle vp4 cook mss1 vp5 cpia mss2 vp6 cri msvideo1 vp6a cscd mszh vp6f cyuv mts2 vp7 dca mv30 vp8 dds mvc1 vp8_cuvid derf_dpcm mvc2 vp8_qsv dfa mvdv vp8_v4l2m2m dfpwm mvha vp9 dirac mwsc vp9_cuvid dnxhd mxpeg vp9_qsv dolby_e nellymoser vp9_v4l2m2m dpx notchlc vplayer dsd_lsbf nuv vqa dsd_lsbf_planar on2avc vqc dsd_msbf opus wady_dpcm dsd_msbf_planar paf_audio wavarc dsicinaudio paf_video wavpack dsicinvideo pam wbmp dss_sp pbm wcmv dst pcm_alaw webp dvaudio pcm_bluray webvtt dvbsub pcm_dvd wmalossless dvdsub pcm_f16le wmapro dvvideo pcm_f24le wmav1 dxa pcm_f32be wmav2 dxtory pcm_f32le wmavoice dxv pcm_f64be wmv1 eac3 pcm_f64le wmv2 eacmv pcm_lxf wmv3 eamad pcm_mulaw wmv3image eatgq pcm_s16be wnv1 eatgv pcm_s16be_planar wrapped_avframe eatqi pcm_s16le ws_snd1 eightbps pcm_s16le_planar xan_dpcm eightsvx_exp pcm_s24be xan_wc3 eightsvx_fib pcm_s24daud xan_wc4 escape124 pcm_s24le xbin escape130 pcm_s24le_planar xbm evrc pcm_s32be xface exr pcm_s32le xl fastaudio pcm_s32le_planar xma1 ffv1 pcm_s64be xma2 ffvhuff pcm_s64le xpm ffwavesynth pcm_s8 xsub fic pcm_s8_planar xwd fits pcm_sga y41p flac pcm_u16be ylc flashsv pcm_u16le yop flashsv2 pcm_u24be yuv4 flic pcm_u24le zero12v flv pcm_u32be zerocodec fmvc pcm_u32le zlib fourxm pcm_u8 zmbv fraps pcm_vidc Enabled encoders: a64multi huffyuv pcm_u32be a64multi5 jpeg2000 pcm_u32le aac jpegls pcm_u8 ac3 libaom_av1 pcm_vidc ac3_fixed libcodec2 pcx adpcm_adx libgsm pfm adpcm_argo libgsm_ms pgm adpcm_g722 libmp3lame pgmyuv adpcm_g726 libopenjpeg phm adpcm_g726le libopus png adpcm_ima_alp libshine ppm adpcm_ima_amv libspeex prores adpcm_ima_apm libtheora prores_aw adpcm_ima_qt libtwolame prores_ks adpcm_ima_ssi libvorbis qoi adpcm_ima_wav libvpx_vp8 qtrle adpcm_ima_ws libvpx_vp9 r10k adpcm_ms libwebp r210 adpcm_swf libwebp_anim ra_144 adpcm_yamaha libx264 rawvideo alac libx264rgb roq alias_pix libx265 roq_dpcm amv libxvid rpza anull ljpeg rv10 apng magicyuv rv20 aptx mjpeg s302m aptx_hd mjpeg_qsv sbc ass mjpeg_vaapi sgi asv1 mlp smc asv2 movtext snow av1_nvenc mp2 sonic avrp mp2fixed sonic_ls avui mpeg1video speedhq ayuv mpeg2_qsv srt bitpacked mpeg2_vaapi ssa bmp mpeg2video subrip cfhd mpeg4 sunrast cinepak mpeg4_omx svq1 cljr mpeg4_v4l2m2m targa comfortnoise msmpeg4v2 text dca msmpeg4v3 tiff dfpwm msvideo1 truehd dnxhd nellymoser tta dpx opus ttml dvbsub pam utvideo dvdsub pbm v210 dvvideo pcm_alaw v308 eac3 pcm_bluray v408 exr pcm_dvd v410 ffv1 pcm_f32be vbn ffvhuff pcm_f32le vc2 fits pcm_f64be vnull flac pcm_f64le vorbis flashsv pcm_mulaw vp8_v4l2m2m flashsv2 pcm_s16be vp8_vaapi flv pcm_s16be_planar vp9_qsv g723_1 pcm_s16le vp9_vaapi gif pcm_s16le_planar wavpack h261 pcm_s24be wbmp h263 pcm_s24daud webvtt h263_v4l2m2m pcm_s24le wmav1 h263p pcm_s24le_planar wmav2 h264_nvenc pcm_s32be wmv1 h264_omx pcm_s32le wmv2 h264_qsv pcm_s32le_planar wrapped_avframe h264_v4l2m2m pcm_s64be xbm h264_vaapi pcm_s64le xface hap pcm_s8 xsub hdr pcm_s8_planar xwd hevc_nvenc pcm_u16be y41p hevc_qsv pcm_u16le yuv4 hevc_v4l2m2m pcm_u24be zlib hevc_vaapi pcm_u24le zmbv Enabled hwaccels: av1_nvdec mjpeg_vaapi vc1_vaapi av1_vaapi mpeg1_nvdec vc1_vdpau h263_vaapi mpeg1_vdpau vp8_nvdec h264_nvdec mpeg2_nvdec vp8_vaapi h264_vaapi mpeg2_vaapi vp9_nvdec h264_vdpau mpeg2_vdpau vp9_vaapi hevc_nvdec mpeg4_nvdec vp9_vdpau hevc_vaapi mpeg4_vaapi wmv3_nvdec hevc_vdpau mpeg4_vdpau wmv3_vaapi mjpeg_nvdec vc1_nvdec wmv3_vdpau Enabled parsers: aac dvdsub opus aac_latm flac png ac3 ftr pnm adx g723_1 qoi amr g729 rv30 av1 gif rv40 avs2 gsm sbc avs3 h261 sipr bmp h263 tak cavsvideo h264 vc1 cook hdr vorbis cri hevc vp3 dca ipu vp8 dirac jpeg2000 vp9 dnxhd misc4 webp dolby_e mjpeg xbm dpx mlp xma dvaudio mpeg4video xwd dvbsub mpegaudio dvd_nav mpegvideo Enabled demuxers: aa idf pcm_f64le aac iff pcm_mulaw aax ifv pcm_s16be ac3 ilbc pcm_s16le ace image2 pcm_s24be acm image2_alias_pix pcm_s24le act image2_brender_pix pcm_s32be adf image2pipe pcm_s32le adp image_bmp_pipe pcm_s8 ads image_cri_pipe pcm_u16be adx image_dds_pipe pcm_u16le aea image_dpx_pipe pcm_u24be afc image_exr_pipe pcm_u24le aiff image_gem_pipe pcm_u32be aix image_gif_pipe pcm_u32le alp image_hdr_pipe pcm_u8 amr image_j2k_pipe pcm_vidc amrnb image_jpeg_pipe pdv amrwb image_jpegls_pipe pjs anm image_jpegxl_pipe pmp apac image_pam_pipe pp_bnk apc image_pbm_pipe pva ape image_pcx_pipe pvf apm image_pfm_pipe qcp apng image_pgm_pipe r3d aptx image_pgmyuv_pipe rawvideo aptx_hd image_pgx_pipe realtext aqtitle image_phm_pipe redspark argo_asf image_photocd_pipe rka argo_brp image_pictor_pipe rl2 argo_cvg image_png_pipe rm asf image_ppm_pipe roq asf_o image_psd_pipe rpl ass image_qdraw_pipe rsd ast image_qoi_pipe rso au image_sgi_pipe rtp av1 image_sunrast_pipe rtsp avi image_svg_pipe s337m avr image_tiff_pipe sami avs image_vbn_pipe sap avs2 image_webp_pipe sbc avs3 image_xbm_pipe sbg bethsoftvid image_xpm_pipe scc bfi image_xwd_pipe scd bfstm imf sdns bink ingenient sdp binka ipmovie sdr2 bintext ipu sds bit ircam sdx bitpacked iss segafilm bmv iv8 ser boa ivf sga bonk ivr shorten brstm jacosub siff c93 jv simbiosis_imx caf kux sln cavsvideo kvag smacker cdg laf smjpeg cdxl libgme smush cine libopenmpt sol codec2 live_flv sox codec2raw lmlm4 spdif concat loas srt dash lrc stl data luodat str daud lvf subviewer dcstr lxf subviewer1 derf m4v sup dfa matroska svag dfpwm mca svs dhav mcc swf dirac mgsts tak dnxhd microdvd tedcaptions dsf mjpeg thp dsicin mjpeg_2000 threedostr dss mlp tiertexseq dts mlv tmv dtshd mm truehd dv mmf tta dvbsub mods tty dvbtxt moflex txd dxa mov ty ea mp3 v210 ea_cdata mpc v210x eac3 mpc8 vag epaf mpegps vc1 ffmetadata mpegts vc1t filmstrip mpegtsraw vividas fits mpegvideo vivo flac mpjpeg vmd flic mpl2 vobsub flv mpsub voc fourxm msf vpk frm msnwc_tcp vplayer fsb msp vqf fwse mtaf w64 g722 mtv wady g723_1 musx wav g726 mv wavarc g726le mvi wc3 g729 mxf webm_dash_manifest gdv mxg webvtt genh nc wsaud gif nistsphere wsd gsm nsp wsvqa gxf nsv wtv h261 nut wv h263 nuv wve h264 obu xa hca ogg xbin hcom oma xmd hevc paf xmv hls pcm_alaw xvag hnm pcm_f32be xwma ico pcm_f32le yop idcin pcm_f64be yuv4mpegpipe Enabled muxers: a64 h263 pcm_s24be ac3 h264 pcm_s24le adts hash pcm_s32be adx hds pcm_s32le aiff hevc pcm_s8 alp hls pcm_u16be amr ico pcm_u16le amv ilbc pcm_u24be apm image2 pcm_u24le apng image2pipe pcm_u32be aptx ipod pcm_u32le aptx_hd ircam pcm_u8 argo_asf ismv pcm_vidc argo_cvg ivf psp asf jacosub rawvideo asf_stream kvag rm ass latm roq ast lrc rso au m4v rtp avi matroska rtp_mpegts avif matroska_audio rtsp avm2 md5 sap avs2 microdvd sbc avs3 mjpeg scc bit mkvtimestamp_v2 segafilm caf mlp segment cavsvideo mmf smjpeg chromaprint mov smoothstreaming codec2 mp2 sox codec2raw mp3 spdif crc mp4 spx dash mpeg1system srt data mpeg1vcd stream_segment daud mpeg1video streamhash dfpwm mpeg2dvd sup dirac mpeg2svcd swf dnxhd mpeg2video tee dts mpeg2vob tg2 dv mpegts tgp eac3 mpjpeg truehd f4v mxf tta ffmetadata mxf_d10 ttml fifo mxf_opatom uncodedframecrc fifo_test null vc1 filmstrip nut vc1t fits obu voc flac oga w64 flv ogg wav framecrc ogv webm framehash oma webm_chunk framemd5 opus webm_dash_manifest g722 pcm_alaw webp g723_1 pcm_f32be webvtt g726 pcm_f32le wsaud g726le pcm_f64be wtv gif pcm_f64le wv gsm pcm_mulaw yuv4mpegpipe gxf pcm_s16be h261 pcm_s16le Enabled protocols: async httpproxy rtmps bluray https rtmpt cache icecast rtmpts concat ipfs_gateway rtp concatf ipns_gateway sctp crypto libamqp srtp data libsrt subfile fd libssh tcp ffrtmphttp libzmq tee file md5 tls ftp mmsh udp gopher mmst udplite gophers pipe unix hls prompeg http rtmp Enabled filters: a3dscope decimate perms abench deconvolve perspective abitscope dedot phase acompressor deesser photosensitivity acontrast deflate pixdesctest acopy deflicker pixelize acrossfade deinterlace_qsv pixscope acrossover deinterlace_vaapi pp acrusher dejudder pp7 acue delogo premultiply addroi denoise_vaapi prewitt adeclick derain prewitt_opencl adeclip deshake procamp_vaapi adecorrelate deshake_opencl program_opencl adelay despill pseudocolor adenorm detelecine psnr aderivative dialoguenhance pullup adrawgraph dilation qp adrc dilation_opencl random adynamicequalizer displace readeia608 adynamicsmooth dnn_classify readvitc aecho dnn_detect realtime aemphasis dnn_processing remap aeval doubleweave remap_opencl aevalsrc drawbox removegrain aexciter drawgraph removelogo afade drawgrid repeatfields afdelaysrc drawtext replaygain afftdn drmeter reverse afftfilt dynaudnorm rgbashift afifo earwax rgbtestsrc afir ebur128 roberts afireqsrc edgedetect roberts_opencl afirsrc elbg rotate aformat entropy rubberband afreqshift epx sab afwtdn eq scale agate equalizer scale2ref agraphmonitor erosion scale2ref_npp ahistogram erosion_opencl scale_npp aiir estdif scale_qsv aintegral exposure scale_vaapi ainterleave extractplanes scdet alatency extrastereo scharr alimiter fade scroll allpass feedback segment allrgb fftdnoiz select allyuv fftfilt selectivecolor aloop field sendcmd alphaextract fieldhint separatefields alphamerge fieldmatch setdar amerge fieldorder setfield ametadata fifo setparams amix fillborders setpts amovie find_rect setrange amplify firequalizer setsar amultiply flanger settb anequalizer flite sharpen_npp anlmdn floodfill sharpness_vaapi anlmf format shear anlms fps showcqt anoisesrc framepack showcwt anull framerate showfreqs anullsink framestep showinfo anullsrc freezedetect showpalette apad freezeframes showspatial aperms frei0r showspectrum aphasemeter frei0r_src showspectrumpic aphaser fspp showvolume aphaseshift gblur showwaves apsyclip geq showwavespic apulsator gradfun shuffleframes arealtime gradients shufflepixels aresample graphmonitor shuffleplanes areverse grayworld sidechaincompress arls greyedge sidechaingate arnndn guided sidedata asdr haas sierpinski asegment haldclut signalstats aselect haldclutsrc signature asendcmd hdcd silencedetect asetnsamples headphone silenceremove asetpts hflip sinc asetrate highpass sine asettb highshelf siti ashowinfo hilbert smartblur asidedata histeq smptebars asoftclip histogram smptehdbars aspectralstats hqdn3d sobel asplit hqx sobel_opencl asr hstack sofalizer ass hstack_qsv spectrumsynth astats hstack_vaapi speechnorm astreamselect hsvhold split asubboost hsvkey spp asubcut hue sr asupercut huesaturation ssim asuperpass hwdownload ssim360 asuperstop hwmap stereo3d atadenoise hwupload stereotools atempo hwupload_cuda stereowiden atilt hysteresis streamselect atrim identity subtitles avectorscope idet super2xsai avgblur il superequalizer avgblur_opencl inflate surround avsynctest interlace swaprect axcorrelate interleave swapuv azmq join tblend backgroundkey kerndeint telecine bandpass kirsch testsrc bandreject ladspa testsrc2 bass lagfun thistogram bbox latency threshold bench lenscorrection thumbnail bilateral life tile biquad limitdiff tiltshelf bitplanenoise limiter tinterlace blackdetect loop tlut2 blackframe loudnorm tmedian blend lowpass tmidequalizer blockdetect lowshelf tmix blurdetect lumakey tonemap bm3d lut tonemap_opencl boxblur lut1d tonemap_vaapi boxblur_opencl lut2 tpad bs2b lut3d transpose bwdif lutrgb transpose_npp cas lutyuv transpose_opencl ccrepack lv2 transpose_vaapi cellauto mandelbrot treble channelmap maskedclamp tremolo channelsplit maskedmax trim chorus maskedmerge unpremultiply chromahold maskedmin unsharp chromakey maskedthreshold unsharp_opencl chromanr maskfun untile chromashift mcdeint uspp ciescope mcompand v360 codecview median vaguedenoiser color mergeplanes varblur colorbalance mestimate vectorscope colorchannelmixer metadata vflip colorchart midequalizer vfrdet colorcontrast minterpolate vibrance colorcorrect mix vibrato colorhold monochrome vidstabdetect colorize morpho vidstabtransform colorkey movie vif colorkey_opencl mpdecimate vignette colorlevels mptestsrc virtualbass colormap msad vmafmotion colormatrix multiply volume colorspace negate volumedetect colorspectrum nlmeans vpp_qsv colortemperature nlmeans_opencl vstack compand nnedi vstack_qsv compensationdelay noformat vstack_vaapi concat noise w3fdif convolution normalize waveform convolution_opencl null weave convolve nullsink xbr copy nullsrc xcorrelate corr openclsrc xfade cover_rect oscilloscope xfade_opencl crop overlay xmedian cropdetect overlay_opencl xstack crossfeed overlay_qsv xstack_qsv crystalizer overlay_vaapi xstack_vaapi cue owdenoise yadif curves pad yaepblur datascope pad_opencl yuvtestsrc dblur pal100bars zmq dcshift pal75bars zoneplate dctdnoiz palettegen zoompan deband paletteuse deblock pan Enabled bsfs: aac_adtstoasc h264_redundant_pps opus_metadata av1_frame_merge hapqa_extract pcm_rechunk av1_frame_split hevc_metadata pgs_frame_merge av1_metadata hevc_mp4toannexb prores_metadata chomp imx_dump_header remove_extradata dca_core media100_to_mjpegb setts dts2pts mjpeg2jpeg text2movsub dump_extradata mjpega_dump_header trace_headers dv_error_marker mov2textsub truehd_core eac3_core mp3_header_decompress vp9_metadata extract_extradata mpeg2_metadata vp9_raw_reorder filter_units mpeg4_unpack_bframes vp9_superframe h264_metadata noise vp9_superframe_split h264_mp4toannexb null Enabled indevs: alsa lavfi pulse fbdev libcdio sndio iec61883 libdc1394 v4l2 jack openal xcbgrab kmsgrab oss Enabled outdevs: alsa oss v4l2 caca pulse xv fbdev sdl2 opengl sndio License: nonfree and unredistributable WARNING: Option --disable-filter=resample did not match anything WARNING: build FFmpeg against libmfx 1.x, obsolete features of libmfx such as OPAQUE memory, multi-frame encode, user plugins and LA_EXT rate control mode are enabled
警告信息不用管,因为不重要
编译 终端执行
然后漫长等待
安装 终端执行
最后看看效果 执行
返回
ffmpeg version N-110790-ge8e4863325-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-ffnvcodec --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 libavutil 58. 9.100 / 58. 9.100 libavcodec 60. 14.101 / 60. 14.101 libavformat 60. 5.100 / 60. 5.100 libavdevice 60. 2.100 / 60. 2.100 libavfilter 9. 8.101 / 9. 8.101 libswscale 7. 2.100 / 7. 2.100 libswresample 4. 11.100 / 4. 11.100 libpostproc 57. 2.100 / 57. 2.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg'
可以看到我们添加的选项已经添加进去了
可能遇到的问题 却少一大堆库 解决方法 安装缺少的库 当然不能一个一个安
终端执行
删除deb-src
前#
号# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
sudo apt update sudo apt install build-essential sudo apt build-dep ffmpeg
至此,绝大部分库会安装完毕,之后注释apt的源码源,提高apt update
速度
配置时提示Unknown option "--enable-avresample".
删除--enable-avresample
原因可见FFmpeg/FFmpeg@420cedd
配置时提示Unknown option "--enable-libwavpack".
删除--enable-libwavpack
原因可见FFmpeg/FFmpeg@45070ee