Loading AI tools
Multimedia framework From Wikipedia, the free encyclopedia
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 ffmpeg
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 being used to convert a file from the PNG file format to the WebP format | |
Original author(s) | Fabrice Bellard Bobby Bingham (libavfilter)[1] |
---|---|
Developer(s) | FFmpeg team |
Initial release | December 20, 2000[2] |
Stable release | |
Repository | git |
Written in | C and Assembly[4] |
Operating system | Various, including Windows, macOS, and Linux (executable programs are only available from third parties, as the project only distributes source code)[5][6] |
Platform | x86, ARM, PowerPC, MIPS, RISC-V, DEC Alpha, Blackfin, AVR32, SH-4, and SPARC; may be compiled for other desktop computers |
Type | Multimedia framework |
License | LGPL-2.1-or-later, GPL-2.0-or-later Unredistributable if compiled with any software with a license incompatible with the GPL[7] |
Website | ffmpeg |
FFmpeg also includes other tools: ffplay
, a simple media player, and ffprobe
, 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),[8] an audio/video container mux and demux library, and libavfilter, a library for enhancing and editing filters through a GStreamer-like filtergraph.[9]
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.[10] 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.[11]
The project was started by Fabrice Bellard[11] (using the pseudonym "Gérard Lantau") in 2000, and was led by Michael Niedermayer from 2004 until 2015.[12] Some FFmpeg developers were also part of the MPlayer project.
The name of the project is inspired by the MPEG video standards group, together with "FF" for "fast forward", so FFmpeg stands for "Fast Forward Moving Picture Experts Group".[13] The logo represents a zigzag scan pattern that shows how MPEG video codecs handle entropy encoding.[14]
On March 13, 2011, a group of FFmpeg developers decided to fork the project under the name Libav.[15][16][17] The event was related to an issue in project management, in which developers disagreed with the leadership of FFmpeg.[18][19][20]
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.[21]
In January 2018, the ffserver command-line program – a long-time component of FFmpeg – was removed.[22] The developers had previously deprecated the program citing high maintenance efforts due to its use of internal application programming interfaces.[23]
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 Git version control system.[24]
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.[25]
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.[26][27] Starting with version 0.6, FFmpeg also supported WebM and VP8.[28]
In October 2013, a native VP9[29] decoder and OpenHEVC, an open source High Efficiency Video Coding (HEVC) decoder, were added to FFmpeg.[30] 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.[31] Since version 3.4 "Cantor" FFmpeg supported the FITS image format.[32] Since November 2018 in version 4.1 "al-Khwarizmi" AV1 can be muxed in MP4 and Matroska incl. WebM.[33][34]
FFmpeg encompasses software implementations of video and audio compressing and decompressing algorithms. These can be compiled and run on diverse instruction sets.
Many widespread instruction sets are supported by FFmpeg, including x86 (IA-32 and x86-64), PPC (PowerPC), ARM, DEC Alpha, SPARC, and MIPS.[36]
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.[37]
Firm | ASIC | purpose | supported by FFmpeg | Details |
---|---|---|---|---|
AMD | UVD | decoding | ![]() | via VDPAU API and VAAPI |
VCE | encoding | ![]() | via VAAPI, considered experimental[38] | |
Amlogic | Amlogic Video Engine | decoding | ? | |
BlackMagic | DeckLink | encoding/decoding | ![]() | real-time ingest and playout |
Broadcom | Crystal HD | decoding | ![]() | |
Qualcomm | Hexagon | encoding/decoding | ![]() |
hwaccel[39] |
Intel | Intel Clear Video | decoding | ![]() | (libmfx, VAAPI) |
Intel Quick Sync Video | encoding/decoding | ![]() | (libmfx, VAAPI) | |
Nvidia | PureVideo / NVDEC | decoding | ![]() | via the VDPAU API as of FFmpeg v1.2 (deprecated) via CUVID API as of FFmpeg v3.1[40] |
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), 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.[41]
![]() | This section may be too technical for most readers to understand. (April 2023) |
FFmpeg supports many common and some uncommon image formats.
The PGMYUV image format is a homebrew variant of the binary (P5) PGM Netpbm format. FFmpeg also supports 16-bit depths of the PGM and PPM formats, and the binary (P7) PAM format with or without alpha channel, depth 8 bit or 16 bit for pix_fmts
monob, gray, gray16be, rgb24, rgb48be, ya8, rgba, rgb64be.
This section needs additional citations for verification. (July 2022) |
In addition to FFV1 and Snow formats, which were created and developed from within FFmpeg, the project also supports the following formats:
Group | Format type | Format name |
---|---|---|
ISO/IEC/ITU-T | Video | MPEG-1 Part 2, H.261 (Px64),[42] H.262/MPEG-2 Part 2, H.263,[42] MPEG-4 Part 2, H.264/MPEG-4 AVC, HEVC/H.265[30] (MPEG-H Part 2), MPEG-4 VCB (a.k.a. VP8), Motion JPEG, IEC DV video and CD+G |
Audio | MP1, MP2, MP3, AAC, HE-AAC, MPEG-4 ALS, G.711 μ-law, G.711 A-law, G.721 (a.k.a. G.726 32k), G.722, G.722.2 (a.k.a. AMR-WB), G.723 (a.k.a. G.726 24k and 40k), G.723.1, G.726, G.729, G.729D, IEC DV audio and Direct Stream Transfer | |
Subtitle | MPEG-4 Timed Text (a.k.a. 3GPP Timed Text) | |
Image | JPEG, Lossless JPEG, JPEG-LS, JPEG 2000, JPEG XL,[43] PNG, CCITT G3 and CCITT G4 | |
Alliance for Open Media | Video | AV1[44] |
Image | AVIF[45] | |
EIA | Subtitle | EIA-608 |
CEA | Subtitle | CEA-708 |
SMPTE | Video | SMPTE 314M (a.k.a. DVCAM and DVCPRO), SMPTE 370M (a.k.a. DVCPRO HD), VC-1 (a.k.a. WMV3), VC-2 (a.k.a. Dirac Pro), VC-3 (a.k.a. AVID DNxHD) |
Audio | SMPTE 302M | |
Image | DPX | |
ATSC/ETSI/DVB | Audio | Full Rate (GSM 06.10), AC-3 (Dolby Digital), Enhanced AC-3 (Dolby Digital Plus) and DTS Coherent Acoustics (a.k.a. DTS or DCA) |
Subtitle | DVB Subtitling (ETSI 300 743) | |
DVD Forum/Dolby | Audio | MLP / Dolby TrueHD |
Subtitle | DVD-Video subtitles | |
Xperi/DTS, Inc/QDesign | Audio | DTS Coherent Acoustics (a.k.a. DTS or DCA), DTS Extended Surround (a.k.a. DTS-ES), DTS 96/24, DTS-HD High Resolution Audio, DTS Express (a.k.a. DTS-HD LBR), DTS-HD Master Audio, QDesign Music Codec 1 and 2 |
Blu-ray Disc Association | Subtitle | PGS (Presentation Graphics Stream) |
3GPP | Audio | AMR-NB, AMR-WB (a.k.a. G.722.2) |
3GPP2 | Audio | QCELP-8 (a.k.a. SmartRate or IS-96C), QCELP-13 (a.k.a. PureVoice or IS-733) and Enhanced Variable Rate Codec (EVRC. a.k.a. IS-127) |
World Wide Web Consortium | Video | Animated GIF[46] |
Subtitle | WebVTT | |
Image | GIF, and SVG (via librsvg) | |
IETF | Video | FFV1 |
Audio | iLBC (via libilbc), Opus and Comfort noise | |
International Voice Association | Audio | DSS-SP |
SAC | Video | AVS video, AVS2 video[47] (via libdavs2), and AVS3 video (via libuavs3d) |
Microsoft | Video | Microsoft RLE, Microsoft Video 1, Cinepak, Microsoft MPEG-4 v1, v2 and v3, Windows Media Video (WMV1, WMV2, WMV3/VC-1), WMV Screen and Mimic codec |
Audio | Windows Media Audio (WMA1, WMA2, WMA Pro and WMA Lossless), XMA (XMA1 and XMA2),[48] MSN Siren, MS-GSM and MS-ADPCM | |
Subtitle | SAMI | |
Image | Windows Bitmap, WMV Image (WMV9 Image and WMV9 Image v2), DirectDraw Surface, and MSP[49] | |
Interactive Multimedia Association | Audio | IMA ADPCM |
Intel / Digital Video Interactive | Video | RTV 2.1 (Indeo 2), Indeo 3, 4 and 5,[42] and Intel H.263 |
Audio | DVI4 (a.k.a. IMA DVI ADPCM), Intel Music Coder, and Indeo Audio Coder | |
RealNetworks | Video | RealVideo Fractal Codec (a.k.a. Iterated Systems ClearVideo), 1, 2, 3 and 4 |
Audio | RealAudio v1 – v10, and RealAudio Lossless[50] | |
Subtitle | RealText | |
Apple / Spruce Technologies | Video | Cinepak (Apple Compact Video), ProRes, Sorenson 3 Codec, QuickTime Animation (Apple Animation), QuickTime Graphics (Apple Graphics), Apple Video, Apple Intermediate Codec and Pixlet[51] |
Audio | ALAC | |
Image | QuickDraw PICT | |
Subtitle | Spruce subtitle (STL) | |
Adobe Flash Player (SWF) | Video | Screen video, Screen video 2, Sorenson Spark and VP6 |
Audio | Adobe SWF ADPCM and Nellymoser Asao | |
Adobe / Aldus | Image | TIFF, PSD,[51] and DNG |
Xiph.Org | Video | Theora |
Audio | Speex,[52] Vorbis, Opus and FLAC | |
Subtitle | Ogg Writ | |
Sony | Audio | Adaptive Transform Acoustic Coding (ATRAC1, ATRAC3, ATRAC3Plus,[53] and ATRAC9[47])[42] and PSX ADPCM |
NTT | Audio | TwinVQ |
Google / On2 / GIPS | Video | Duck TrueMotion 1, Duck TrueMotion 2, Duck TrueMotion 2.0 Real Time, VP3, VP4,[54] VP5,[42] VP6,[42] VP7, VP8,[55] VP9[29] and animated WebP |
Audio | DK ADPCM Audio 3/4, On2 AVC and iLBC (via libilbc) | |
Image | WebP[56] | |
Epic Games / RAD Game Tools | Video | Smacker video and Bink video |
Audio | Bink audio | |
CRI Middleware | Audio | ADX ADPCM, and HCA |
Nintendo / NERD | Video | Mobiclip video |
Audio | GCADPCM (a.k.a. ADPCM THP), FastAudio, and ADPCM IMA MOFLEX | |
Synaptics / DSP Group | Audio | Truespeech |
Electronic Arts / Criterion Games / Black Box Games / Westwood Studios | Video | RenderWare TXD,[57] 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,[50] XPM and xwd |
HPE / SGI / Silicon Graphics | Video | Silicon Graphics RLE 8-bit video,[46] Silicon Graphics MVC1/2[46] |
Image | Silicon Graphics Image | |
Oracle/Sun Microsystems | Image | Sun Raster |
IBM | Video | IBM UltiMotion |
Avid Technology / Truevision | Video | Avid 1:1x, Avid Meridien,[50] Avid DNxHD, Avid DNx444,[53] and DNxHR |
Image | Targa[46] | |
Autodesk / Alias | Video | Autodesk Animator Studio Codec and FLIC |
Image | Alias PIX | |
Activision Blizzard / Activision / Infocom | Audio | ADPCM Zork |
Konami / Hudson Soft | Video | HVQM4 Video |
Audio | Konami MTAF, and ADPCM IMA HVQM4 | |
Grass Valley / Canopus | Video | HQ, HQA, HQX and Lossless |
Vizrt / NewTek | Video | SpeedHQ |
Image | Vizrt Binary Image[45] | |
Academy Software Foundation / ILM | Image | OpenEXR[50] |
Mozilla Corporation | Video | APNG[56] |
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[46] |
Bluetooth Special Interest Group | Audio | SBC, and mSBC |
Qualcomm / CSR | Audio | QCELP, aptX, and aptX HD |
Open Mobile Alliance / WAP Forum | Image | Wireless Bitmap |
Output formats (container formats and other ways of creating output streams) in FFmpeg are called "muxers". FFmpeg supports, among others, the following:
This section needs additional citations for verification. (July 2022) |
Type | Color | Packed | Planar | Palette | |||
---|---|---|---|---|---|---|---|
Without alpha | With alpha | Without alpha | With alpha | Chroma-interleaved | With alpha | ||
Monochrome | Binary (1-bit monochrome) | monoblack, monowhite | — | — | — | — | — |
Grayscale | 8/9/10/12/14/16bpp | — | — | 16/32bpp | — | — | |
RGB | RGB 1:2:1 (4-bit color) | 4bpp | — | — | — | — | — |
RGB 3:3:2 (8-bit color) | 8bpp | — | — | — | — | — | |
RGB 5:5:5 (High color) | 16bpp | — | — | — | — | — | |
RGB 5:6:5 (High color) | 16bpp | — | — | — | — | — | |
RGB/BGR | 24/30[p 1]/48bpp | 32[p 2]/64bpp | — | — | — | 8bit->32bpp | |
GBR[p 3] | — | — | 8/9/10/12/14/16bpc | 8/10/12/16bpc | — | — | |
RGB Float | RGB | 32bpc | 16/32bpc | — | — | — | — |
GBR | — | — | 32bpc | 32bpc | — | — | |
YUV | YVU 4:1:0 | — | — | (9bpp (YVU9))[p 4] | — | — | — |
YUV 4:1:0 | — | — | 9bpp | — | — | — | |
YUV 4:1:1 | 8bpc (UYYVYY) | — | 8bpc | — | (8bpc (NV11)) | — | |
YVU 4:2:0 | — | — | (8bpc (YV12))[p 4] | — | 8 (NV21) | — | |
YUV 4:2:0 | — | — | 8[p 5]/9/10/12/14/16bpc | 8/9/10/16bpc | 8 (NV12)/10 (P010)/12 (P012)/16bpc (P016) | — | |
YVU 4:2:2 | — | — | (8bpc (YV16))[p 4] | — | (8bpc (NV61)) | — | |
YUV 4:2:2 | 8 (YUYV[p 6] and UYVY)/10 (Y210)/12bpc (Y212)[p 7] | — | 8[p 8]/9/10/12/14/16bpc | 8/9/10/12/16bpc | 8 (NV16)/10 (NV20 and P210)/16bpc (P216) | — | |
YUV 4:4:0 | — | — | 8/10/12bpc | — | — | — | |
YVU 4:4:4 | — | — | (8bpc (YV24))[p 4] | — | 8bpc (NV42) | — | |
YUV 4:4:4 | 8 (VUYX)/10[p 9]/12bpc[p 10] | 8[p 11] / 16bpc (AYUV64)[p 12] | 8[p 13]/9/10/12/14/16bpc | 8/9/10/12/16bpc | 8 (NV24)/10 (P410)/ 16bpc (P416) | — | |
XYZ | XYZ 4:4:4[p 14] | 12bpc | — | — | — | — | — |
Bayer | BGGR/RGGB/GBRG/GRBG | 8/16bpp | — | — | — | — | — |
FFmpeg does not support IMC1-IMC4, AI44, CYMK, RGBE, Log RGB and other formats. It also does not yet support ARGB 1:5:5:5, 2:10:10:10, or other BMP bitfield formats that are not commonly used.
FFmpeg supports, among others, the following filters.[68]
FFmpeg supports the following devices via external libraries.[70]
FFmpeg contains more than 100 codecs,[71] 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.[72] 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.[73][original research] Patents for many older codecs, including AC3 and all MPEG-1 and MPEG-2 codecs, have expired.[citation needed]
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.
FFmpeg is used by software such as Blender, Cinelerra-GG Infinity, HandBrake, Kodi, MPC-HC, Plex, Shotcut, VirtualDub2 (a VirtualDub fork),[74] VLC media player, xine and YouTube.[75][76] It handles video and audio playback in Google Chrome[76] and the Linux version of Firefox.[77] GUI front-ends for FFmpeg have been developed, including Multimedia Xpert[78] and XMedia Recode.
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.[79]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.