FFmpeg is a free and open-source software project consisting of a suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the command-line <code>ffmpeg</code> tool itself, designed for processing video and audio files. It is widely used for format transcoding, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance (SMPTE, ITU).

FFmpeg also includes other tools: <code>ffplay</code>, a simple media player, and <code>ffprobe</code>, a command-line tool to display media information. Among included libraries are libavcodec, an audio/video codec library used by many commercial and free software products, libavformat (Lavf), an audio/video container mux and demux library, and libavfilter, a library for enhancing and editing filters through a GStreamer-like filtergraph.

FFmpeg is part of the workflow of many other software projects, and its libraries are a core part of software media players such as VLC, and has been included in core processing for YouTube and Bilibili. Encoders and decoders for many audio and video file formats are included, making it highly useful for the transcoding of common and uncommon media files.

FFmpeg is published under the LGPL-2.1-or-later or GPL-2.0-or-later, depending on which options are enabled.

Project history

The project was started by Fabrice Bellard Some FFmpeg developers were also part of the MPlayer project.

The "FF" in FFmpeg stands for "fast forward." The logo represents a zigzag scan pattern that shows how MPEG video codecs handle entropy encoding.

On March 13, 2011, a group of FFmpeg developers decided to fork the project under the name Libav. The group decided to fork the project due to a disagreement with the leadership of FFmpeg.

Libav was declared abandoned in 2020.

On January 10, 2014, two Google employees announced that over 1000 bugs had been fixed in FFmpeg during the previous two years by means of fuzz testing.

In January 2018, the ffserver command-line program – a long-time component of FFmpeg – was removed. The developers had previously deprecated the program citing high maintenance efforts due to its use of internal application programming interfaces.

In April 2026, Anthropic's Claude Mythos Preview found a 16-year-old critical vulnerability in FFmpeg codec H.264.

The project publishes a new release every three months on average. While release versions are available from the website for download, FFmpeg developers recommend that users compile the software from source using the latest build from their source code, using the Git version control system.

Codec development

Two video coding formats with corresponding codecs and one container format have been created within the FFmpeg project so far. The two video codecs are the lossless FFV1, and the lossless and lossy Snow codec. Development of Snow has stalled, while its bit-stream format has not been finalized yet, making it experimental since 2011. The multimedia container format called NUT is no longer being actively developed, but still maintained.

In summer 2010, FFmpeg developers Fiona Glaser, Ronald Bultje, and David Conrad, announced the ffvp8 decoder. Through testing, they determined that ffvp8 was faster than Google's own libvpx decoder. Starting with version 0.6, FFmpeg also supported WebM and VP8.

In October 2013, a native VP9 decoder and OpenHEVC, an open source High Efficiency Video Coding (HEVC) decoder, were added to FFmpeg. In 2016 the native AAC encoder was considered stable, removing support for the two external AAC encoders from VisualOn and FAAC. FFmpeg 3.0 (nicknamed "Einstein") retained build support for the Fraunhofer FDK AAC encoder. Since version 3.4 "Cantor" FFmpeg supported the FITS image format. Since November 2018 in version 4.1 "al-Khwarizmi" AV1 can be muxed in MP4 and Matroska, including WebM.

Components

Command-line tools

  • ffmpeg is a command-line tool that converts audio or video formats. It can also capture and encode in real-time from various hardware and software sources such as a TV capture card.
  • ffplay is a simple media player utilizing SDL and the FFmpeg libraries.
  • ffprobe is a command-line tool to display media information (text, CSV, XML, JSON), see also MediaInfo.

Libraries

  • libswresample is a library containing audio resampling routines.
  • libavcodec is a library containing all of the native FFmpeg audio/video encoders and decoders. Most codecs were developed from scratch to ensure best performance and high code reusability.
  • libavformat (Lavf)

Special purpose hardware

There are a variety of application-specific integrated circuits (ASICs) for audio/video compression and decompression. These ASICs can partially or completely offload the computation from the host CPU. Instead of a complete implementation of an algorithm, only the API is required to use such an ASIC.

{| class="wikitable" style="text-align: center;"

! Firm !! ASIC !! purpose !! supported by FFmpeg !! Details

|-

| rowspan=2 | AMD || UVD ||decoding|| ||via VDPAU API and VAAPI

|-

| VCE ||encoding|| ||via VAAPI, considered experimental

|-

| Amlogic || Amlogic Video Engine ||decoding|| ||

|-

|BlackMagic

|DeckLink

|encoding/decoding || || real-time ingest and playout

|-

| Broadcom || Crystal HD ||decoding|| ||

|-

| Samsung || Exynos MFC||decoding|| ||

|-

|Qualcomm

|Hexagon

|encoding/decoding||

|hwaccel

|-

| rowspan=2 | Intel || Intel Clear Video ||decoding|| || (libmfx, VAAPI)

|-

| Intel Quick Sync Video ||encoding/decoding|| || (libmfx, VAAPI)

|-

| rowspan=2 | Nvidia || PureVideo / NVDEC ||decoding|| || via the VDPAU API as of FFmpeg v1.2 (deprecated)<br />via CUVID API as of FFmpeg v3.1

|-

| NVENC ||encoding|| || as of FFmpeg v2.6

|}

The following APIs are also supported: DirectX Video Acceleration (DXVA2, Windows), Direct3D 11 (D3D11VA, Windows), Media Foundation (Windows), Vulkan (VKVA), VideoToolbox (iOS, iPadOS, macOS), RockChip MPP, OpenCL, OpenMAX, MMAL (Raspberry Pi), MediaCodec (Android OS), V4L2 (Linux). Depending on the environment, these APIs may lead to specific ASICs, to GPGPU routines, or to SIMD CPU code. PNG, CCITT G3 and CCITT G4

|-

|rowspan=2 | Alliance for Open Media

|Video

|AV1

|-

|Image

|AVIF MSN Siren, MS-GSM and MS-ADPCM

|-

| Subtitle || SAMI

|-

| Image || Windows Bitmap, WMV Image (WMV9 Image and WMV9 Image v2), DirectDraw Surface, and MSP

|-

| Interactive Multimedia Association || Audio || IMA ADPCM

|-

| rowspan = 2 | Intel / Digital Video Interactive

| Video || RTV 2.1 (Indeo 2), Indeo 3, 4 and 5, and DNG

|-

| rowspan = 3 | Xiph.Org

| Video || Theora

|-

| Audio || Speex, Vorbis, Opus and FLAC

|-

| Subtitle || Ogg Writ

|-

| Sony

| Audio || Adaptive Transform Acoustic Coding (ATRAC1, ATRAC3, ATRAC3Plus, and ATRAC9) and PSX ADPCM

|-

| NTT || Audio || TwinVQ

|-

| rowspan = 3 | Google / On2 / GIPS || Video || Duck TrueMotion 1, Duck TrueMotion 2, Duck TrueMotion 2.0 Real Time, VP3, VP4, VP5, VP9 Madcow, CMV, TGV, TGQ, TQI, Midivid VQ (MVDV), MidiVid 3.0 (MV30), Midivid Archival (MVHA), and Vector Quantized Animation (VQA)

|-

| Audio || Electronic Arts ADPCM variants

|-

| Netpbm || Image || PBM, PGM, PPM, PNM, PAM, PFM and PHM

|-

| MIT/X Consortium/The Open Group || Image || XBM, XPM and xwd

|-

| rowspan = 2 | HPE / SGI / Silicon Graphics || Video || Silicon Graphics RLE 8-bit video,

|-

| Academy Software Foundation / ILM || Image || OpenEXR

|-

| Matrox || Video || Matrox Uncompressed SD (M101) / HD (M102)

|-

| AMD/ATI || Video || ATI VCR1/VCR2

|-

| Asus || Video || ASUS V1/V2 codec

