free and open-source software
Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
project consisting of a suite of
libraries
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
multimedia
Multimedia is a form of communication that uses a combination of different content forms, such as Text (literary theory), writing, Sound, audio, images, animations, or video, into a single presentation. T ...
files and streams. At its core is the command-lineffmpeg tool itself, designed for processing video and audio files. It is widely used for format transcoding, basic editing (trimming and
concatenation
In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalizations of concatenati ...
), video scaling, video post-production effects, and standards compliance ( SMPTE, ITU).
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
A codec is a computer hardware or software component that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder.
In electronic communications, an endec is a device that acts as both an encoder and a decoder o ...
library used by many commercial and free software products, libavformat (Lavf), an audio/video
container
A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping.
Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
mux and demux library, and libavfilter, a library for enhancing and editing filters through a
GStreamer
GStreamer is a Pipeline (computing), pipeline-based multimedia framework that links together a wide variety of media processing systems to complete complex workflows. For instance, GStreamer can be used to build a system that reads files in one f ...
-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
YouTube is an American social media and online video sharing platform owned by Google. YouTube was founded on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim who were three former employees of PayPal. Headquartered in ...
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.
pseudonym
A pseudonym (; ) or alias () is a fictitious name that a person assumes for a particular purpose, which differs from their original or true meaning ( orthonym). This also differs from a new name that entirely or legally replaces an individual's o ...
"Gérard Lantau") in 2000, and was led by Michael Niedermayer from 2004 until 2015. Some FFmpeg developers were also part of the
MPlayer
MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable Desktop, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A ...
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
In information theory, an entropy coding (or entropy encoding) is any lossless data compression method that attempts to approach the lower bound declared by Shannon's source coding theorem, which states that any lossless data compression method ...
.
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.
Despite an initial push in Debian and derived distributions, Libav was considered inferior to FFmpeg in both technical merit and popularity, prompting Debian and Gentoo to switch back to FFmpeg in 2015.
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 interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
s.
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
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
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
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
,
JSON
JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
* ''libswresample'' is a library containing audio resampling routines.
* ''libavresample'' is a library containing audio resampling routines from the Libav project, similar to ''libswresample'' from ''ffmpeg''.
* '' 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) is a library containing demuxers and muxers for audio/video container formats.
* ''libavutil'' is a helper library containing routines common to different parts of FFmpeg. This library includes hash functions, ciphers, LZO decompressor and
Base64
In computer programming, Base64 is a group of binary-to-text encoding schemes that transforms binary data into a sequence of printable characters, limited to a set of 64 unique characters. More specifically, the source binary data is taken 6 bits ...
encoder/decoder.
* ''libpostproc'' is a library containing older H.263 based video postprocessing routines.
* ''libswscale'' is a library containing video image scaling and colorspace/pixelformat conversion routines.
* ''libavfilter'' is the substitute for vhook which allows the video/audio to be modified or examined (for debugging) between the decoder and the encoder. Filters have been ported from many projects including
MPlayer
MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable Desktop, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A ...
and avisynth.
* ''libavdevice'' is a library containing audio/video io through internal and external devices.
Supported hardware
CPUs
FFmpeg encompasses software implementations of video and audio compressing and decompressing algorithms. These can be compiled and run on many different instruction sets, including x86 (
IA-32
IA-32 (short for "Intel Architecture, 32-bit", commonly called ''i386'') is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the i386, 80386 microprocessor in 1985. IA-32 is the first incarn ...
and
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
), PPC (
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
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
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
is required to use such an ASIC.
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
OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
, OpenMAX, MMAL (Raspberry Pi), MediaCodec ( Android OS), V4L2 (Linux). Depending on the environment, these APIs may lead to specific ASICs, to
GPGPU
General-purpose computing on graphics processing units (GPGPU, or less often GPGP) is the use of a graphics processing unit (GPU), which typically handles computation only for computer graphics, to perform computation in applications traditiona ...
routines, or to
SIMD
Single instruction, multiple data (SIMD) is a type of parallel computer, parallel processing in Flynn's taxonomy. SIMD describes computers with multiple processing elements that perform the same operation on multiple data points simultaneousl ...
CPU code.
Supported codecs and formats
Image formats
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''.
Supported formats
In addition to FFV1 and Snow formats, which were created and developed from within FFmpeg, the project also supports the following formats:
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
The Graphics Interchange Format (GIF; or , ) is a Raster graphics, bitmap Image file formats, image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released ...
* GXF, General eXchange Format, SMPTE 360M
* HLS, HTTP Live Streaming
*
IFF
In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either both ...
MPEG program stream
Program stream (PS or MPEG-PS) is a container format (digital), container format for multiplexing digital audio, video and more. The PS format is specified in MPEG-1 Part 1 (ISO/IEC 11172-1) and MPEG-2 Part 1, Systems (ISO/IEC standard 13818-1/ITU ...
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.
FTP
The File Transfer Protocol (FTP) is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and dat ...
**
Gopher
Pocket gophers, commonly referred to simply as gophers, are burrowing rodents of the family Geomyidae. The roughly 41 speciesSearch results for "Geomyidae" on thASM Mammal Diversity Database are all endemic to North and Central America. They ar ...
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
**
HTTPS
Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It uses encryption for secure communication over a computer network, and is widely used on the Internet. In HTTPS, the communication protoc ...
SCTP
The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the ...
OASIS
In ecology, an oasis (; : oases ) is a fertile area of a desert or semi-desert environmentAMQP 0-9-1 (via librabbitmq)
* SRT Alliance standard:
** SRT (via libsrt)
Icecast
Icecast is a streaming media project released as free software maintained by the Xiph.Org Foundation. It also refers specifically to the Server (computing), server program which is part of the project. Icecast was created in December 1998/Janua ...
Low-pass filter
A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
(lowpass)
**
High-pass filter
A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation for each frequency ...
Band-pass filter
A band-pass filter or bandpass filter (BPF) is a device that passes frequencies within a certain range and rejects ( attenuates) frequencies outside that range.
It is the inverse of a '' band-stop filter''.
Description
In electronics and s ...
Time domain
In mathematics and signal processing, the time domain is a representation of how a signal, function, or data set varies with time. It is used for the analysis of mathematical functions, physical signals or time series of economic or environmental ...
expression evaluation (aeval)
**
Frequency domain
In mathematics, physics, electronics, control systems engineering, and statistics, the frequency domain refers to the analysis of mathematical functions or signals with respect to frequency (and possibly phase), rather than time, as in time ser ...
Headphones
Headphones are a pair of small loudspeaker drivers worn on or around the head over a user's ears. They are electroacoustic transducers, which convert an electrical signal to a corresponding sound. Headphones let a single user listen to an ...
*** 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
Synchronization is the coordination of events to operate a system in unison. For example, the Conductor (music), conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are sa ...
(asyncts)
* HDCD data decoder (hdcd)
* Plugins
** LADSPA (ladspa)
** LV2 (lv2)
* Do nothing ()
Deinterlacing
Deinterlacing is the process of converting interlaced video into a non-interlaced or Progressive scan, progressive form. Interlaced video signals are commonly found in analog television, VHS, Laserdisc, digital television (HDTV) when in the 1080 ...
Convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
Subtitles
Subtitles are texts representing the contents of the audio in a film, television show, opera or other audiovisual media. Subtitles might provide a transcription or translation of spoken dialogue. Although naming conventions can vary, caption ...
(
ASS
Ass most commonly refers to:
* Buttocks (in informal American English)
* Donkey or ass, ''Equus africanus asinus''
**any other member of the subgenus ''Asinus''
Ass or ASS may also refer to:
Art and entertainment
* Ass (album), ''Ass'' (albu ...
, subtitles)
*
Alpha
Alpha (uppercase , lowercase ) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter ''aleph'' , whose name comes from the West Semitic word for ' ...
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
A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represe ...
Adobe After Effects
Adobe After Effects is a digital visual effects, motion graphics, and compositing application developed by Adobe Inc.; it is used for animation and in the post-production process of film making, video games and television production. Amo ...
3dl
*
DaVinci Resolve
DaVinci Resolve is a proprietary color grading, color correction, visual effects, and audio post-production video editing application for macOS, Windows, and Linux, developed by Australian company Blackmagic Design. It was originally deve ...
FFmpeg supports the following devices via external libraries.
Media
*
Compact disc
The compact disc (CD) is a Digital media, digital optical disc data storage format co-developed by Philips and Sony to store and play digital audio recordings. It employs the Compact Disc Digital Audio (CD-DA) standard and was capable of hol ...
(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)
Open Sound System
The Open Sound System (OSS) is an interface for making and capturing sound in Unix and Unix-like operating systems. It is based on standard Unix devices system calls (i.e. POSIX read, write, ioctl, etc.). The term also sometimes refers to ...
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
Video for Windows
Video for Windows was a suite of video-playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
(input only)
* Windows DirectShow
* Android Camera (input only)
OpenGL
OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
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 patent
A software patent is a patent on a piece of software, such as a computer program, library, user interface, or algorithm. The validity of these patents can be difficult to evaluate, as software is often at once a product of engineering, something ...
s. 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
The European Union (EU) is a supranational union, supranational political union, political and economic union of Member state of the European Union, member states that are Geography of the European Union, located primarily in Europe. The u ...
, 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.
VLC media player
VLC media player (previously the VideoLAN Client) is a free and open-source software, free and open-source, software portability, portable, cross-platform media player software and streaming media Server (computing), server developed by the Vide ...
,
xine
xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library (xine-lib) that supports different frontend player applications. xine uses libraries fr ...
and
YouTube
YouTube is an American social media and online video sharing platform owned by Google. YouTube was founded on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim who were three former employees of PayPal. Headquartered in ...
.. It handles video and audio playback in
Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
and the Linux version of Firefox. GUIfront-ends for FFmpeg have been developed, including Multimedia Xpert 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
The National Aeronautics and Space Administration (NASA ) is an independent agencies of the United States government, independent agency of the federal government of the United States, US federal government responsible for the United States ...
's Mars 2020 mission, FFmpeg is used by the Perseverance rover on Mars for image and video compression before footage is sent to Earth.
See also
*
MPlayer
MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable Desktop, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A ...