FFmpeg 系列文章目錄
【FFmpeg】Windows 搭建 FFmpeg 命令列運行環境
【FFmpeg】FFmpeg 相關術語簡介 ( 容器 | 媒體流 | 資料幀 | 資料包 | 編解碼器 | 復用 | 解復用 )
【FFmpeg】FFmpeg 相關術語簡介 二
【FFmpeg】FFmpeg 幫助檔案使用
【FFmpeg】使用 FFmpeg 處理音視頻格式轉換流程 ( 解復用 | 解碼 | 幀處理 | 編碼 | 復用 )
【FFmpeg】ffmpeg 命令查詢一 ( 版本 | 編譯配置 | 復用格式 | 編解碼器 )
【FFmpeg】ffmpeg 命令查詢二 ( 位元流過濾器 | 可用協議 | 過濾器 | 像素格式 | 標準聲道布局 | 音頻采樣格式 | 顏色名稱 )
【FFmpeg】ffmpeg 命令查詢三 ( 查詢 ffmpeg 命令分類支持的引數 )
文章目錄
- FFmpeg 系列文章目錄
- 一、查看具體的 ffmpeg 命令分類所支持的引數
- 二、查詢 " 復用器 " 型別 設定 flv 視頻格式時 所支持的引數
- 三、查詢 " 過濾器 " 型別設定 atempo 時所支持的引數
- 四、查詢 " 編碼器 " 型別設定 libx264 時所支持的引數
- 五、查詢命令設定項以及具體引數
一、查看具體的 ffmpeg 命令分類所支持的引數
查看具體的 ffmpeg 命令分類所支持的引數語法如下 :
ffmpeg -h 引數型別=引數名稱
引數型別 指的是下面的引數去掉 s 之后的字串 , 如 " 顯示可用的復用器 " 對應的 引數型別 是 muxer ;
-formats show available formats // 顯示可用格式 , 其等價于 muxers + demuxers 組合
-muxers show available muxers // 顯示可用的復用器
-demuxers show available demuxers // 顯示可用的解復用器
-devices show available devices // 顯示可用設備
-codecs show available codecs // 顯示可用的編解碼器 , 其等價于 encoders + decoders 組合
-decoders show available decoders // 顯示可用的解碼器
-encoders show available encoders // 顯示可用的編碼器
-bsfs show available bit stream filters // 顯示可用的位元流 filters 過濾器
-protocols show available protocols // 顯示可用協議 , 如 rtmp , rtsp 等 ;
-filters show available filters // 顯示可用的過濾器 , 可用于 : 改變播放速度 , 加水印 , 加 Logo
-pix_fmts show available pixel formats // 顯示可用的像素格式
-layouts show standard channel layouts // 顯示標準聲道名稱
-sample_fmts show available audio sample formats // 顯示可用的音頻采樣格式
-colors show available color names // 顯示可用的顏色名稱
-sources device list sources of the input device // 列出輸入設備來源
-sinks device list sinks of the output device // 列出輸出設備接收器
-hwaccels show available HW acceleration methods // 顯示可用的硬體加速方法
二、查詢 " 復用器 " 型別 設定 flv 視頻格式時 所支持的引數
查詢 " 復用器 " 型別 設定 flv 視頻格式時 所支持的引數 的 命令 : 如果在命令中使用了 flv 視頻 , 其解復用器可以設定的引數型別 ;
ffmpeg -h muxer=flv
執行程序 : 列印出的 flv 視頻格式支持的解復用器 ;

命令列輸出 :
D:\ffmpeg>ffmpeg -h muxer=flv
ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Muxer flv [FLV (Flash Video)]:
Common extensions: flv.
Mime type: video/x-flv.
Default video codec: flv1.
Default audio codec: mp3.
flv muxer AVOptions:
-flvflags <flags> E.......... FLV muxer flags (default 0)
aac_seq_header_detect E.......... Put AAC sequence header based on stream data
no_sequence_end E.......... disable sequence end for FLV
no_metadata E.......... disable metadata for FLV
no_duration_filesize E.......... disable duration and filesize zero value metadata for FLV
add_keyframe_index E.......... Add keyframe index metadata
D:\ffmpeg>
三、查詢 " 過濾器 " 型別設定 atempo 時所支持的引數
查詢 " 過濾器 " 型別設定 atempo 時所支持的引數 的 命令 : 如果在命令中使用了 修改視頻速率的 過濾器 , 可以設定的引數型別 ;
ffmpeg -h filter=atempo
執行程序 : 列印出設定 atempo 過濾器時可以設定的引數 ;

命令列輸出 :
D:\ffmpeg>ffmpeg -h filter=atempo
ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Filter atempo
Adjust audio tempo.
Inputs:
#0: default (audio)
Outputs:
#0: default (audio)
atempo AVOptions:
tempo <double> ..F.A....T. set tempo scale factor (from 0.5 to 100) (default 1)
D:\ffmpeg>
查詢結果 : 可設定 tempo 引數 , 配速取值范圍從 0.5 0.5 0.5 ~ 100 100 100 , 默認為 1 1 1 ;
atempo AVOptions:
tempo <double> ..F.A....T. set tempo scale factor (from 0.5 to 100) (default 1)
四、查詢 " 編碼器 " 型別設定 libx264 時所支持的引數
查詢 " 編碼器 " 型別設定 libx264 時所支持的引數 的 命令 : 如果在命令中使用了 libx264 編碼器 , 可以設定的引數型別 ;
ffmpeg -h encoder=libx264
執行程序 : 列印出設定 atempo 過濾器時可以設定的引數 ;

