FFMPEG进阶系列02-ffmpeg命令详解1

帮助信息

主要信息

ffmpeg在做音视频编解码时非常方便,所以很多场景下转码使用的是ffmpeg,铜鼓通过ffmpeg -help命令操作可以看到ffmpeg常见的命令大概分为六部分:

  1. ffmpeg信息查询部分
  2. 公共做操参数部分
  3. 文件主要操作参数部分
  4. 视频操作参数部分
  5. 音频操作参数部分
  6. 字幕操作参数部分
    ffmpeg信息查询部分主要参数:ffmpeg.exe -h
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.1 (GCC) 20180722
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-f
ontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --e
nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libs
nappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --ena
ble-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvids
tab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --e
nable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva
2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Getting help:
    -h      -- print basic options
    -h long -- print more options
    -h full -- print all options (including all format and codec specific options, very long)
    -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf
    See man ffmpeg for detailed description of the options.

Print help / information / capabilities:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-buildconf          show build configuration
-formats            show available formats
-muxers             show available muxers
-demuxers           show available demuxers
-devices            show available devices
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-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

Global options (affect whole program instead of just one file:
-loglevel loglevel  set logging level
-v loglevel         set logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-y                  overwrite output files
-n                  never overwrite output files
-ignore_unknown     Ignore unknown stream types
-filter_threads     number of non-complex filter threads
-filter_complex_threads  number of threads for -filter_complex
-stats              print progress report during encoding
-max_error_rate maximum error rate  ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an err
or instead of success.
-bits_per_raw_sample number  set the number of bits per raw sample
-vol volume         change audio volume (256=normal)

Per-file main options:
-f fmt              force format
-c codec            codec name
-codec codec        codec name
-pre preset         preset name
-map_metadata outfile[,metadata]:infile[,metadata]  set metadata information of outfile from infile
-t duration         record or transcode "duration" seconds of audio/video
-to time_stop       record or transcode stop time
-fs limit_size      set the limit file size in bytes
-ss time_off        set the start time offset
-sseof time_off     set the start time offset relative to EOF
-seek_timestamp     enable/disable seeking by timestamp with -ss
-timestamp time     set the recording timestamp ('now' to set the current time)
-metadata string=string  add metadata
-program title=string:st=number...  add program with specified streams
-target type        specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-
" or "film-")
-apad               audio pad
-frames number      set the number of frames to output
-filter filter_graph  set stream filtergraph
-filter_script filename  read stream filtergraph description from a file
-reinit_filter      reinit filtergraph on input parameter changes
-discard            discard
-disposition        disposition

Video options:
-vframes number     set the number of video frames to output
-r rate             set frame rate (Hz value, fraction or abbreviation)
-s size             set frame size (WxH or abbreviation)
-aspect aspect      set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-bits_per_raw_sample number  set the number of bits per raw sample
-vn                 disable video
-vcodec codec       force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.
-pass n             select the pass number (1 to 3)
-vf filter_graph    set video filters
-ab bitrate         audio bitrate (please use -b:a)
-b bitrate          video bitrate (please use -b:v)
-dn                 disable data

Audio options:
-aframes number     set the number of audio frames to output
-aq quality         set audio quality (codec-specific)
-ar rate            set audio sampling rate (in Hz)
-ac channels        set number of audio channels
-an                 disable audio
-acodec codec       force audio codec ('copy' to copy stream)
-vol volume         change audio volume (256=normal)
-af filter_graph    set audio filters

Subtitle options:
-s size             set frame size (WxH or abbreviation)
-sn                 disable subtitle
-scodec codec       force subtitle codec ('copy' to copy stream)
-stag fourcc/tag    force subtitle tag/fourcc
-fix_sub_duration   fix subtitles duration
-canvas_size size   set canvas size (WxH or abbreviation)
-spre preset        set the subtitle options to the indicated preset

更多帮助信息

其中通过ffmpeg -h查看到的help信息是基础的信息,如果想获得高级参数部分,可以通过使用
ffmpeg -h long参数来查看,如果希望获得全部的帮助信息,可以同过使用ffmpeg -h full参数来获得。
通过-L参数,可以看到ffmpeg目前所支持的license协议
ffmpeg -h full部分内容,总内容有1万多行,以下为部分节选内容:

AVCodecContext相关

AVCodecContext AVOptions:
  -b                 <int64>      E..VA.... set bitrate (in bits/s) (from 0 to I64_MAX) (default 200000)
  -ab                <int64>      E...A.... set bitrate (in bits/s) (from 0 to INT_MAX) (default 128000)
  -bt                <int>        E..V..... Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value. This is not related to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality. (from 1 to INT_MAX) (default 4e+06)
  -flags             <flags>      ED.VAS... (default 0)
     unaligned                    .D.V..... allow decoders to produce unaligned output
     mv4                          E..V..... use four motion vectors per macroblock (MPEG-4)
     qpel                         E..V..... use 1/4-pel motion compensation
     loop                         E..V..... use loop filter
     gray                         ED.V..... only decode/encode grayscale
     psnr                         E..V..... error[?] variables will be set during encoding
     truncated                    .D.V..... Input bitstream might be randomly truncated
     ildct                        E..V..... use interlaced DCT
     low_delay                    ED.V..... force low delay
     global_header                E..VA.... place global headers in extradata instead of every keyframe
     bitexact                     ED.VAS... use only bitexact functions (except (I)DCT)
     aic                          E..V..... H.263 advanced intra coding / MPEG-4 AC prediction
     ilme                         E..V..... interlaced motion estimation
     cgop                         E..V..... closed GOP
     output_corrupt               .D.V..... Output even potentially corrupted frames
  -g                 <int>        E..V..... set the group of picture (GOP) size (from INT_MIN to INT_MAX) (default 12)
  -ar                <int>        ED..A.... set audio sampling rate (in Hz) (from 0 to INT_MAX) (default 0)
  -ac                <int>        ED..A.... set number of audio channels (from 0 to INT_MAX) (default 0)
  -cutoff            <int>        E...A.... set cutoff bandwidth (from INT_MIN to INT_MAX) (default 0)
  -frame_size        <int>        E...A.... (from 0 to INT_MAX) (default 0)
  -qcomp             <float>      E..V..... video quantizer scale compression (VBR). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0 (from -FLT_MAX to FLT_MAX) (default 0.5)
  -qblur             <float>      E..V..... video quantizer scale blur (VBR) (from -1 to FLT_MAX) (default 0.5)
  -qmin              <int>        E..V..... minimum video quantizer scale (VBR) (from -1 to 69) (default 2)
  -qmax              <int>        E..V..... maximum video quantizer scale (VBR) (from -1 to 1024) (default 31)
  -qdiff             <int>        E..V..... maximum difference between the quantizer scales (VBR) (from INT_MIN to INT_MAX) (default 3)
  -bf                <int>        E..V..... set maximum number of B-frames between non-B-frames (from -1 to INT_MAX) (default 0)
  -b_qfactor         <float>      E..V..... QP factor between P- and B-frames (from -FLT_MAX to FLT_MAX) (default 1.25)
  -b_strategy        <int>        E..V..... strategy to choose between I/P/B-frames (from INT_MIN to INT_MAX) (default 0)
  -ps                <int>        E..V..... RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)
  -bug               <flags>      .D.V..... work around not autodetected encoder bugs (default autodetect)
     autodetect                   .D.V.....
     xvid_ilace                   .D.V..... Xvid interlacing bug (autodetected if FOURCC == XVIX)
     ump4                         .D.V..... (autodetected if FOURCC == UMP4)
     no_padding                   .D.V..... padding bug (autodetected)
     amv                          .D.V.....
     qpel_chroma                  .D.V.....
     std_qpel                     .D.V..... old standard qpel (autodetected per FOURCC/version)
     qpel_chroma2                 .D.V.....
     direct_blocksize              .D.V..... direct-qpel-blocksize bug (autodetected per FOURCC/version)
     edge                         .D.V..... edge padding bug (autodetected per FOURCC/version)
     hpel_chroma                  .D.V.....
     dc_clip                      .D.V.....
     ms                           .D.V..... work around various bugs in Microsoft's broken decoders
     trunc                        .D.V..... truncated frames
     iedge                        .D.V.....
  -strict            <int>        ED.VA.... how strictly to follow the standards (from INT_MIN to INT_MAX) (default normal)
     very                         ED.VA.... strictly conform to a older more strict version of the spec or reference software
     strict                       ED.VA.... strictly conform to all the things in the spec no matter what the consequences
     normal                       ED.VA....
     unofficial                   ED.VA.... allow unofficial extensions
     experimental                 ED.VA.... allow non-standardized experimental things
  -b_qoffset         <float>      E..V..... QP offset between P- and B-frames (from -FLT_MAX to FLT_MAX) (default 1.25)
  -err_detect        <flags>      .D.VA.... set error detection flags (default 0)
     crccheck                     .D.VA.... verify embedded CRCs
     bitstream                    .D.VA.... detect bitstream specification deviations
     buffer                       .D.VA.... detect improper bitstream length
     explode                      .D.VA.... abort decoding on minor error detection
     ignore_err                   .D.VA.... ignore errors
     careful                      .D.VA.... consider things that violate the spec, are fast to check and have not been seen in the wild as errors
     compliant                    .D.VA.... consider all spec non compliancies as errors
     aggressive                   .D.VA.... consider things that a sane encoder should not do as an error
  -mpeg_quant        <int>        E..V..... use MPEG quantizers instead of H.263 (from INT_MIN to INT_MAX) (default 0)
  -maxrate           <int64>      E..VA.... maximum bitrate (in bits/s). Used for VBV together with bufsize. (from 0 to INT_MAX) (default 0)
  -minrate           <int64>      E..VA.... minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise. (from INT_MIN to INT_MAX) (default 0)
  -bufsize           <int>        E..VA.... set ratecontrol buffer size (in bits) (from INT_MIN to INT_MAX) (default 0)
  -i_qfactor         <float>      E..V..... QP factor between P- and I-frames (from -FLT_MAX to FLT_MAX) (default -0.8)
  -i_qoffset         <float>      E..V..... QP offset between P- and I-frames (from -FLT_MAX to FLT_MAX) (default 0)
  -dct               <int>        E..V..... DCT algorithm (from 0 to INT_MAX) (default auto)
     auto                         E..V..... autoselect a good one
     fastint                      E..V..... fast integer
     int                          E..V..... accurate integer
     mmx                          E..V.....
     altivec                      E..V.....
     faan                         E..V..... floating point AAN DCT
  -lumi_mask         <float>      E..V..... compresses bright areas stronger than medium ones (from -FLT_MAX to FLT_MAX) (default 0)
  -tcplx_mask        <float>      E..V..... temporal complexity masking (from -FLT_MAX to FLT_MAX) (default 0)
  -scplx_mask        <float>      E..V..... spatial complexity masking (from -FLT_MAX to FLT_MAX) (default 0)
  -p_mask            <float>      E..V..... inter masking (from -FLT_MAX to FLT_MAX) (default 0)
  -dark_mask         <float>      E..V..... compresses dark areas stronger than medium ones (from -FLT_MAX to FLT_MAX) (default 0)
  -idct              <int>        ED.V..... select IDCT implementation (from 0 to INT_MAX) (default auto)
     auto                         ED.V.....
     int                          ED.V.....
     simple                       ED.V.....
     simplemmx                    ED.V.....
     arm                          ED.V.....
     altivec                      ED.V.....
     simplearm                    ED.V.....
     simplearmv5te                ED.V.....
     simplearmv6                  ED.V.....
     simpleneon                   ED.V.....
     xvid                         ED.V.....
     xvidmmx                      ED.V..... deprecated, for compatibility only
     faani                        ED.V..... floating point AAN IDCT
     simpleauto                   ED.V.....
  -ec                <flags>      .D.V..... set error concealment strategy (default guess_mvs+deblock)
     guess_mvs                    .D.V..... iterative motion vector (MV) search (slow)
     deblock                      .D.V..... use strong deblock filter for damaged MBs
     favor_inter                  .D.V..... favor predicting from the previous frame
  -pred              <int>        E..V..... prediction method (from INT_MIN to INT_MAX) (default left)
     left                         E..V.....
     plane                        E..V.....
     median                       E..V.....
  -aspect            <rational>   E..V..... sample aspect ratio (from 0 to 10) (default 0/1)
  -sar               <rational>   E..V..... sample aspect ratio (from 0 to 10) (default 0/1)
  -debug             <flags>      ED.VAS... print specific debug info (default 0)
     pict                         .D.V..... picture info
     rc                           E..V..... rate control
     bitstream                    .D.V.....
     mb_type                      .D.V..... macroblock (MB) type
     qp                           .D.V..... per-block quantization parameter (QP)
     dct_coeff                    .D.V.....
     green_metadata               .D.V.....
     skip                         .D.V.....
     startcode                    .D.V.....
     er                           .D.V..... error recognition
     mmco                         .D.V..... memory management control operations (H.264)
     bugs                         .D.V.....
     buffers                      .D.V..... picture buffer allocations
     thread_ops                   .D.VA.... threading operations
     nomc                         .D.VA.... skip motion compensation
  -cmp               <int>        E..V..... full-pel ME compare function (from INT_MIN to INT_MAX) (default sad)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -subcmp            <int>        E..V..... sub-pel ME compare function (from INT_MIN to INT_MAX) (default sad)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -mbcmp             <int>        E..V..... macroblock compare function (from INT_MIN to INT_MAX) (default sad)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -ildctcmp          <int>        E..V..... interlaced DCT compare function (from INT_MIN to INT_MAX) (default vsad)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -dia_size          <int>        E..V..... diamond type & size for motion estimation (from INT_MIN to INT_MAX) (default 0)
  -last_pred         <int>        E..V..... amount of motion predictors from the previous frame (from INT_MIN to INT_MAX) (default 0)
  -preme             <int>        E..V..... pre motion estimation (from INT_MIN to INT_MAX) (default 0)
  -precmp            <int>        E..V..... pre motion estimation compare function (from INT_MIN to INT_MAX) (default sad)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -pre_dia_size      <int>        E..V..... diamond type & size for motion estimation pre-pass (from INT_MIN to INT_MAX) (default 0)
  -subq              <int>        E..V..... sub-pel motion estimation quality (from INT_MIN to INT_MAX) (default 8)
  -me_range          <int>        E..V..... limit motion vectors range (1023 for DivX player) (from INT_MIN to INT_MAX) (default 0)
  -global_quality    <int>        E..VA.... (from INT_MIN to INT_MAX) (default 0)
  -coder             <int>        E..V..... (from INT_MIN to INT_MAX) (default vlc)
     vlc                          E..V..... variable length coder / Huffman coder
     ac                           E..V..... arithmetic coder
     raw                          E..V..... raw (no encoding)
     rle                          E..V..... run-length coder
  -context           <int>        E..V..... context model (from INT_MIN to INT_MAX) (default 0)
  -mbd               <int>        E..V..... macroblock decision algorithm (high quality mode) (from 0 to 2) (default simple)
     simple                       E..V..... use mbcmp
     bits                         E..V..... use fewest bits
     rd                           E..V..... use best rate distortion
  -sc_threshold      <int>        E..V..... scene change threshold (from INT_MIN to INT_MAX) (default 0)
  -nr                <int>        E..V..... noise reduction (from INT_MIN to INT_MAX) (default 0)
  -rc_init_occupancy <int>        E..V..... number of bits which should be loaded into the rc buffer before decoding starts (from INT_MIN to INT_MAX) (default 0)
  -flags2            <flags>      ED.VA.... (default 0)
     fast                         E..V..... allow non-spec-compliant speedup tricks
     noout                        E..V..... skip bitstream encoding
     ignorecrop                   .D.V..... ignore cropping information from sps
     local_header                 E..V..... place global headers at every keyframe instead of in extradata
     chunks                       .D.V..... Frame data might be split into multiple chunks
     showall                      .D.V..... Show all frames before the first keyframe
     export_mvs                   .D.V..... export motion vectors through frame side data
     skip_manual                  .D.V..... do not skip samples and export skip information as frame side data
     ass_ro_flush_noop              .D...S... do not reset ASS ReadOrder field on flush
  -threads           <int>        ED.VA.... set the number of threads (from 0 to INT_MAX) (default 1)
     auto                         ED.V..... autodetect a suitable number of threads to use
  -dc                <int>        E..V..... intra_dc_precision (from -8 to 16) (default 0)
  -nssew             <int>        E..V..... nsse weight (from INT_MIN to INT_MAX) (default 8)
  -skip_top          <int>        .D.V..... number of macroblock rows at the top which are skipped (from INT_MIN to INT_MAX) (default 0)
  -skip_bottom       <int>        .D.V..... number of macroblock rows at the bottom which are skipped (from INT_MIN to INT_MAX) (default 0)
  -profile           <int>        E..VA.... (from INT_MIN to INT_MAX) (default unknown)
     unknown                      E..VA....
     aac_main                     E...A....
     aac_low                      E...A....
     aac_ssr                      E...A....
     aac_ltp                      E...A....
     aac_he                       E...A....
     aac_he_v2                    E...A....
     aac_ld                       E...A....
     aac_eld                      E...A....
     mpeg2_aac_low                E...A....
     mpeg2_aac_he                 E...A....
     dts                          E...A....
     dts_es                       E...A....
     dts_96_24                    E...A....
     dts_hd_hra                   E...A....
     dts_hd_ma                    E...A....
     mpeg4_sp                     E..V.....
     mpeg4_core                   E..V.....
     mpeg4_main                   E..V.....
     mpeg4_asp                    E..V.....
     main10                       E..V.....
     msbc                         E...A....
  -level             <int>        E..VA.... (from INT_MIN to INT_MAX) (default unknown)
     unknown                      E..VA....
  -lowres            <int>        .D.VA.... decode at 1= 1/2, 2=1/4, 3=1/8 resolutions (from 0 to INT_MAX) (default 0)
  -skip_threshold    <int>        E..V..... frame skip threshold (from INT_MIN to INT_MAX) (default 0)
  -skip_factor       <int>        E..V..... frame skip factor (from INT_MIN to INT_MAX) (default 0)
  -skip_exp          <int>        E..V..... frame skip exponent (from INT_MIN to INT_MAX) (default 0)
  -skipcmp           <int>        E..V..... frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)
     sad                          E..V..... sum of absolute differences, fast
     sse                          E..V..... sum of squared errors
     satd                         E..V..... sum of absolute Hadamard transformed differences
     dct                          E..V..... sum of absolute DCT transformed differences
     psnr                         E..V..... sum of squared quantization errors (avoid, low quality)
     bit                          E..V..... number of bits needed for the block
     rd                           E..V..... rate distortion optimal, slow
     zero                         E..V..... 0
     vsad                         E..V..... sum of absolute vertical differences
     vsse                         E..V..... sum of squared vertical differences
     nsse                         E..V..... noise preserving sum of squared differences
     w53                          E..V..... 5/3 wavelet, only used in snow
     w97                          E..V..... 9/7 wavelet, only used in snow
     dctmax                       E..V.....
     chroma                       E..V.....
     msad                         E..V..... sum of absolute differences, median predicted
  -mblmin            <int>        E..V..... minimum macroblock Lagrange factor (VBR) (from 1 to 32767) (default 236)
  -mblmax            <int>        E..V..... maximum macroblock Lagrange factor (VBR) (from 1 to 32767) (default 3658)
  -mepc              <int>        E..V..... motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)
  -skip_loop_filter  <int>        .D.V..... skip loop filtering process for the selected frames (from INT_MIN to INT_MAX) (default default)
     none                         .D.V..... discard no frame
     default                      .D.V..... discard useless frames
     noref                        .D.V..... discard all non-reference frames
     bidir                        .D.V..... discard all bidirectional frames
     nokey                        .D.V..... discard all frames except keyframes
     nointra                      .D.V..... discard all frames except I frames
     all                          .D.V..... discard all frames
  -skip_idct         <int>        .D.V..... skip IDCT/dequantization for the selected frames (from INT_MIN to INT_MAX) (default default)
     none                         .D.V..... discard no frame
     default                      .D.V..... discard useless frames
     noref                        .D.V..... discard all non-reference frames
     bidir                        .D.V..... discard all bidirectional frames
     nokey                        .D.V..... discard all frames except keyframes
     nointra                      .D.V..... discard all frames except I frames
     all                          .D.V..... discard all frames
  -skip_frame        <int>        .D.V..... skip decoding for the selected frames (from INT_MIN to INT_MAX) (default default)
     none                         .D.V..... discard no frame
     default                      .D.V..... discard useless frames
     noref                        .D.V..... discard all non-reference frames
     bidir                        .D.V..... discard all bidirectional frames
     nokey                        .D.V..... discard all frames except keyframes
     nointra                      .D.V..... discard all frames except I frames
     all                          .D.V..... discard all frames
  -bidir_refine      <int>        E..V..... refine the two motion vectors used in bidirectional macroblocks (from 0 to 4) (default 1)
  -brd_scale         <int>        E..V..... downscale frames for dynamic B-frame decision (from 0 to 10) (default 0)
  -keyint_min        <int>        E..V..... minimum interval between IDR-frames (from INT_MIN to INT_MAX) (default 25)
  -refs              <int>        E..V..... reference frames to consider for motion compensation (from INT_MIN to INT_MAX) (default 1)
  -chromaoffset      <int>        E..V..... chroma QP offset from luma (from INT_MIN to INT_MAX) (default 0)
  -trellis           <int>        E..VA.... rate-distortion optimal quantization (from INT_MIN to INT_MAX) (default 0)
  -mv0_threshold     <int>        E..V..... (from 0 to INT_MAX) (default 256)
  -b_sensitivity     <int>        E..V..... adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)
  -compression_level <int>        E..VA.... (from INT_MIN to INT_MAX) (default -1)
  -min_prediction_order <int>        E...A.... (from INT_MIN to INT_MAX) (default -1)
  -max_prediction_order <int>        E...A.... (from INT_MIN to INT_MAX) (default -1)
  -timecode_frame_start <int64>      E..V..... GOP timecode frame start number, in non-drop-frame format (from -1 to I64_MAX) (default -1)
  -channel_layout    <uint64>     ED..A.... (from 0 to 1.84467e+19) (default 0)
  -request_channel_layout <uint64>     .D..A.... (from 0 to 1.84467e+19) (default 0)
  -rc_max_vbv_use    <float>      E..V..... (from 0 to FLT_MAX) (default 0)
  -rc_min_vbv_use    <float>      E..V..... (from 0 to FLT_MAX) (default 3)
  -ticks_per_frame   <int>        ED.VA.... (from 1 to INT_MAX) (default 1)
  -color_primaries   <int>        ED.V..... color primaries (from 1 to INT_MAX) (default unknown)
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     bt470m                       ED.V..... BT.470 M
     bt470bg                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     film                         ED.V..... Film
     bt2020                       ED.V..... BT.2020
     smpte428                     ED.V..... SMPTE 428-1
     smpte428_1                   ED.V..... SMPTE 428-1
     smpte431                     ED.V..... SMPTE 431-2
     smpte432                     ED.V..... SMPTE 422-1
     jedec-p22                    ED.V..... JEDEC P22
     unspecified                  ED.V..... Unspecified
  -color_trc         <int>        ED.V..... color transfer characteristics (from 1 to INT_MAX) (default unknown)
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     gamma22                      ED.V..... BT.470 M
     gamma28                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     linear                       ED.V..... Linear
     log100                       ED.V..... Log
     log316                       ED.V..... Log square root
     iec61966-2-4                 ED.V..... IEC 61966-2-4
     bt1361e                      ED.V..... BT.1361
     iec61966-2-1                 ED.V..... IEC 61966-2-1
     bt2020-10                    ED.V..... BT.2020 - 10 bit
     bt2020-12                    ED.V..... BT.2020 - 12 bit
     smpte2084                    ED.V..... SMPTE 2084
     smpte428                     ED.V..... SMPTE 428-1
     arib-std-b67                 ED.V..... ARIB STD-B67
     unspecified                  ED.V..... Unspecified
     log                          ED.V..... Log
     log_sqrt                     ED.V..... Log square root
     iec61966_2_4                 ED.V..... IEC 61966-2-4
     bt1361                       ED.V..... BT.1361
     iec61966_2_1                 ED.V..... IEC 61966-2-1
     bt2020_10bit                 ED.V..... BT.2020 - 10 bit
     bt2020_12bit                 ED.V..... BT.2020 - 12 bit
     smpte428_1                   ED.V..... SMPTE 428-1
  -colorspace        <int>        ED.V..... color space (from 0 to INT_MAX) (default unknown)
     rgb                          ED.V..... RGB
     bt709                        ED.V..... BT.709
     unknown                      ED.V..... Unspecified
     fcc                          ED.V..... FCC
     bt470bg                      ED.V..... BT.470 BG
     smpte170m                    ED.V..... SMPTE 170 M
     smpte240m                    ED.V..... SMPTE 240 M
     ycgco                        ED.V..... YCGCO
     bt2020nc                     ED.V..... BT.2020 NCL
     bt2020c                      ED.V..... BT.2020 CL
     smpte2085                    ED.V..... SMPTE 2085
     unspecified                  ED.V..... Unspecified
     ycocg                        ED.V..... YCGCO
     bt2020_ncl                   ED.V..... BT.2020 NCL
     bt2020_cl                    ED.V..... BT.2020 CL
  -color_range       <int>        ED.V..... color range (from 0 to INT_MAX) (default unknown)
     unknown                      ED.V..... Unspecified
     tv                           ED.V..... MPEG (219*2^(n-8))
     pc                           ED.V..... JPEG (2^n-1)
     unspecified                  ED.V..... Unspecified
     mpeg                         ED.V..... MPEG (219*2^(n-8))
     jpeg                         ED.V..... JPEG (2^n-1)
  -chroma_sample_location <int>        ED.V..... chroma sample location (from 0 to INT_MAX) (default unknown)
     unknown                      ED.V..... Unspecified
     left                         ED.V..... Left
     center                       ED.V..... Center
     topleft                      ED.V..... Top-left
     top                          ED.V..... Top
     bottomleft                   ED.V..... Bottom-left
     bottom                       ED.V..... Bottom
     unspecified                  ED.V..... Unspecified
  -slices            <int>        E..V..... set the number of slices, used in parallelized encoding (from 0 to INT_MAX) (default 0)
  -thread_type       <flags>      ED.VA.... select multithreading type (default slice+frame)
     slice                        ED.V.....
     frame                        ED.V.....
  -audio_service_type <int>        E...A.... audio service type (from 0 to 8) (default ma)
     ma                           E...A.... Main Audio Service
     ef                           E...A.... Effects
     vi                           E...A.... Visually Impaired
     hi                           E...A.... Hearing Impaired
     di                           E...A.... Dialogue
     co                           E...A.... Commentary
     em                           E...A.... Emergency
     vo                           E...A.... Voice Over
     ka                           E...A.... Karaoke
  -request_sample_fmt <sample_fmt> .D..A.... sample format audio decoders should prefer (default none)
  -sub_charenc       <string>     .D...S... set input text subtitles character encoding
  -sub_charenc_mode  <flags>      .D...S... set input text subtitles character encoding mode (default 0)
     do_nothing                   .D...S...
     auto                         .D...S...
     pre_decoder                  .D...S...
     ignore                       .D...S...
  -sub_text_format   <int>        .D...S... set decoded text subtitle format (from 0 to 1) (default ass_with_timings)
     ass                          .D...S...
     ass_with_timings              .D...S...
  -refcounted_frames <boolean>    .D.VA.... (default false)
  -side_data_only_packets <boolean>    E..VA.... (default true)
  -apply_cropping    <boolean>    .D.V..... (default true)
  -skip_alpha        <boolean>    .D.V..... Skip processing alpha (default false)
  -field_order       <int>        ED.V..... Field order (from 0 to 5) (default 0)
     progressive                  ED.V.....
     tt                           ED.V.....
     bb                           ED.V.....
     tb                           ED.V.....
     bt                           ED.V.....
  -dump_separator    <string>     ED.VAS... set information dump field separator
  -codec_whitelist   <string>     .D.VAS... List of decoders that are allowed to be used
  -max_pixels        <int64>      ED.VAS... Maximum number of pixels (from 0 to INT_MAX) (default INT_MAX)
  -hwaccel_flags     <flags>      .D.V..... (default ignore_level)
     ignore_level                 .D.V..... ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver
     allow_high_depth              .D.V..... allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component
     allow_profile_mismatch              .D.V..... attempt to decode anyway if HW accelerated decoder's supported profiles do not exactly match the stream
  -extra_hw_frames   <int>        .D.V..... Number of extra hardware frames to allocate for the user (from -1 to INT_MAX) (default -1)

