Skip to content

Instantly share code, notes, and snippets.

@desaperados
Created August 7, 2012 22:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desaperados/3290126 to your computer and use it in GitHub Desktop.
Save desaperados/3290126 to your computer and use it in GitHub Desktop.
FFmpeg options
Main options:
-L show license
-h show help
-? show help
-help show help
--help show help
-version show version
-formats show available formats
-codecs show available codecs
-bsfs show available bit stream filters
-protocols show available protocols
-filters show available filters
-pix_fmts show available pixel formats
-sample_fmts show available audio sample formats
-loglevel loglevel set libav* logging level
-v loglevel set libav* logging level
-debug flags set debug flags
-report generate a report
-max_alloc bytes set maximum size of a single allocated block
-f fmt force format
-i filename input file name
-y overwrite output files
-n do not overwrite output files
-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
-fs limit_size set the limit file size in bytes
-ss time_off set the start time offset
-itsoffset time_off set the input ts offset
-itsscale scale set the input ts scale
-timestamp time set the recording timestamp ('now' to set the current time)
-metadata string=string add metadata
-dframes number set the number of data frames to record
-timelimit limit set max runtime in seconds
-target type specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)
-xerror exit on error
-frames number set the number of frames to record
-tag fourcc/tag force codec tag/fourcc
-filter filter_list set stream filterchain
-stats print progress report during encoding
-attach filename add an attachment to the output file
-dump_attachment filename extract an attachment into a file
-bsf bitstream_filters A comma-separated list of bitstream filters
-dcodec codec force data codec ('copy' to copy stream)
Advanced options:
-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
-dump dump each input packet
-hex when dumping packets, also dump the payload
-re read input at native frame rate
-loop_input deprecated, use -loop
-loop_output deprecated, use -loop
-vsync video sync method
-async audio sync method
-adrift_threshold threshold audio drift threshold
-copyts copy timestamps
-copytb source copy input stream time base when stream copying
-shortest finish encoding within shortest input
-dts_delta_threshold threshold timestamp discontinuity delta threshold
-copyinkf copy initial non-keyframes
-q q use fixed quality scale (VBR)
-qscale q use fixed quality scale (VBR)
-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
Video options:
-vframes number set the number of video frames to record
-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
-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 disable video
-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)
-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
Advanced Video options:
-pix_fmt format set pixel format
-intra use only intra frames
-vdt n discard threshold
-rc_override override rate control override for specific intervals
-deinterlace deinterlace pictures
-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
Audio options:
-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)
-rmvol volume rematrix volume (as factor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment