ffmpeg在做音视频编解码时非常方便,所以很多场景下转码使用的是ffmpeg,铜鼓通过ffmpeg -help命令操作可以看到ffmpeg常见的命令大概分为六部分:
ffmpeg信息查询部分
公共做操参数部分
文件主要操作参数部分
视频操作参数部分
音频操作参数部分
字幕操作参数部分 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万多行,以下为部分节选内容:
【学习地址】:FFmpeg/WebRTC/RTMP/NDK/Android音视频流媒体高级开发
【文章福利】:免费领取更多音视频学习资料包、大厂面试题、技术视频和学习路线图,资料包括(C/C++,Linux,FFmpeg webRTC rtmp hls rtsp ffplay srs 等等)有需要的可以点击1079654574加群领取哦~
AVCodecContext相关
AVCodecContext AVOptions:
-b E..VA.... set bitrate (in bits/s) (from 0 to I64_MAX) (default 200000)
-ab E...A.... set bitrate (in bits/s) (from 0 to INT_MAX) (default 128000)
-bt 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 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 E..V..... set the group of picture (GOP) size (from INT_MIN to INT_MAX) (default 12)
-ar ED..A.... set audio sampling rate (in Hz) (from 0 to INT_MAX) (default 0)
-ac ED..A.... set number of audio channels (from 0 to INT_MAX) (default 0)
-cutoff E...A.... set cutoff bandwidth (from INT_MIN to INT_MAX) (default 0)
-frame_size E...A.... (from 0 to INT_MAX) (default 0)
-qcomp 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 E..V..... video quantizer scale blur (VBR) (from -1 to FLT_MAX) (default 0.5)
-qmin E..V..... minimum video quantizer scale (VBR) (from -1 to 69) (default 2)
-qmax E..V..... maximum video quantizer scale (VBR) (from -1 to 1024) (default 31)
-qdiff E..V..... maximum difference between the quantizer scales (VBR) (from INT_MIN to INT_MAX) (default 3)
-bf E..V..... set maximum number of B-frames between non-B-frames (from -1 to INT_MAX) (default 0)
-b_qfactor E..V..... QP factor between P- and B-frames (from -FLT_MAX to FLT_MAX) (default 1.25)
-b_strategy E..V..... strategy to choose between I/P/B-frames (from INT_MIN to INT_MAX) (default 0)
-ps E..V..... RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)
-bug .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 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 E..V..... QP offset between P- and B-frames (from -FLT_MAX to FLT_MAX) (default 1.25)
-err_detect .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 E..V..... use MPEG quantizers instead of H.263 (from INT_MIN to INT_MAX) (default 0)
-maxrate E..VA.... maximum bitrate (in bits/s). Used for VBV together with bufsize. (from 0 to INT_MAX) (default 0)
-minrate 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 E..VA.... set ratecontrol buffer size (in bits) (from INT_MIN to INT_MAX) (default 0)
-i_qfactor E..V..... QP factor between P- and I-frames (from -FLT_MAX to FLT_MAX) (default -0.8)
-i_qoffset E..V..... QP offset between P- and I-frames (from -FLT_MAX to FLT_MAX) (default 0)
-dct 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 E..V..... compresses bright areas stronger than medium ones (from -FLT_MAX to FLT_MAX) (default 0)
-tcplx_mask E..V..... temporal complexity masking (from -FLT_MAX to FLT_MAX) (default 0)
-scplx_mask E..V..... spatial complexity masking (from -FLT_MAX to FLT_MAX) (default 0)
-p_mask E..V..... inter masking (from -FLT_MAX to FLT_MAX) (default 0)
-dark_mask E..V..... compresses dark areas stronger than medium ones (from -FLT_MAX to FLT_MAX) (default 0)
-idct 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 .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 E..V..... prediction method (from INT_MIN to INT_MAX) (default left)
left E..V.....
plane E..V.....
median E..V.....
-aspect E..V..... sample aspect ratio (from 0 to 10) (default 0/1)
-sar E..V..... sample aspect ratio (from 0 to 10) (default 0/1)
-debug 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 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 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 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 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 E..V..... diamond type & size for motion estimation (from INT_MIN to INT_MAX) (default 0)
-last_pred E..V..... amount of motion predictors from the previous frame (from INT_MIN to INT_MAX) (default 0)
-preme E..V..... pre motion estimation (from INT_MIN to INT_MAX) (default 0)
-precmp 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 E..V..... diamond type & size for motion estimation pre-pass (from INT_MIN to INT_MAX) (default 0)
-subq E..V..... sub-pel motion estimation quality (from INT_MIN to INT_MAX) (default 8)
-me_range E..V..... limit motion vectors range (1023 for DivX player) (from INT_MIN to INT_MAX) (default 0)
-global_quality E..VA.... (from INT_MIN to INT_MAX) (default 0)
-coder 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 E..V..... context model (from INT_MIN to INT_MAX) (default 0)
-mbd 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 E..V..... scene change threshold (from INT_MIN to INT_MAX) (default 0)
-nr E..V..... noise reduction (from INT_MIN to INT_MAX) (default 0)
-rc_init_occupancy 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 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 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 E..V..... intra_dc_precision (from -8 to 16) (default 0)
-nssew E..V..... nsse weight (from INT_MIN to INT_MAX) (default 8)
-skip_top .D.V..... number of macroblock rows at the top which are skipped (from INT_MIN to INT_MAX) (default 0)
-skip_bottom .D.V..... number of macroblock rows at the bottom which are skipped (from INT_MIN to INT_MAX) (default 0)
-profile 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 E..VA.... (from INT_MIN to INT_MAX) (default unknown)
unknown E..VA....
-lowres .D.VA.... decode at 1= 1/2, 2=1/4, 3=1/8 resolutions (from 0 to INT_MAX) (default 0)
-skip_threshold E..V..... frame skip threshold (from INT_MIN to INT_MAX) (default 0)
-skip_factor E..V..... frame skip factor (from INT_MIN to INT_MAX) (default 0)
-skip_exp E..V..... frame skip exponent (from INT_MIN to INT_MAX) (default 0)
-skipcmp 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 E..V..... minimum macroblock Lagrange factor (VBR) (from 1 to 32767) (default 236)
-mblmax E..V..... maximum macroblock Lagrange factor (VBR) (from 1 to 32767) (default 3658)
-mepc E..V..... motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)
-skip_loop_filter .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 .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 .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 E..V..... refine the two motion vectors used in bidirectional macroblocks (from 0 to 4) (default 1)
-brd_scale E..V..... downscale frames for dynamic B-frame decision (from 0 to 10) (default 0)
-keyint_min E..V..... minimum interval between IDR-frames (from INT_MIN to INT_MAX) (default 25)
-refs E..V..... reference frames to consider for motion compensation (from INT_MIN to INT_MAX) (default 1)
-chromaoffset E..V..... chroma QP offset from luma (from INT_MIN to INT_MAX) (default 0)
-trellis E..VA.... rate-distortion optimal quantization (from INT_MIN to INT_MAX) (default 0)
-mv0_threshold E..V..... (from 0 to INT_MAX) (default 256)
-b_sensitivity E..V..... adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)
-compression_level E..VA.... (from INT_MIN to INT_MAX) (default -1)
-min_prediction_order E...A.... (from INT_MIN to INT_MAX) (default -1)
-max_prediction_order E...A.... (from INT_MIN to INT_MAX) (default -1)
-timecode_frame_start E..V..... GOP timecode frame start number, in non-drop-frame format (from -1 to I64_MAX) (default -1)
-channel_layout ED..A.... (from 0 to 1.84467e+19) (default 0)
-request_channel_layout .D..A.... (from 0 to 1.84467e+19) (default 0)
-rc_max_vbv_use E..V..... (from 0 to FLT_MAX) (default 0)
-rc_min_vbv_use E..V..... (from 0 to FLT_MAX) (default 3)
-ticks_per_frame ED.VA.... (from 1 to INT_MAX) (default 1)
-color_primaries 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 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 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 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 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 E..V..... set the number of slices, used in parallelized encoding (from 0 to INT_MAX) (default 0)
-thread_type ED.VA.... select multithreading type (default slice+frame)
slice ED.V.....
frame ED.V.....
-audio_service_type 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 .D..A.... sample format audio decoders should prefer (default none)
-sub_charenc .D...S... set input text subtitles character encoding
-sub_charenc_mode .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 .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 .D.VA.... (default false)
-side_data_only_packets E..VA.... (default true)
-apply_cropping .D.V..... (default true)
-skip_alpha .D.V..... Skip processing alpha (default false)
-field_order 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 ED.VAS... set information dump field separator
-codec_whitelist .D.VAS... List of decoders that are allowed to be used
-max_pixels ED.VAS... Maximum number of pixels (from 0 to INT_MAX) (default INT_MAX)
-hwaccel_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 .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 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 E...A.... Force M/S stereo coding (default auto)
-aac_is E...A.... Intensity stereo coding (default true)
-aac_pns E...A.... Perceptual noise substitution (default true)
-aac_tns E...A.... Temporal noise shaping (default true)
-aac_ltp E...A.... Long term prediction (default false)
-aac_pred E...A.... AAC-Main prediction (default false)
-aac_pce E...A.... Forces the use of PCEs (default false)
libmp3lame encoder 相关
libmp3lame encoder AVOptions:
-reservoir E...A.... use bit reservoir (default true)
-joint_stereo E...A.... use joint stereo (default true)
-abr E...A.... use ABR (default false)
libx264相关
libx264 AVOptions:
-preset E..V..... Set the encoding preset (cf. x264 --fullhelp) (default "medium")
-tune E..V..... Tune the encoding params (cf. x264 --fullhelp)
-profile E..V..... Set profile restrictions (cf. x264 --fullhelp)
-fastfirstpass E..V..... Use fast settings when encoding first pass (default true)
-level E..V..... Specify level (as defined by Annex A)
-passlogfile E..V..... Filename for 2 pass stats
-wpredp E..V..... Weighted prediction for P-frames
-a53cc E..V..... Use A53 Closed Captions (if available) (default true)
-x264opts E..V..... x264 options
-crf E..V..... Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)
-crf_max E..V..... In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)
-qp E..V..... Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)
-aq-mode 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 E..V..... AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)
-psy E..V..... Use psychovisual optimizations. (default auto)
-psy-rd E..V..... Strength of psychovisual optimization, in : format.
-rc-lookahead E..V..... Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)
-weightb E..V..... Weighted prediction for B-frames. (default auto)
-weightp E..V..... Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)
none E..V.....
simple E..V.....
smart E..V.....
-ssim E..V..... Calculate and print SSIM stats. (default auto)
-intra-refresh E..V..... Use Periodic Intra Refresh instead of IDR frames. (default auto)
-bluray-compat E..V..... Bluray compatibility workarounds. (default auto)
-b-bias E..V..... Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)
-b-pyramid 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 E..V..... One reference per partition, as opposed to one reference per macroblock (default auto)
-8x8dct E..V..... High profile 8x8 transform. (default auto)
-fast-pskip E..V..... (default auto)
-aud E..V..... Use access unit delimiters. (default auto)
-mbtree E..V..... Use macroblock tree ratecontrol. (default auto)
-deblock E..V..... Loop filter parameters, in form.
-cplxblur E..V..... Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)
-partitions E..V..... A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all
-direct-pred 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 E..V..... Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)
-stats E..V..... Filename for 2 pass stats
-nal-hrd 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 E..V..... AVC-Intra class 50/100/200 (from -1 to 200) (default -1)
-me_method 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 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 E..V..... If forcing keyframes, force them as IDR frames. (default false)
-coder 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 E..V..... Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)
-chromaoffset E..V..... QP difference between chroma and luma (from INT_MIN to INT_MAX) (default -1)
-sc_threshold E..V..... Scene change threshold (from INT_MIN to INT_MAX) (default -1)
-noise_reduction E..V..... Noise reduction (from INT_MIN to INT_MAX) (default -1)
-x264-params E..V..... Override the x264 configuration using a :-separated list of key=value parameters