FFmpeg
{{Short description|Multimedia framework}}
{{Infobox software
| logo = 200px
| screenshot = FFmpeg 7.1 screenshot.webp
| screenshot size = 300px
| caption = FFmpeg being used to convert a file from the PNG file format to the WebP format
| author = Fabrice Bellard
| developer = FFmpeg team
| latest release version = {{wikidata|property|preferred|references|edit|Q847465|P348|P548=Q2804309}}
| latest release date = {{wikidata|qualifier|preferred|single|Q847465|P348|P548=Q2804309|P577}}
| latest preview version = {{wikidata|property|preferred|references|edit|Q847465|P348|P548=Q51930650}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q847465|P348|P548=Q51930650|P577}}
| repo = {{URL|https://git.ffmpeg.org/ffmpeg.git}}
| programming language = C and Assembly{{cite web |url=https://ffmpeg.org/developer.html |title=Developer Documentation |publisher=ffmpeg.org |date=2011-12-08 |access-date=2012-01-04 |archive-date=2012-02-04 |archive-url=https://web.archive.org/web/20120204192831/http://ffmpeg.org/developer.html |url-status=live }}
| operating system = Various, including Windows, macOS, and Linux (executable programs are only available from third parties, as the project only distributes source code){{cite web |title=Platform Specific Information |url=https://ffmpeg.org/platform.html |website=FFmpeg.org |access-date=25 February 2020 |archive-date=25 February 2020 |archive-url=https://web.archive.org/web/20200225202151/https://ffmpeg.org/platform.html |url-status=live }}{{cite web |url=https://ffmpeg.org/download.html |title=Download |work=ffmpeg.org |publisher=FFmpeg |access-date=2012-01-04 |archive-date=2011-10-06 |archive-url=https://web.archive.org/web/20111006131811/http://www.ffmpeg.org/download.html |url-status=live }}
| platform = x86, ARM, PowerPC, MIPS, RISC-V, DEC Alpha, Blackfin, AVR32, SH-4, and SPARC; may be compiled for other desktop computers
| genre = 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 GPLFFmpeg can be compiled with various external libraries, some of which have licenses that are incompatible with the FFmpeg's primary license, the GNU GPL.
| website = [https://ffmpeg.org/ ffmpeg.org]
}}
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 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),{{cite web|url=https://www.ffmpeg.org/doxygen/2.2/group__libavf.html|title=FFmpeg: Lavf: I/O and Muxing/Demuxing Library|work=ffmpeg.org|access-date=21 October 2016|archive-date=3 December 2016|archive-url=https://web.archive.org/web/20161203035541/http://ffmpeg.org/doxygen/2.2/group__libavf.html|url-status=live}} an audio/video container mux and demux library, and libavfilter, a library for enhancing and editing filters through a GStreamer-like filtergraph.{{Cite web|title=Libavfilter Documentation|url=https://ffmpeg.org/libavfilter.html|access-date=2021-10-07|website=ffmpeg.org|archive-date=2021-10-07|archive-url=https://web.archive.org/web/20211007032443/https://ffmpeg.org/libavfilter.html|url-status=live}}
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.{{Citation|title=ijkplayer|date=2021-10-05|url=https://github.com/bilibili/ijkplayer|publisher=bilibili|access-date=2021-10-05|archive-date=2021-10-05|archive-url=https://web.archive.org/web/20211005224814/https://github.com/bilibili/ijkplayer|url-status=live}} 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.{{cite web|url=https://www.ffmpeg.org/legal.html|title=FFmpeg License and Legal Considerations|publisher=ffmpeg.org|access-date=2012-01-04|archive-date=2012-01-03|archive-url=https://web.archive.org/web/20120103190924/http://ffmpeg.org/legal.html|url-status=live}}
History
The project was started by Fabrice Bellard (using the pseudonym "Gérard Lantau") in 2000, and was led by Michael Niedermayer from 2004 until 2015.{{Cite web|url = https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176489.html|title = [FFmpeg-devel] FFmpegs future and resigning as leader|access-date = 2015-09-22|first = Michael|last = Niedermayer| date=31 July 2015 |archive-date = 2015-08-15|archive-url = https://web.archive.org/web/20150815230313/https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176489.html|url-status = live}} 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".{{cite web|last=Bellard|first=Fabrice|author-link=Fabrice Bellard|date=18 February 2006|title=FFmpeg naming and logo|url=https://ffmpeg.org/pipermail/ffmpeg-devel/2006-February/010315.html|access-date=24 December 2011|work=FFmpeg developer mailing list|publisher=FFmpeg website|archive-date=26 April 2012|archive-url=https://web.archive.org/web/20120426071311/http://ffmpeg.org/pipermail/ffmpeg-devel/2006-February/010315.html|url-status=live}} The logo represents a zigzag scan pattern that shows how MPEG video codecs handle entropy encoding.{{Cite FTP |last=Carlsen|first=Steve|date=1992-06-03|title=TIFF 6.0 specification|url=ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps|access-date=2016-08-14|page=98|format=PS|server=Aldus Corporation|url-status=dead|quote=Zig-Zag Scan}} [http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf Alt URL] {{Webarchive|url=https://web.archive.org/web/20120703095221/http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf |date=2012-07-03 }}
On March 13, 2011, a group of FFmpeg developers decided to fork the project under the name Libav.{{citation|title=Libav project site|url=http://www.libav.org/|access-date=2012-01-04|archive-date=2012-01-03|archive-url=https://web.archive.org/web/20120103091848/http://libav.org/|url-status=live}}{{citation|author=Ronald S. Bultje|title=Project renamed to Libav|date=2011-03-14|url=http://article.gmane.org/gmane.comp.video.ffmpeg.devel/129579|archive-url=https://web.archive.org/web/20161107163133/http://article.gmane.org/gmane.comp.video.ffmpeg.devel/129579|access-date=2012-01-04|archive-date=2016-11-07|url-status=dead}}{{citation|title=A group of FFmpeg developers just forked as Libav|date=2011-03-14|url=https://www.phoronix.com/news/OTIwNw|publisher=Phoronix|access-date=2012-01-04|archive-date=2011-09-15|archive-url=https://web.archive.org/web/20110915210209/http://www.phoronix.com/scan.php?page=news_item&px=OTIwNw|url-status=live}} The group decided to fork the project due to a disagreement with the leadership of FFmpeg.{{clarify|date=March 2025}}{{citation|title=What happened to FFmpeg|date=2011-03-30|url=https://codecs.multimedia.cx/2011/03/what-happened-to-ffmpeg/|access-date=2012-05-19|archive-date=2018-09-02|archive-url=https://web.archive.org/web/20180902151632/https://codecs.multimedia.cx/2011/03/what-happened-to-ffmpeg/|url-status=live}}{{citation|title=FFMpeg turmoil|date=2011-01-19|url=https://lwn.net/Articles/423702/|access-date=2012-01-04|archive-date=2012-01-12|archive-url=https://web.archive.org/web/20120112085953/http://lwn.net/Articles/423702/|url-status=live}}{{Cite web|title=The FFmpeg/Libav situation|url=http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html|access-date=2015-09-22|website=blog.pkh.me|archive-date=2012-07-01|archive-url=https://web.archive.org/web/20120701210503/http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html|url-status=live}}
Despite an initial push in Debian and derived distributions, Libav was considered inferior to FFmpeg in both technical merit and popularity,{{Cite web|date=2015-08-02|title=Debate/libav-provider/ffmpeg - Debian Wiki|url=https://wiki.debian.org/Debate/libav-provider/ffmpeg|access-date=2025-03-20|work=debian.org}} prompting Debian and Gentoo to switch back to FFmpeg in 2015.
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.{{cite web|url=https://security.googleblog.com/2014/01/ffmpeg-and-thousand-fixes.html|title=FFmpeg and a thousand fixes|date=January 10, 2014|work=googleblog.com|access-date=21 October 2016|archive-date=22 October 2016|archive-url=https://web.archive.org/web/20161022022444/https://security.googleblog.com/2014/01/ffmpeg-and-thousand-fixes.html|url-status=live}}
In January 2018, the ffserver command-line program – a long-time component of FFmpeg – was removed.{{Cite web|url=https://trac.ffmpeg.org/wiki/ffserver|title=ffserver – FFmpeg|website=trac.ffmpeg.org|access-date=2018-02-03|archive-date=2018-02-04|archive-url=https://web.archive.org/web/20180204000416/https://trac.ffmpeg.org/wiki/ffserver|url-status=live}} The developers had previously deprecated the program citing high maintenance efforts due to its use of internal application programming interfaces.{{Cite web|url=https://ffmpeg.org/index.html#ffserv|title=ffserver program being dropped|date=2016-07-10|website=ffmpeg.org|language=en|access-date=2018-02-03|archive-date=2016-07-16|archive-url=https://web.archive.org/web/20160716124052/http://ffmpeg.org/index.html#ffserv|url-status=live}}
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.{{cite web|url=https://ffmpeg.org/download.html#releases|title=ffmpeg.org/download.html#releases|publisher=ffmpeg.org|access-date=2015-04-27|archive-date=2011-10-06|archive-url=https://web.archive.org/web/20111006131811/http://www.ffmpeg.org/download.html#releases|url-status=live}}
= Codec history =
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.{{cite web
|url=http://wiki.multimedia.cx/index.php?title=NUT
|title=NUT
|publisher=Multimedia Wiki
|year=2012
|access-date=2014-01-03
|archive-date=2014-01-03
|archive-url=https://web.archive.org/web/20140103022122/http://wiki.multimedia.cx/index.php?title=NUT
|url-status=live
}}
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.{{citation |url=http://x264dev.multimedia.cx/?p=499 |title=Diary Of An x264 Developer: Announcing the world's fastest VP8 decoder |first=Fiona |last=Glaser |date=2010-07-23 |access-date=2012-01-04 |url-status=dead |archive-url=https://web.archive.org/web/20100930181634/http://x264dev.multimedia.cx/?p=499 |archive-date=2010-09-30 }}{{citation |url=https://news.slashdot.org/story/10/07/24/1227241/FFmpeg-Announces-High-Performance-VP8-Decoder |title=FFmpeg Announces High-Performance VP8 Decoder |publisher=Slashdot |date=2010-07-24 |access-date=2012-01-04 |archive-date=2011-12-21 |archive-url=https://web.archive.org/web/20111221092712/http://news.slashdot.org/story/10/07/24/1227241/ffmpeg-announces-high-performance-vp8-decoder |url-status=live }} Starting with version 0.6, FFmpeg also supported WebM and VP8.{{cite web |url=http://newteevee.com/2010/06/17/ffmpeg-goes-webm-enabling-vp8-for-boxee-co/ |title=FFmpeg Goes WebM, Enabling VP8 for Boxee & Co |publisher=newteevee.com |date=2010-06-17 |access-date=2012-01-04 |quote=...with VLC, Boxee, MythTV, Handbrake and MPlayer being some of the more popular projects utilizing FFmpeg... |archive-date=2010-06-20 |archive-url=https://web.archive.org/web/20100620003915/http://newteevee.com/2010/06/17/ffmpeg-goes-webm-enabling-vp8-for-boxee-co/ |url-status=dead }}
In October 2013, a native VP9{{cite news |title=Native VP9 decoder is now in the Git master branch |work=Launchpad |url=https://launchpad.net/ffmpeg/+announcement/12045 |date=2013-10-03 |access-date=2013-10-21 |archive-date=2013-10-22 |archive-url=https://web.archive.org/web/20131022011447/https://launchpad.net/ffmpeg/+announcement/12045 |url-status=live }} decoder and OpenHEVC, an open source High Efficiency Video Coding (HEVC) decoder, were added to FFmpeg.{{cite news |title=FFmpeg Now Features Native HEVC/H.265 Decoder Support |publisher=Softpedia |url=https://linux.softpedia.com/blog/Ffmpeg-Now-Features-Native-HEVC-H-265-Decoder-Support-391582.shtml |date=2013-10-16 |access-date=2013-10-16 |archive-date=2014-06-15 |archive-url=https://web.archive.org/web/20140615002423/http://news.softpedia.com/news/Ffmpeg-Now-Features-Native-HEVC-H-265-Decoder-Support-391582.shtml |url-status=live }} 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.{{cite web|url=https://ffmpeg.org/index.html#pr3.0|title=February 15th, 2016, FFmpeg 3.0 "Einstein"|date=2016-02-15|access-date=2016-04-02|author=FFmpeg|author-link=FFmpeg|archive-date=2016-07-16|archive-url=https://web.archive.org/web/20160716124052/http://ffmpeg.org/index.html#pr3.0|url-status=live}} Since version 3.4 "Cantor" FFmpeg supported the FITS image format.{{cite web|url=https://ffmpeg.org/index.html#pr3.4|title=October 15th, 2017, FFmpeg 3.4 "Cantor"|date=2017-10-15|access-date=2019-05-10|author=FFmpeg|author-link=FFmpeg|archive-date=2016-07-16|archive-url=https://web.archive.org/web/20160716124052/http://ffmpeg.org/index.html#pr3.4|url-status=live}} Since November 2018 in version 4.1 "al-Khwarizmi" AV1 can be muxed in MP4 and Matroska, including WebM.{{cite web|url=https://ffmpeg.org/index.html#pr4.1|title=November 6th, 2018, FFmpeg 4.1 "al-Khwarizmi"|date=2018-11-06|access-date=2019-05-10|author=FFmpeg|author-link=FFmpeg|archive-date=2016-07-16|archive-url=https://web.archive.org/web/20160716124052/http://ffmpeg.org/index.html#pr4.1|url-status=live}}{{cite web |url=https://www.streamingmedia.com/Articles/ReadArticle.aspx?ArticleID=130284 |title=Good News: AV1 Encoding Times Drop to Near-Reasonable Levels |author=Jan Ozer |date=2019-03-04 |website=StreamingMedia.com |access-date=2019-05-10 |archive-date=2021-05-14 |archive-url=https://web.archive.org/web/20210514020514/https://www.streamingmedia.com/Articles/ReadArticle.aspx?ArticleID=130284 |url-status=live }}
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 sourcesThis video of Linux desktop (X11) was captured by ffmpeg and encoded in realtime{{Circular reference|date=March 2024}} 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.
- 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 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 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 and x86-64), PPC (PowerPC), ARM, DEC Alpha, SPARC, and MIPS.{{cite web |url=http://fate.multimedia.cx/ |title=FFmpeg Automated Testing Environment |publisher=Fate.multimedia.cx |access-date=2012-01-04 |archive-date=2016-04-10 |archive-url=https://web.archive.org/web/20160410165839/http://fate.multimedia.cx/ |url-status=live }}
= 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.{{cite web |url=https://trac.ffmpeg.org/wiki/HWAccelIntro |title=FFmpeg Hardware Acceleration |publisher=ffmpeg.org Wiki |access-date=2016-11-12 |archive-date=2016-12-04 |archive-url=https://web.archive.org/web/20161204005157/http://trac.ffmpeg.org/wiki/HWAccelIntro |url-status=live }}
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.{{cite web |title=HWAccelIntro – FFmpeg |url=https://trac.ffmpeg.org/wiki/HWAccelIntro |website=trac.ffmpeg.org |access-date=2016-11-12 |archive-date=2016-12-04 |archive-url=https://web.archive.org/web/20161204005157/http://trac.ffmpeg.org/wiki/HWAccelIntro |url-status=live }}
Supported codecs and formats
= Image formats =
{{Technical|date=April 2023|section}}
FFmpeg supports many common and some uncommon image formats.
The {{anchor|PGMYUV}} 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 =
{{Further|libavcodec}}{{More citations needed section|date=July 2022}}
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:
{{div col}}
- AIFF
- ASF
- AVI and also input from AviSynth
- BFI{{cite web|author=vitor |url=https://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-April/013231.html |title=FFmpeg development mailing list |publisher=FFmpeg website |work=FFmpeg development |date=13 April 2008 |access-date=14 April 2008 }}{{dead link|date=December 2016 |bot=InternetArchiveBot |fix-attempted=yes }}
- CAF
- FLV
- GIF
- GXF, General eXchange Format, SMPTE 360M
- HLS, HTTP Live Streaming
- IFF{{cite web|author=vitor |url=https://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-March/012963.html |title=FFmpeg development mailing list |publisher=FFmpeg website |work=FFmpeg development |date=30 March 2008 |access-date=30 March 2008 }}{{dead link|date=December 2016 |bot=InternetArchiveBot |fix-attempted=yes }}
- ISO base media file format (including QuickTime, 3GP and MP4)
- Matroska (including WebM)
- Maxis XA{{cite web |url=https://ffmpeg.org/doxygen/5.1/structMaxisXADemuxContext.html |title=FFmpeg: MaxisXADemuxContext Struct Reference |publisher=FFmpeg website |work=FFmpeg development |access-date=17 March 2024 |archive-date=17 March 2024 |archive-url=https://web.archive.org/web/20240317184808/https://ffmpeg.org/doxygen/5.1/structMaxisXADemuxContext.html |url-status=live }}
- MPEG-DASH{{cite web|url=http://git.videolan.org/?p=ffmpeg.git;a=blob;f=RELEASE_NOTES;hb=release/2.5|title=RELEASE NOTES for FFmpeg 2.5 "Bohr"|date=2014-12-05|publisher=VideoLAN|author=Michael Niedermayer, Timothy Gu|access-date=2014-12-05|url-status=dead|archive-url=https://web.archive.org/web/20141208011850/http://git.videolan.org/?p=ffmpeg.git%3Ba%3Dblob%3Bf%3DRELEASE_NOTES%3Bhb%3Drelease%2F2.5|archive-date=2014-12-08}}
- MPEG program stream
- MPEG transport stream (including AVCHD)
- MXF, Material eXchange Format, SMPTE 377M
- MSN Webcam stream{{cite web |author=ramiro |url=http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-March/012708.html |title=FFmpeg development mailing list |publisher=FFmpeg website |work=FFmpeg development |date=18 March 2008 |access-date=18 March 2008 |url-status=dead |archive-url=https://web.archive.org/web/20080817072304/http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-March/012708.html |archive-date=17 August 2008 }}
- {{anchor|NUT}}NUT
- Ogg
- OMA{{cite web |author=banan |url=http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-June/014417.html |title=FFmpeg development mailing list |publisher=FFmpeg website |work=FFmpeg development |date=8 June 2008 |access-date=8 June 2008 |url-status=dead |archive-url=https://web.archive.org/web/20090114195646/http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-June/014417.html |archive-date=14 January 2009 }}
- RL2{{cite web |author=faust3 |url=http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-March/012799.html |title=FFmpeg development mailing list |publisher=FFmpeg website |work=FFmpeg development |date=21 March 2008 |access-date=21 March 2008 |url-status=dead |archive-url=https://web.archive.org/web/20080425024126/http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/2008-March/012799.html |archive-date=25 April 2008 }}
- Segment, for creating segmented video streams
- Smooth Streaming
- TXD
- WTV
{{div col end}}
= Pixel formats =
{{More citations needed section|date=July 2022}}
class="wikitable mw-collapsible mw-collapsed"
! rowspan=2| Type ! rowspan=2| Color ! colspan=2| Packed ! colspan=3| Planar ! Palette | ||||||
Without alpha | With alpha | Without alpha | With alpha | Chroma-interleaved | With alpha | |
---|---|---|---|---|---|---|
rowspan=2 | Monochrome
| Binary (1-bit monochrome) || {{yes|monoblack, monowhite}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} | ||||||
Grayscale | {{yes|8/9/10/12/14/16bpp}} | {{sdash}} | {{sdash}} | {{yes|16/32bpp}} | {{sdash}} | {{sdash}} |
rowspan=6 | RGB
| RGB 1:2:1 (4-bit color) || {{yes|4bpp}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} | ||||||
RGB 3:3:2 (8-bit color) | {{yes|8bpp}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} |
RGB 5:5:5 (High color) | {{yes|16bpp}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} |
RGB 5:6:5 (High color) | {{yes|16bpp}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} | {{sdash}} |
RGB/BGR | {{yes|24/3010-bit color components with 2-bit padding (X2RGB10)/48bpp}} | {{yes|32RGBx (rgb0) and xBGR (0bgr) are also supported/64bpp}} | {{sdash}} | {{sdash}} | {{sdash}} | {{yes|8bit->32bpp}} |
GBRused in YUV-centric codecs such like H.264 | {{sdash}} | {{sdash}} | {{yes|8/9/10/12/14/16bpc}} | {{yes|8/10/12/16bpc}} | {{sdash}} | {{sdash}} |
rowspan=2 | RGB Float
| RGB || {{yes|32bpc}} || {{yes|16/32bpc}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} | ||||||
GBR | {{sdash}} | {{sdash}} | {{yes|32bpc}} | {{yes|32bpc}} | {{sdash}} | {{sdash}} |
rowspan=10 | YUV
| YVU 4:1:0 || {{sdash}} || {{sdash}} || {{no|(9bpp (YVU9))YVU9, YV12, YV16, and YV24 are supported as rawvideo codec in FFmpeg.}} || {{sdash}} || {{sdash}} || {{sdash}} | ||||||
YUV 4:1:0 | {{sdash}} | {{sdash}} | {{yes|9bpp}} | {{sdash}} | {{sdash}} | {{sdash}} |
YUV 4:1:1 | {{yes|8bpc (UYYVYY)}} | {{sdash}} | {{yes|8bpc}} | {{sdash}} | {{no|(8bpc (NV11))}} | {{sdash}} |
YVU 4:2:0 | {{sdash}} | {{sdash}} | {{no|(8bpc (YV12))}} | {{sdash}} | {{yes|8 (NV21)}} | {{sdash}} |
YUV 4:2:0 | {{sdash}} | {{sdash}} | {{yes|8I420 a.k.a. YUV420P/9/10/12/14/16bpc}} | {{yes|8/9/10/16bpc}} | {{yes|8 (NV12)/10 (P010)/12 (P012)/16bpc (P016)}} | {{sdash}} |
YVU 4:2:2 | {{sdash}} | {{sdash}} | {{no|(8bpc (YV16))}} | {{sdash}} | {{no|(8bpc (NV61))}} | {{sdash}} |
YUV 4:2:2 | {{partial|8 (YUYVaka YUY2 in Windows and UYVY)/10 (Y210)/12bpc (Y212)UYVY 10bpc without a padding is supported as bitpacked codec in FFmpeg. UYVY 10bpc with 2-bits padding is supported as v210 codec in FFmpeg. 16bpc (Y216) is supported as targa_y216 codec in FFmpeg.}} | {{sdash}} | {{yes|8I422 a.k.a. YUV422P/9/10/12/14/16bpc}} | {{yes|8/9/10/12/16bpc}} | {{yes|8 (NV16)/10 (NV20 and P210)/16bpc (P216)}} | {{sdash}} |
YUV 4:4:0 | {{sdash}} | {{sdash}} | {{yes|8/10/12bpc}} | {{sdash}} | {{sdash}} | {{sdash}} |
YVU 4:4:4 | {{sdash}} | {{sdash}} | {{no|(8bpc (YV24))}} | {{sdash}} | {{yes|8bpc (NV42)}} | {{sdash}} |
YUV 4:4:4 | {{partial|8 (VUYX)/10XV30 a.k.a. XVYU2101010/12bpcXV36}} | {{yes|8VUYA a.k.a. AYUV / 16bpc (AYUV64)10bpc (Y410), 12bpc (Y412), and Y416 (16bpc) are not supported. }} | {{yes|8I444 a.k.a. YUV444P/9/10/12/14/16bpc}} | {{yes|8/9/10/12/16bpc}} | {{yes|8 (NV24)/10 (P410)/ 16bpc (P416)}} | {{sdash}} |
XYZ
| XYZ 4:4:4used in JPEG2000 || {{yes|12bpc}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} | ||||||
Bayer
| BGGR/RGGB/GBRG/GRBG || {{yes|8/16bpp}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} || {{sdash}} |
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.
Supported protocols
= Open standards =
{{div col}}
- IETF RFCs:
- FTP
- Gopher
- HLS
- HTTP
- HTTPS
- RTP
- RTSP
- SCTP
- SDP
- SRTP
- TCP
- TLS
- UDP
- UDP-Lite
- IETF I-Ds:{{cite web|url=http://annevankesteren.nl/2010/09/draft-vs-standard|title=Internet Drafts are not Open Standards|last=van Kesteren|first=Anne|date=2010-09-01|publisher=Self-published|work=annevankesteren.nl|access-date=2015-03-22|archive-date=2010-09-02|archive-url=https://web.archive.org/web/20100902054734/http://annevankesteren.nl/2010/09/draft-vs-standard|url-status=live}}
- SFTP (via libssh)
- Microsoft OSP:
- CIFS/SMB (via libsmbclient)
- MMS over TCP (MS-MMSP)
- MMS over HTTP (MS-WMSP)
- CENELEC
- SAT>IP
- OASIS standards:
- AMQP 0-9-1 (via librabbitmq)
- SRT Alliance standard:
- SRT (via libsrt)
{{div col end}}
= [[De facto standard]]s =
{{div col}}
- RTSP over TLS[https://datatracker.ietf.org/doc/html/rfc7826 Real Time Streaming Protocol 2.0 (RTSP)] {{Webarchive|url=https://web.archive.org/web/20231025214422/https://datatracker.ietf.org/doc/html/rfc7826 |date=2023-10-25 }} P.231{{cite web|url=http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b2e9636c57b22582143467a8a06b509b47b92f9|title=rtsp: Support tls-encapsulated RTSP - git.videolan.org Git - ffmpeg.git/commit|work=videolan.org|access-date=21 October 2016|archive-date=18 October 2016|archive-url=https://web.archive.org/web/20161018153936/http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b2e9636c57b22582143467a8a06b509b47b92f9|url-status=live}}
- Icecast protocol
- Adobe RTMP, RTMPT, RTMPE, RTMPTE and RTMPS
- RealMedia RTSP/RDT
- ZeroMQ (via libzmq)
- RIST (librist)
{{div col end}}
Supported filters
FFmpeg supports, among others, the following filters.{{cite web |url=https://ffmpeg.org/ffmpeg-filters.html |title=FFmpeg Filters |publisher=ffmpeg.org |access-date=2017-03-27 |archive-date=2017-03-28 |archive-url=https://web.archive.org/web/20170328021020/http://ffmpeg.org/ffmpeg-filters.html |url-status=live }}
= Audio =
{{div col|small=yes}}
- 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 ({{Not a typo |crystalizer}})
- 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)[https://web.archive.org/web/20080928130012/http://www.geocities.com/beinges/works.htm How it works] earwax.ca
- 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 ({{Not a typo |anull}})
{{div col end}}
= Video =
{{div col|small=yes}}
- 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
{{div col end}}
== 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.{{cite web |url=https://ffmpeg.org/ffmpeg-devices.html |title=FFmpeg Devices Documentation |publisher=ffmpeg.org |access-date=2021-10-25 |archive-date=2021-10-25 |archive-url=https://web.archive.org/web/20211025071944/https://ffmpeg.org/ffmpeg-devices.html |url-status=live }}
= Media =
- Compact disc (via libcdio; input only)
= Physical interfaces =
= 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
= Legal aspects =
FFmpeg contains more than 100 codecs,{{cite web |url=https://ffmpeg.org/general.html#Supported-File-Formats_002c-Codecs-or-Features |title=Codecs list |publisher=ffmpeg.org |access-date=2012-01-01 |archive-date=2012-01-06 |archive-url=https://web.archive.org/web/20120106131336/http://ffmpeg.org/general.html#Supported-File-Formats_002c-Codecs-or-Features |url-status=live }} 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.{{cite web |url=https://ffmpeg.org/legal.html |title=Legal information on FFmpeg's website |publisher=ffmpeg.org |access-date=2012-01-04 |archive-date=2012-01-03 |archive-url=https://web.archive.org/web/20120103190924/http://ffmpeg.org/legal.html |url-status=live }} 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.{{Cite web|date=2020-11-29|title=The European Patent Convention|url=https://www.epo.org/en/legal/epc/2020/a52.html|url-status=live|archive-url=https://web.archive.org/web/20211119121958/https://www.epo.org/law-practice/legal-texts/html/epc/2020/e/ar52.html|archive-date=2021-11-19|access-date=2021-11-24|website=www.epo.org|publisher=European Patent Office|language=en}}{{Original research inline|date=November 2021|certain=y}} Patents for many older codecs, including AC3 and all MPEG-1 and MPEG-2 codecs, have expired.{{Citation needed|date=October 2017}}
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 =
{{main category|Software that uses FFmpeg}}
FFmpeg is used by software such as Blender, Cinelerra-GG Infinity, HandBrake, Kodi, MPC-HC, Plex, Shotcut, VirtualDub2 (a VirtualDub fork),{{Cite web | url=https://sourceforge.net/p/vdfiltermod/wiki/Home/ | title=VirtualDub2 | access-date=2020-08-15 | archive-date=2020-08-07 | archive-url=https://web.archive.org/web/20200807134046/https://sourceforge.net/p/vdfiltermod/wiki/Home/ | url-status=live }} VLC media player, xine and YouTube.{{cite web | url=https://multimedia.cx/eggs/googles-youtube-uses-ffmpeg/ | title=Google's YouTube Uses FFmpeg {{pipe}} Breaking Eggs And Making Omelettes | date=2011-02-08 | publisher=Multimedia.cx | access-date=2012-08-06 | archive-date=2012-08-14 | archive-url=https://web.archive.org/web/20120814124110/http://multimedia.cx/eggs/googles-youtube-uses-ffmpeg/ | url-status=live}}{{cite web | url=https://trac.ffmpeg.org/wiki/Projects | title=FFmpeg-based Projects | publisher=ffmpeg.org | access-date=2012-01-04 | archive-date=2016-02-20 | archive-url=https://web.archive.org/web/20160220104135/https://trac.ffmpeg.org/wiki/Projects | url-status=live}}. It handles video and audio playback in Google Chrome and the Linux version of Firefox.{{cite web | url=https://www.phoronix.com/news/Firefox-FFmpeg-Default | title=Firefox Enables FFmpeg Support By Default | publisher=Phoronix | date=2015-11-15 | access-date=2015-11-18 | archive-date=2017-09-25 | archive-url=https://web.archive.org/web/20170925225920/https://www.phoronix.com/scan.php?page=news_item&px=Firefox-FFmpeg-Default | url-status=live }} GUI front-ends for FFmpeg have been developed, including Multimedia Xpert{{cite web | url=https://www.atlas-informatik.ch/multimediaXpert/ | title=Multimedia Xpert | publisher=Atlas Informatik | access-date=2022-05-26 | archive-date=2023-04-04 | archive-url=https://web.archive.org/web/20230404142511/https://www.atlas-informatik.ch/multimediaXpert/ | url-status=live }} 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.{{cite journal |title=The Mars 2020 Engineering Cameras and Microphone on the Perseverance Rover: A Next-Generation Imaging System for Mars Exploration |year=2020 |publisher=Springer Nature Switzerland AG. |doi=10.1007/s11214-020-00765-9 |last1=Maki |first1=J. N. |last2=Gruel |first2=D. |last3=McKinney |first3=C. |last4=Ravine |first4=M. A. |last5=Morales |first5=M. |last6=Lee |first6=D. |last7=Willson |first7=R. |last8=Copley-Woods |first8=D. |last9=Valvo |first9=M. |last10=Goodsall |first10=T. |last11=McGuire |first11=J. |last12=Sellar |first12=R. G. |last13=Schaffner |first13=J. A. |last14=Caplinger |first14=M. A. |last15=Shamah |first15=J. M. |last16=Johnson |first16=A. E. |last17=Ansari |first17=H. |last18=Singh |first18=K. |last19=Litwin |first19=T. |last20=Deen |first20=R. |last21=Culver |first21=A. |last22=Ruoff |first22=N. |last23=Petrizzo |first23=D. |last24=Kessler |first24=D. |last25=Basset |first25=C. |last26=Estlin |first26=T. |last27=Alibay |first27=F. |last28=Nelessen |first28=A. |last29=Algermissen |first29=S. |journal=Space Science Reviews |volume=216 |issue=8 |page=137 |pmid=33268910 |pmc=7686239 |bibcode=2020SSRv..216..137M }}
See also
{{portal|Free and open-source software}}
- MPlayer, a similar project
- List of open-source codecs
- List of video editing software
References
{{reflist|22em}}
External links
- {{official website}}
- [https://ffmpeg.wide.video/ Browser-based version]
{{Media player (application software)|free}}{{Compression software}}
Category:Assembly language software
Category:Command-line software
Category:C (programming language) libraries
Category:Cross-platform free software
Category:Free software for Linux
Category:Free software for Windows
Category:Free software for macOS
Category:Free computer libraries
Category:Free software programmed in C
Category:Free video conversion software
Category:Multimedia frameworks
Category:Software that uses FFmpeg
Category:Software using the GNU Lesser General Public License