ffmpeg教程四 —— 选项详解

来源:互联网 发布:阿里云待遇 编辑:程序博客网 时间:2024/05/01 21:34

1.1         Ffmpeg选项详解

你可以使用:ffmpeg –help来获得选项内容

 

1.1.1    通用选项

-L license

-h 帮助

 

-fromats显示可用的格式,编解码的,协议的

-codecs 显示可用的编解码器

-bsfs     显示bit流过滤器

-protocols显示可用的协议

-pix_fmts显示可用的位图格式

-sample_fmts显示可用的音频采样格式

 

-loglevel loglevel set libav* logging level

-v loglevel        set libav* logging level

-debug flags       set debug flags

-fdebug flags      set debug flags

-report            generate a report

 

-f fmt强迫采用格式fmt

-i filename输入文件

-y 覆盖输出文件

-c编解码器名字

-t duration 设置纪录时间 hh:mm:ss[.xxx]格式的记录时间也支持

-ss position 搜索到指定的时间 [-]hh:mm:ss[.xxx]的格式也支持

-timestamp time 设置记录时间戳(‘now’指定当前时间)

 

-title string 设置标题

-author string 设置作者

-copyright string 设置版权

-comment string 设置评论

 

1.1.2    视频选项

-vframes number     设置记录的视频帧数

-r rate            设置帧率 (Hz value, fraction or abbreviation)

-s 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

-croptop size       Removed, use the crop filter instead

-cropbottom size    Removed, use the crop filter instead

-cropleft size      Removed, use the crop filter instead

-cropright size     Removed, use the crop filter instead

-padtop size        Removed, use the pad filter instead

-padbottom size     Removed, use the pad filter instead

-padleft size       Removed, use the pad filter instead

-padright size      Removed, use the pad filter instead

-padcolor color     Removed, use the pad filter instead

-vn               禁用视频

-vcodec codec       force video codec ('copy' to copy stream)

-sameq              use same quantizer as source (implies VBR)

-same_quant         use same quantizer as source (implies VBR)

-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.

-pass n             select the pass number (1 or 2)

-passlogfile prefix  select two pass log file name prefix

-vf filter list     video filters

-b bitrate         video bitrate (please use -b:v)

-dn                 disable data

1.1.3    高级视频选项

-pix_fmt format     设置位图格式

-intra              deprecated use -g 1

-vdt n              discard threshold

-rc_override override  rate control override for specific intervals

-deinterlace        this option is deprecated, use the yadif filter instead

-psnr               calculate PSNR of compressed frames

-vstats             dump video coding statistics to file

-vstats_file file   dump video coding statistics to file

-intra_matrix matrix  specify intra matrix coeffs

-inter_matrix matrix  specify inter matrix coeffs

-top                top=1/bottom=0/auto=-1 field first

-dc precision       intra_dc_precision

-vtag fourcc/tag    force video tag/fourcc

-qphist             show QP histogram

-force_fps          force the selected framerate, disable the best supported framerate selection

-force_key_frames timestamps  force key frames at specified timestamps

-vbsf video bitstream_filters  deprecated

-vpre preset        set the video options to the indicated preset

1.1.4    音频选项

-aframes number     set the number of audio frames to record

-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 list     audio filters

1.1.5    音频/视频捕获选项

-vc channel         deprecated, use -channel

-tvstd standard     deprecated, use -standard

-isync              sync read on input

-vd device 设置视频捕获设备。比如/dev/video0

-dv1394 设置DV1394捕获

-av device 设置音频设备比如/dev/dsp

 

1.1.6    高级选项

-cpuflags flags     force specific cpu flags

-map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_s  set input stream mapping

-map_channel file.stream.channel[:syncfile.syncstream]  map an audio channel from one stream to another

-map_chapters input_file_index  set chapters mapping

-benchmark          add timings for benchmarking

-benchmark_all      add timings for each task

-progress url       write program-readable progress information

-dump               dump 每个输入包

-hex                dumping包时,也dump其荷载

-re                 read input at native frame rate

-vsync              video sync method

-async              audio sync method

-adrift_threshold threshold  audio drift threshold

-copyts             copy timestamps

-copytb mode        copy input stream time base when stream copying

-shortest           finish encoding within shortest input

-dts_delta_threshold threshold  timestamp discontinuity delta threshold

-dts_error_threshold threshold  timestamp error delta threshold

-copyinkf           copy initial non-keyframes

-q q                use fixed quality scale (VBR)

-qscale q           use fixed quality scale (VBR)

-profile profile    set profile

-filter_complex graph_description  create a complex filtergraph

-debug_ts           打印调试信息时间戳

-streamid streamIndex:value  set the value of an outfile streamid

-muxdelay seconds   set the maximum demux-decode delay

-muxpreload seconds  set the initial demux-decode delay

-fpre filename      set options from indicated preset file

原创粉丝点击