ffmpeg <command>

Play, record, convert, and stream audio and video

Arguments

NameDescription
commandOutput file

Options

NameDescription
-i <command>
  • Required ✳
-LShow license
-h <command>Show help
-? <command>Show help
-help <command>Show help
--help <command>Show help
-versionShow version
-buildconfShow build configuration
-formatsShow available formats
-muxersShow available muxers
-demuxersShow available demuxers
-devicesShow available devices
-codecsShow available codecs
-decodersShow available decoders
-encodersShow available encoders
-bsfsShow available bit stream filters
-protocolsShow available protocols
-filtersShow available filters
-pix_fmtsShow available pixel formats
-layoutsShow standard channel layouts
-sample_fmtsShow available audio sample formats
-colorsShow available color names
-sources <command>List sources of the input device
-sinks <command>List sinks of the output device
-hwaccelsShow available HW acceleration methods
-loglevel <command>Set logging level
-v <command>Set logging level
-reportGenerate a report
-max_alloc <command>Set maximum size of a single allocated block
-yOverwrite output files
-nNever overwrite output files
-ignore_unknownIgnore unknown stream types
-filter_threadsNumber of non-complex filter threads
-filter_complex_threadsNumber of threads for -filter_complex
-statsPrint progress report during encoding
-max_error_rate <command>Ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success
-bits_per_raw_sample <command>Set the number of bits per raw sample
-vol <command>Change audio volume (256=normal)
-cpuflags <command>Force specific cpu flags
-hide_banner <command>Do not show program banner
-copy_unknownCopy unknown stream types
-benchmarkAdd timings for benchmarking
-benchmark_allAdd timings for each task
-progress <command>Write program-readable progress information
-stdinEnable or disable interaction on standard input
-timelimit <command>Set max runtime in seconds
-dumpDump each input packet
-hexWhen dumping packets, also dump the payload
-vsyncVideo sync method
-frame_drop_thresholdFrame drop threshold
-asyncAudio sync method
-adrift_threshold <command>Audio drift threshold
-copytsCopy timestamps
-start_at_zeroShift input timestamps to start at 0 when using copyts
-copytb <command>Copy input stream time base when stream copying
-dts_delta_threshold <command>Timestamp discontinuity delta threshold
-dts_error_threshold <command>Timestamp error delta threshold
-xerror <command>Exit on error
-abort_on <command>Abort on the specified condition flags
-filter_complex <command>Create a complex filtergraph
-lavfi <command>Create a complex filtergraph
-filter_complex_script <command>Read complex filtergraph description from a file
-debug_tsPrint timestamp debugging info
-intraDeprecated use -g 1
-sameqRemoved
-same_quantRemoved
-deinterlaceThis option is deprecated, use the yadif filter instead
-psnrCalculate PSNR of compressed frames
-vstatsDump video coding statistics to file
-vstats_file <command>Dump video coding statistics to file
-vstats_versionVersion of the vstats format to use
-qphistShow QP histogram
-vc <command>Deprecated, use -channel
-tvstd <command>Deprecated, use -standard
-isyncThis option is deprecated and does nothing
-sdp_file <command>Specify a file in which to print sdp information
-vaapi_device <command>Set VAAPI hardware device (DRM path or X11 display name)
-init_hw_device <command>Initialise hardware device
-filter_hw_device <command>Set hardware device used when filtering
-f <command>Force format
-c <command>Codec name
-codec <command>Codec name
-pre <command>Preset name
-map_metadata <command>Set metadata information of outfile from infile
-t <command>Record or transcode "duration" seconds of audio/video
-to <command>Record or transcode stop time
-fs <command>Set the limit file size in bytes
-ss <command>Set the start time offset
-sseof <command>Set the start time offset relative to EOF
-seek_timestampEnable/disable seeking by timestamp with -ss
-timestamp <command>Set the recording timestamp ('now' to set the current time)
-metadata <command>Add metadata
-program <command>Add program with specified streams
-target <command>Specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-")
-apadAudio pad
-frames <command>Set the number of frames to output
-filter <command>Set stream filtergraph
-filter_script <command>Read stream filtergraph description from a file
-reinit_filterReinit filtergraph on input parameter changes
-discardDiscard
-dispositionDisposition
-map <command>Set input stream mapping
-map_channel <command>Map an audio channel from one stream to another
-map_chapters <command>Set chapters mapping
-accurate_seekEnable/disable accurate seeking with -ss
-itsoffset <command>Set the input ts offset
-itsscale <command>Set the input ts scale
-dframes <command>Set the number of data frames to output
-reRead input at native frame rate
-shortestFinish encoding within shortest input
-bitexactBitexact mode
-copyinkfCopy initial non-keyframes
-copypriorssCopy or discard frames before start time
-tag <command>Force codec tag/fourcc
-q <command>Use fixed quality scale (VBR)
-qscale <command>Use fixed quality scale (VBR)
-profile <command>Set profile
-attach <command>Add an attachment to the output file
-dump_attachment <command>Extract an attachment into a file
-stream_loop <command>Set number of times input stream shall be looped
-thread_queue_sizeSet the maximum number of queued packets from the demuxer
-find_stream_infoRead and decode the streams to fill missing information with heuristics
-autorotateAutomatically insert correct rotate filters
-muxdelay <command>Set the maximum demux-decode delay
-muxpreload <command>Set the initial demux-decode delay
-time_base <command>Set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)
-enc_time_base <command>Set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). two special values are defined - 0 = use frame rate (video) or sample rate (audio),-1 = match source time base
-bsf <command>A comma-separated list of bitstream filters
-fpre <command>Set options from indicated preset file
-max_muxing_queue_size <command>Maximum number of packets that can be buffered while waiting for all streams to initialize
-dcodec <command>Force data codec ('copy' to copy stream)
-vframes <command>Set the number of video frames to output
-r <command>Set frame rate (Hz value, fraction or abbreviation)
-s <command>Set frame size (WxH or abbreviation)
-aspect <command>Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-vnDisable video
-vcodec <command>Force video codec ('copy' to copy stream)
-timecode <command>Set initial TimeCode value
-pass <command>Select the pass number (1 to 3)
-vf <command>Set video filters
-ab <command>Audio bitrate (please use -b:a)
-b <command>Video bitrate (please use -b:v)
-dnDisable data
-pix_fmt <command>Set pixel format
-rc_override <command>Rate control override for specific intervals
-passlogfile <command>Select two pass log file name prefix
-intra_matrix <command>Specify intra matrix coeffs
-inter_matrix <command>Specify inter matrix coeffs
-chroma_intra_matrix <command>Specify intra matrix coeffs
-topTop=1/bottom=0/auto=-1 field first
-vtag <command>Force video tag/fourcc
-force_fpsForce the selected framerate, disable the best supported framerate selection
-streamid <command>Set the value of an outfile streamid
-force_key_frames <command>Force key frames at specified timestamps
-hwaccel <command>Use HW accelerated decoding
-hwaccel_device <command>Select a device for HW acceleration
-hwaccel_output_format <command>Select output format used with HW accelerated decoding
-vbsf <command>Deprecated
-vpre <command>Set the video options to the indicated preset
-aframes <command>Set the number of audio frames to output
-aq <command>Set audio quality (codec-specific)
-ar <command>Set audio sampling rate (in Hz)
-ac <command>Set number of audio channels
-anDisable audio
-acodec <command>Force audio codec ('copy' to copy stream)
-af <command>Set audio filters
-atag <command>Force audio tag/fourcc
-sample_fmt <command>Set sample format
-channel_layout <command>Set channel layout
-guess_layout_maxSet the maximum number of channels to try to guess the channel layout
-absf <command>Deprecated
-apre <command>Set the audio options to the indicated preset
-snDisable subtitle
-scodec <command>Force subtitle codec ('copy' to copy stream)
-stag <command>Force subtitle tag/fourcc
-fix_sub_durationFix subtitles duration
-canvas_size <command>Set canvas size (WxH or abbreviation)
-spre <command>Set the subtitle options to the indicated preset