ffmpeg
multimedia conversion and processing tool
TLDR
SYNOPSIS
ffmpeg [global-options] [input-options] -i input [output-options] output
DESCRIPTION
ffmpeg is the swiss army knife of multimedia processing. It converts, records, streams, and processes audio and video in virtually any format through an extensive codec library.The tool uses a powerful filter system for transformations like scaling, cropping, color correction, and effects. It handles everything from simple format conversion to complex streaming setups.ffmpeg forms the foundation of many video applications and is the de facto standard for command-line multimedia processing.
PARAMETERS
-i FILE
Input file (may be specified multiple times).-c:v CODEC
Video codec (e.g. libx264, libx265, libvpx-vp9, copy).-c:a CODEC
Audio codec (e.g. aac, libmp3lame, libopus, copy).-c CODEC
Shorthand for setting the codec of all streams (often used as `-c copy`).-crf N
Constant Rate Factor for x264/x265 (0-51, lower is better quality, 23 is the default).-b:v BITRATE
Target video bitrate (e.g. 2M).-b:a BITRATE
Target audio bitrate (e.g. 128k).-r FPS
Output frame rate.-s WxH
Set output frame size (e.g. 1280x720).-vf FILTER
Video filter graph (scale, crop, fps, etc.).-af FILTER
Audio filter graph.-ss TIME
Seek to start position. Used before `-i` for a fast seek, after `-i` for accurate seek.-to TIME
Stop writing at the given absolute time.-t DURATION
Limit output to the given duration.-vn
Disable video output.-an
Disable audio output.-map SPEC
Explicit stream mapping from inputs to outputs.-f FORMAT
Force container format.-y
Overwrite output files without asking.-n
Never overwrite output files.-loglevel LEVEL
Logging verbosity (quiet, panic, fatal, error, warning, info, verbose, debug, trace).-h [topic]
Display help; use `-h long` or `-h full` for more options.
CAVEATS
Complex syntax requires learning. Quality vs size tradeoffs vary by content. Some codecs have licensing considerations. Processing is CPU-intensive.
HISTORY
ffmpeg was started by Fabrice Bellard in 2000 and has become the most widely-used multimedia framework. It powers countless applications from VLC to YouTube's video processing pipeline.