AAC encoder相关

AAC encoder AVOptions:
  -aac_coder         <int>        E...A.... Coding algorithm (from 0 to 2) (default fast)
     anmr                         E...A.... ANMR method
     twoloop                      E...A.... Two loop searching method
     fast                         E...A.... Default fast search
  -aac_ms            <boolean>    E...A.... Force M/S stereo coding (default auto)
  -aac_is            <boolean>    E...A.... Intensity stereo coding (default true)
  -aac_pns           <boolean>    E...A.... Perceptual noise substitution (default true)
  -aac_tns           <boolean>    E...A.... Temporal noise shaping (default true)
  -aac_ltp           <boolean>    E...A.... Long term prediction (default false)
  -aac_pred          <boolean>    E...A.... AAC-Main prediction (default false)
  -aac_pce           <boolean>    E...A.... Forces the use of PCEs (default false)

libmp3lame encoder 相关

libmp3lame encoder AVOptions:
  -reservoir         <boolean>    E...A.... use bit reservoir (default true)
  -joint_stereo      <boolean>    E...A.... use joint stereo (default true)
  -abr               <boolean>    E...A.... use ABR (default false)

libx264相关

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                         E..V.....
     variance                     E..V..... Variance AQ (complexity mask)
     autovariance                 E..V..... Auto-variance AQ
     autovariance-biased              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                         E..V.....
     simple                       E..V.....
     smart                        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                         E..V.....
     strict                       E..V..... Strictly hierarchical pyramid
     normal                       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                         E..V.....
     spatial                      E..V.....
     temporal                     E..V.....
     auto                         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                         E..V.....
     vbr                          E..V.....
     cbr                          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                          E..V.....
     hex                          E..V.....
     umh                          E..V.....
     esa                          E..V.....
     tesa                         E..V.....
  -motion-est        <int>        E..V..... Set motion estimation method (from -1 to 4) (default -1)
     dia                          E..V.....
     hex                          E..V.....
     umh                          E..V.....
     esa                          E..V.....
     tesa                         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                      E..V.....
     cavlc                        E..V.....
     cabac                        E..V.....
     vlc                          E..V.....
     ac                           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 -1)
  -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       <string>     E..V..... Override the x264 configuration using a :-separated list of key=value parameters

更多资料,更多分享

音视频技术交流群1 已满
音视频技术交流群2 已满
音视频技术交流群3 群号782508536

最新文章请关注以下专栏:
简书专栏:https://www.jianshu.com/c/e5b30935c054
知乎专栏:https://zhuanlan.zhihu.com/multimedia

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

流媒体程序员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值