命令列輸出 :
D:\ffmpeg>ffmpeg -h encoder=libx264
ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
General capabilities: delay threads
Threading capabilities: other
Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le
libx264 AVOptions:
-preset <string> E..V....... Set the encoding preset (cf. x264 --fullhelp) (default "medium")
-tune <string> E..V....... Tune the encoding params (cf. x264 --fullhelp)
-profile <string> E..V....... Set profile restrictions (cf. x264 --fullhelp)
-fastfirstpass <boolean> E..V....... Use fast settings when encoding first pass (default true)
-level <string> E..V....... Specify level (as defined by Annex A)
-passlogfile <string> E..V....... Filename for 2 pass stats
-wpredp <string> E..V....... Weighted prediction for P-frames
-a53cc <boolean> E..V....... Use A53 Closed Captions (if available) (default true)
-x264opts <string> E..V....... x264 options
-crf <float> E..V....... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)
-crf_max <float> E..V....... In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)
-qp <int> E..V....... Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)
-aq-mode <int> E..V....... AQ method (from -1 to INT_MAX) (default -1)
none 0 E..V.......
variance 1 E..V....... Variance AQ (complexity mask)
autovariance 2 E..V....... Auto-variance AQ
autovariance-biased 3 E..V....... Auto-variance AQ with bias to dark scenes
-aq-strength <float> E..V....... AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)
-psy <boolean> E..V....... Use psychovisual optimizations. (default auto)
-psy-rd <string> E..V....... Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.
-rc-lookahead <int> E..V....... Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)
-weightb <boolean> E..V....... Weighted prediction for B-frames. (default auto)
-weightp <int> E..V....... Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)
none 0 E..V.......
simple 1 E..V.......
smart 2 E..V.......
-ssim <boolean> E..V....... Calculate and print SSIM stats. (default auto)
-intra-refresh <boolean> E..V....... Use Periodic Intra Refresh instead of IDR frames. (default auto)
-bluray-compat <boolean> E..V....... Bluray compatibility workarounds. (default auto)
-b-bias <int> E..V....... Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)
-b-pyramid <int> E..V....... Keep some B-frames as references. (from -1 to INT_MAX) (default -1)
none 0 E..V.......
strict 1 E..V....... Strictly hierarchical pyramid
normal 2 E..V....... Non-strict (not Blu-ray compatible)
-mixed-refs <boolean> E..V....... One reference per partition, as opposed to one reference per macroblock (default auto)
-8x8dct <boolean> E..V....... High profile 8x8 transform. (default auto)
-fast-pskip <boolean> E..V....... (default auto)
-aud <boolean> E..V....... Use access unit delimiters. (default auto)
-mbtree <boolean> E..V....... Use macroblock tree ratecontrol. (default auto)
-deblock <string> E..V....... Loop filter parameters, in <alpha:beta> form.
-cplxblur <float> E..V....... Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)
-partitions <string> E..V....... A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all
-direct-pred <int> E..V....... Direct MV prediction mode (from -1 to INT_MAX) (default -1)
none 0 E..V.......
spatial 1 E..V.......
temporal 2 E..V.......
auto 3 E..V.......
-slice-max-size <int> E..V....... Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)
-stats <string> E..V....... Filename for 2 pass stats
-nal-hrd <int> E..V....... Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1)
none 0 E..V.......
vbr 1 E..V.......
cbr 2 E..V.......
-avcintra-class <int> E..V....... AVC-Intra class 50/100/200 (from -1 to 200) (default -1)
-me_method <int> E..V....... Set motion estimation method (from -1 to 4) (default -1)
dia 0 E..V.......
hex 1 E..V.......
umh 2 E..V.......
esa 3 E..V.......
tesa 4 E..V.......
-motion-est <int> E..V....... Set motion estimation method (from -1 to 4) (default -1)
dia 0 E..V.......
hex 1 E..V.......
umh 2 E..V.......
esa 3 E..V.......
tesa 4 E..V.......
-forced-idr <boolean> E..V....... If forcing keyframes, force them as IDR frames. (default false)
-coder <int> E..V....... Coder type (from -1 to 1) (default default)
default -1 E..V.......
cavlc 0 E..V.......
cabac 1 E..V.......
vlc 0 E..V.......
ac 1 E..V.......
-b_strategy <int> E..V....... Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)
-chromaoffset <int> E..V....... QP difference between chroma and luma (from INT_MIN to INT_MAX) (default 0)
-sc_threshold <int> E..V....... Scene change threshold (from INT_MIN to INT_MAX) (default -1)
-noise_reduction <int> E..V....... Noise reduction (from INT_MIN to INT_MAX) (default -1)
-x264-params <dictionary> E..V....... Override the x264 configuration using a :-separated list of key=value parameters
D:\ffmpeg>
五、查詢命令設定項以及具體引數
想要對一個視頻進行編碼操作 , 查詢編碼器 , 如只知道 264 , 不知道具體的編碼器名稱 , 先使用如下名稱 , 查詢到具體的編碼器名稱 ;
ffmpeg -encoders | findstr 264
查詢結果是 V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) , 編碼器的名稱是 libx264 ;

D:\ffmpeg>ffmpeg -encoders | findstr 264
ffmpeg version n4.4-19-g8d172d9409 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V....D h264_amf AMD AMF H.264 Encoder (codec h264)
V....D h264_mf H264 via MediaFoundation (codec h264)
V....D h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
D:\ffmpeg>
然后查詢如果編碼器設定為 libx264 都需要設定哪些引數 ;
使用
ffmpeg -h encoder=libx264
命令即可查詢 libx264 編碼器的詳細引數設定 ;
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/287711.html
標籤:其他
上一篇:【數字信號調制】基于matlab正交幅度調制仿真【含Matlab原始碼 1002期】
下一篇:服務器使用