|-

| Commodore || Video || CDXL codec

|-

| Kodak || Image || Photo CD

|-

| Blackmagic Design / Cintel || Image || Cintel RAW

|-

| Houghton Mifflin Harcourt / The Learning Company / ZSoft Corporation || Image || PCX

|-

| Australian National University || Image || X-Face

|-

| Bluetooth Special Interest Group || Audio || SBC, and mSBC

|-

| Qualcomm / CSR || Audio || QCELP, aptX, and aptX HD

|-

| Open Mobile Alliance / WAP Forum || Image || Wireless Bitmap

|}

Muxers

Output formats (container formats and other ways of creating output streams) in FFmpeg are called "muxers". FFmpeg supports, among others, the following:

  • AIFF
  • ASF
  • AVI and also input from AviSynth
  • BFI
  • CAF
  • FLV
  • GIF
  • GXF, General eXchange Format, SMPTE 360M
  • HLS, HTTP Live Streaming
  • IFF
  • ISO base media file format (including QuickTime, 3GP and MP4)
  • Matroska (including WebM)
  • Maxis XA
  • MPEG-DASH
  • MPEG program stream
  • MPEG transport stream (including AVCHD)
  • MXF, Material eXchange Format, SMPTE 377M
  • MSN Webcam stream
  • NUT
  • RL2
  • Segment, for creating segmented video streams
  • Smooth Streaming
  • TXD/48bpp || || || || ||

|-

| GBR || || || || || ||

|-

! rowspan=2 | RGB Float

| RGB || || || || || ||

|-

| GBR || || || || || ||

|-

! rowspan=10 | YUV

| YVU 4:1:0 || || || || || ||

|-

| YUV 4:1:0 || || || || || ||

|-

| YUV 4:1:1 || || || || || ||

|-

| YVU 4:2:0 || || || || || ||

|-

| YVU 4:2:2 || || || || || || || ||

|-

| YUV 4:4:0 || || || || || ||

|-

| YVU 4:4:4 || || || || || || || ||

|-

! XYZ

| XYZ 4:4:4 || || || || || ||

|-

! Bayer

| BGGR/RGGB/GBRG/GRBG || || || || || ||

|}

  • SFTP (via libssh)
  • Microsoft OSP:
  • CIFS/SMB (via libsmbclient) <!--Microsoft Open Specification [MS-CIFS], [MS-SMB] and [MS-SMB2]-->
  • MMS over TCP (MS-MMSP) <!--Microsoft Open Specification [MS-MMSP]-->
  • MMS over HTTP (MS-WMSP)
  • CENELEC
  • SAT&gt;IP
  • OASIS standards:
  • AMQP 0-9-1 (via librabbitmq)
  • SRT Alliance standard:
  • SRT (via libsrt)

De facto standards

  • RTSP over TLS
  • Icecast protocol
  • Adobe RTMP, RTMPT, RTMPE, RTMPTE and RTMPS
  • RealMedia RTSP/RDT
  • ZeroMQ (via libzmq)
  • RIST (librist)

Supported filters

FFmpeg supports, among others, the following filters.

