ffmpeg <outfile>

Play, record, convert, and stream audio and video

Arguments

NameDescription
outfileOutput file

Options

NameDescription
-i <infile>
  • Required ✳
-LShow license
-h <topic>Show help
-? <topic>Show help
-help <topic>Show help
--help <topic>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 <device>List sources of the input device
-sinks <device>List sinks of the output device
-hwaccelsShow available HW acceleration methods
-loglevel <loglevel>Set logging level
-v <loglevel>Set logging level
-reportGenerate a report
-max_alloc <bytes>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 <maximum error rate>Ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success
-bits_per_raw_sample <number>Set the number of bits per raw sample
-vol <volume>Change audio volume (256=normal)
-cpuflags <flags>Force specific cpu flags
-hide_banner <hide_banner>Do not show program banner
-copy_unknownCopy unknown stream types
-benchmarkAdd timings for benchmarking
-benchmark_allAdd timings for each task
-progress <url>Write program-readable progress information
-stdinEnable or disable interaction on standard input
-timelimit <limit>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 <threshold>Audio drift threshold
-copytsCopy timestamps
-start_at_zeroShift input timestamps to start at 0 when using copyts
-copytb <mode>Copy input stream time base when stream copying
-dts_delta_threshold <threshold>Timestamp discontinuity delta threshold
-dts_error_threshold <threshold>Timestamp error delta threshold
-xerror <error>Exit on error
-abort_on <flags>Abort on the specified condition flags
-filter_complex <graph_description>Create a complex filtergraph
-lavfi <graph_description>Create a complex filtergraph
-filter_complex_script <filename>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 <file>Dump video coding statistics to file
-vstats_versionVersion of the vstats format to use
-qphistShow QP histogram
-vc <channel>Deprecated, use -channel
-tvstd <standard>Deprecated, use -standard
-isyncThis option is deprecated and does nothing
-sdp_file <file>Specify a file in which to print sdp information
-vaapi_device <device>Set VAAPI hardware device (DRM path or X11 display name)
-init_hw_device <args>Initialise hardware device
-filter_hw_device <device>Set hardware device used when filtering
-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_timestampEnable/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-")
-apadAudio 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_filterReinit filtergraph on input parameter changes
-discardDiscard
-dispositionDisposition
-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
-accurate_seekEnable/disable accurate seeking with -ss
-itsoffset <time_off>Set the input ts offset
-itsscale <scale>Set the input ts scale
-dframes <number>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 <fourcc/tag>Force codec tag/fourcc
-q <q>Use fixed quality scale (VBR)
-qscale <q>Use fixed quality scale (VBR)
-profile <profile>Set profile
-attach <filename>Add an attachment to the output file
-dump_attachment <filename>Extract an attachment into a file
-stream_loop <loop count>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 <seconds>Set the maximum demux-decode delay
-muxpreload <seconds>Set the initial demux-decode delay
-time_base <ratio>Set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5)
-enc_time_base <ratio>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 <bitstream_filters>A comma-separated list of bitstream filters
-fpre <filename>Set options from indicated preset file
-max_muxing_queue_size <packets>Maximum number of packets that can be buffered while waiting for all streams to initialize
-dcodec <codec>Force data codec ('copy' to copy stream)
-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)
-vnDisable 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)
-dnDisable data
-pix_fmt <format>Set pixel format
-rc_override <override>Rate control override for specific intervals
-passlogfile <prefix>Select two pass log file name prefix
-intra_matrix <matrix>Specify intra matrix coeffs
-inter_matrix <matrix>Specify inter matrix coeffs
-chroma_intra_matrix <matrix>Specify intra matrix coeffs
-topTop=1/bottom=0/auto=-1 field first
-vtag <fourcc/tag>Force video tag/fourcc
-force_fpsForce the selected framerate, disable the best supported framerate selection
-streamid <streamIndex:value>Set the value of an outfile streamid
-force_key_frames <timestamps>Force key frames at specified timestamps
-hwaccel <hwaccel name>Use HW accelerated decoding
-hwaccel_device <devicename>Select a device for HW acceleration
-hwaccel_output_format <format>Select output format used with HW accelerated decoding
-vbsf <video bitstream_filters>Deprecated
-vpre <preset>Set the video options to the indicated preset
-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
-anDisable audio
-acodec <codec>Force audio codec ('copy' to copy stream)
-af <filter_graph>Set audio filters
-atag <fourcc/tag>Force audio tag/fourcc
-sample_fmt <format>Set sample format
-channel_layout <layout>Set channel layout
-guess_layout_maxSet the maximum number of channels to try to guess the channel layout
-absf <audio bitstream_filters>Deprecated
-apre <preset>Set the audio options to the indicated preset
-snDisable subtitle
-scodec <codec>Force subtitle codec ('copy' to copy stream)
-stag <fourcc/tag>Force subtitle tag/fourcc
-fix_sub_durationFix subtitles duration
-canvas_size <size>Set canvas size (WxH or abbreviation)
-spre <preset>Set the subtitle options to the indicated preset