Audio

  • Resampling (aresample)
  • Pass/Stop filters
  • Low-pass filter (lowpass)
  • High-pass filter (highpass)
  • All-pass filter (allpass)
  • Butterworth Band-pass filter (bandpass)
  • Butterworth Band-stop filter (bandreject)
  • Arbitrary Finite Impulse Response Filter (afir)
  • Arbitrary Infinite Impulse Response Filter (aiir)
  • Equalizer
  • Peak Equalizer (equalizer)
  • Butterworth/Chebyshev Type I/Type II Multiband Equalizer (anequalizer)
  • Low Shelving filter (bass)
  • High Shelving filter (treble)
  • Xbox 360 equalizer
  • FIR equalizer (firequalizer)
  • Biquad filter (biquad)
  • Remove/Add DC offset (dcshift)
  • Expression evaluation
  • Time domain expression evaluation (aeval)
  • Frequency domain expression evaluation (afftfilt)
  • Dynamics
  • Limiter (alimiter)
  • Compressor (acompressor)
  • Dynamic range expander ()
  • Side-chain Compressor (sidechaincompress)
  • Compander (compand)
  • Noise gate (agate)
  • Side-chain Noise gate(sidechaingate)
  • Distortion
  • Bitcrusher (acrusher)
  • Emphasis (aemphasis)
  • Amplify/Normalizer
  • Volume (volume)
  • Dynamic Audio Normalizer (dynaudnorm)
  • EBU R 128 loudness normalizer (loudnorm)
  • Modulation
  • Sinusoidal Amplitude Modulation (tremolo)
  • Sinusoidal Phase Modulation (vibrato)
  • Phaser (aphaser)
  • Chorus (chorus)
  • Flanger (flanger)
  • Pulsator (apulsator)
  • Echo/Reverb
  • Echo (aecho)
  • Routing/Panning
  • Stereo widening (stereowiden)
  • Increase channel differences (extrastereo)
  • M/S to L/R (stereotools)
  • Channel mapping (channelmap)
  • Channel splitting (channelsplit)
  • Channel panning (pan)
  • Channel merging (amerge)
  • Channel joining (join)<!--???-->
  • for Headphones
  • Stereo to Binaural (earwax, ported from SoX)
  • Bauer Stereo to Binaural (bs2b, via libbs2b)
  • Crossfeed (crossfeed)
  • Multi-channel to Binaural (sofalizer, requires libnetcdf)
  • Delay
  • Delay (adelay)
  • Delay by distance (compensationdelay)
  • Fade
  • Fader (afade)
  • Crossfader (acrossfade)
  • Audio time stretching and pitch scaling
  • Time stretching (atempo)
  • Time-stretching and Pitch-shifting (rubberband, via librubberband)
  • Editing
  • Trim (atrim)
  • Silence-padding (apad)
  • Silence remover (silenceremove)
  • Show frame/channel information
  • Show frame information (ashowinfo)
  • Show channel information (astats)
  • Show silence ranges (silencedetect)
  • Show audio volumes (volumedetect)
  • ReplayGain scanner (replaygain)
  • Modify frame/channel information
  • Set output format (aformat)
  • Set number of sample (asetnsamples)
  • Set sampling rate (asetrate)
  • Mixer (amix)
  • Synchronization (asyncts)
  • HDCD data decoder (hdcd)
  • Plugins
  • LADSPA (ladspa)
  • LV2 (lv2)
  • Do nothing ()

Video

  • Transformations
  • Cropping (crop, cropdetect)
  • Fading (fade)
  • Scaling (scale)
  • Padding (pad)
  • Rotation (rotate)
  • Transposition (transpose)
  • Others:
  • Lens correction (lenscorrection)
  • OpenCV filtering (ocv)
  • Perspective correction (perspective)
  • Temporal editing
  • Framerate (fps, framerate)
  • Looping (loop)
  • Trimming (trim)
  • Deinterlacing (bwdif, idet, kerndeint, nnedi, yadif, w3fdif)
  • Inverse Telecine
  • Filtering
  • Blurring (boxblur, gblur, avgblur, sab, smartblur)
  • Convolution filters
  • Convolution (convolution)
  • Edge detection (edgedetect)
  • Sobel Filter (sobel)
  • Prewitt Filter (prewitt)
  • Unsharp masking (unsharp)
  • Denoising (atadenoise, bitplanenoise, dctdnoiz, owdenoise, removegrain)
  • Logo removal (delogo, removelogo)
  • Subtitles (ASS, subtitles)
  • Alpha channel editing (alphaextract, alphamerge)
  • Keying (chromakey, colorkey, lumakey)
  • Frame detection
  • Black frame detection (blackdetect, blackframe)
  • Thumbnail selection (thumbnail)
  • Frame Blending (blend, tblend, overlay)
  • Video stabilization (vidstabdetect, vidstabtransform)
  • Color and Level adjustments
  • Balance and levels (colorbalance, colorlevels)
  • Channel mixing (colorchannelmixer)
  • Color space (colorspace)
  • Parametric adjustments (curves, eq)
  • Histograms and visualization
  • CIE Scope (ciescope)
  • Vectorscope (vectorscope)
  • Waveform monitor (waveform)
  • Color histogram (histogram)
  • Drawing
  • OCR
  • Quality measures
  • SSIM (ssim)
  • PSNR (psnr)
  • Lookup Tables
  • lut, lutrgb, lutyuv, lut2, lut3d, haldclut

Supported test patterns

  • SMPTE color bars (smptebars and smptehdbars)
  • EBU color bars (pal75bars and pal100bars)

Supported LUT formats

  • cineSpace LUT format
  • Iridas Cube
  • Adobe After Effects 3dl
  • DaVinci Resolve dat
  • Pandora m3d

Supported media and interfaces

FFmpeg supports the following devices via external libraries.

Media

  • Compact disc (via libcdio; input only)

Physical interfaces

  • IEEE 1394 (a.k.a. FireWire; via libdc1394 and libraw1394; input only)
  • IEC 61883 (via libiec61883; input only)
  • DeckLink
  • Brooktree video capture chip (via bktr driver; input only)

Audio IO

  • Advanced Linux Sound Architecture (ALSA)
  • Open Sound System (OSS)
  • PulseAudio
  • JACK Audio Connection Kit (JACK; input only)
  • OpenAL (input only)
  • sndio
  • Core Audio (for macOS)
  • AVFoundation (input only)
  • AudioToolbox (output only)

Video IO

  • Video4Linux2
  • Video for Windows (input only)
  • Windows DirectShow
  • Android Camera (input only)

Screen capture and output

  • Simple DirectMedia Layer 2 (output only)
  • OpenGL (output only)
  • Linux framebuffer (fbdev)
  • Graphics Device Interface (GDI; input only)
  • X Window System (X11; via XCB; input only)
  • X video extension (XV; via Xlib; output only)
  • Kernel Mode Setting (via libdrm; input only)

Others

  • ASCII art (via libcaca; output only)

Applications

FFmpeg contains more than 100 codecs, most of which use compression techniques of one kind or another. Many such compression techniques may be subject to legal claims relating to software patents. Such claims may be enforceable in countries like the United States which have implemented software patents, but are considered unenforceable or void in member countries of the European Union, for example. Patents for many older codecs, including AC3 and all MPEG-1 and MPEG-2 codecs, have expired.

FFmpeg is licensed under the LGPL license, but if a particular build of FFmpeg is linked against any GPL libraries (notably x264), then the entire binary is licensed under the GPL.

Projects using FFmpeg

FFmpeg is used by software such as Blender, Cinelerra-GG Infinity, HandBrake, Kodi, MPC-HC, Plex, Shotcut, VirtualDub2 (a VirtualDub fork), VLC media player, xine and YouTube. It handles video and audio playback in Chromium (and deliveries such as Google Chrome and Microsoft Edge) GUI front-ends for FFmpeg have been developed, including Multimedia Xpert, XMedia Recode and ShutterEncoder.

FFmpeg is used by ffdshow, FFmpegInterop, the GStreamer FFmpeg plug-in, LAV Filters and OpenMAX IL to expand the encoding and decoding capabilities of their respective multimedia platforms.

As part of NASA's Mars 2020 mission, FFmpeg is used by the Perseverance rover on Mars for image and video compression before footage is sent to Earth.

Embedded applications

FFmpeg is also being used in embedded applications, where it can be used with custom hardware to simplify version and dependency management and also to provide operating system abstraction across multiple different OS and processor manufacturers.

See also

  • MPlayer, a similar project
  • List of assembly software and tools
  • List of open-source codecs
  • List of video editing software

References