libavcodec
{{Short description|Library of multimedia codecs}}
{{lowercase}}
{{Infobox software
| name = libavcodec
| logo =
| screenshot =
| caption =
| collapsible =
| author =
| developer = FFmpeg team
| released =
| latest release version = 61.19.100
| latest release date = {{Start date and age|2024|09|30}}{{cite web |url=http://ffmpeg.org/download.html#releases |title=Releases|work=ffmpeg.org |publisher=FFmpeg |url-status=live }}
| latest preview version =
| latest preview date =
| programming language = C99
| operating system = Available for Windows, OS X, Linux but may be compiled for any other OS{{cite web |url=http://ffmpeg.org/download.html |title=Download |work=ffmpeg.org |publisher=FFmpeg |access-date=2012-01-04 |archive-date=2013-09-27 |archive-url=https://web.archive.org/web/20130927101526/http://ffmpeg.org/download.html |url-status=live }}
| platform = Available for x86 but may be compiled for any desktop computer or supercomputer
| size =
| language =
| status =
| genre = Multimedia Library
| license = GNU LGPL 2.1+ or GNU GPL 2+ or non-redistributable if compiled as suchlibavcodec can be configured to make it a proprietary and non-redistributable library since some optional external libraries are proprietary software and cannot be distributed under the terms of the GPL (e.g. Decklink).
| website = {{url|https://ffmpeg.org}}
}}
{{Portal|Free and open-source software}}
libavcodec is a free and open-source{{cite web |url=http://www.libav.org/legal.html | archive-url=https://web.archive.org/web/20210515062117/https://www.libav.org/legal/ | archive-date=2021-05-15 |title=Libav License and Legal Considerations |publisher=libav.org |access-date=2013-05-07}} library of codecs for encoding and decoding video and audio data.{{citation |url=http://www.afterdawn.com/glossary/terms/libavcodec.cfm |title=libavcodec – AfterDawn: Glossary of technology terms & acronyms |publisher=AfterDawn |date=2010-07-02 |access-date=2012-01-17 |archive-date=2010-02-14 |archive-url=https://web.archive.org/web/20100214044958/http://www.afterdawn.com/glossary/terms/libavcodec.cfm |url-status=live }}
libavcodec is an integral part of many open-source multimedia applications and frameworks. The popular MPV, xine and VLC media players use it as their main, built-in decoding engine that enables playback of many audio and video formats on all supported platforms. It is also used by the ffdshow tryouts decoder as its primary decoding library. libavcodec is also used in video editing and transcoding applications like Avidemux, MEncoder or Kdenlive for both decoding and encoding.
libavcodec contains decoder and sometimes encoder implementations of several proprietary formats, including ones for which no public specification has been released. As such, a significant reverse engineering effort is part of libavcodec development. Having such codecs available within the standard libavcodec framework gives a number of benefits over using the original codecs, most notably increased portability, and in some cases also better performance, since libavcodec contains a standard library of highly optimized implementations of common building blocks, such as DCT and color space conversion. However, while libavcodec does strive to achieve decoding that is bit-exact to their official format implementations, occasional bugs and missing features in such re-implementations can sometimes introduce playback compatibility problems for certain files.
Implemented video codecs
libavcodec includes video decoders and/or encoders for the following formats, this list is not exhaustive:{{citation |url=http://www.ffmpeg.org/general.html#SEC6 |title=General Documentation |publisher=Ffmpeg.org |access-date=2021-05-05 |archive-date=2019-07-17 |archive-url=https://web.archive.org/web/20190717040636/http://ffmpeg.org/general.html#SEC6 |url-status=live }}
{{columns-list|colwidth=30em|
- Animated GIF
- Asus video format v1 and v2
- AVS (decoding only, encoding through libxavs)
- AV1
- Bink Video/Audio (decoding only, version 2 not supported)
- CamStudio format (decoding only)
- CineForm (decoding only)
- Cinepak
- Creative YUV (CYUV, decoding only)
- Dirac
- DNxHD
- Duck Corporation Truemotion 1, 2, and RT codecs (decoding only)
- FFV1
- Flash Screen Video v1 and v2
- H.261
- H.262/MPEG-2 Part 2
- H.263
- H.264/MPEG-4 AVC (native decoder, encoding through x264 and hardware encoding)
- H.265 HEVC (native decoder, encoding through x265 and hardware encoding)
- Huffyuv
- id Software RoQ Video
- Indeo (decoding only)
- Lagarith (decoding only)
- MJPEG
- MPEG-1
- MPEG-4 Part 2 (the format used for example by the popular DivX and Xvid codecs)
- Apple ProRes
- QuickDraw (decoding only)
- QuickTime: Graphics (decoding only), Video (decoding only) and Animation (RLE)
- RealVideo RV10 and RV20
- RealVideo RV30 and RV40 (decoding only)
- SheerVideo (decoding only)
- Smacker video (decoding only)
- Snow
- Sorenson Spark under the name FLV1
- SVQ1
- SVQ3 (decoding only)
- Theora (native decoder, encoding through libtheora)
- TrueMotion v1 and v2 (decoding only)
- VC-1 (decoding only)
- Sierra VMD Video (decoding only)
- VMware VMnc (decoding only)
- VP3 (decoding only)
- VP5 (decoding only)
- VP6 (decoding only)
- VP7 (decoding only)
- VP8 (native decoder, encoding through libvpx)
- VP9 (native decoder, encoding through libvpx)
- VQA (decoding only)
- VVC (native decoder){{Cite web |title=git.ffmpeg.org Git - ffmpeg.git/commit |url=https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/301ed950d1c3c500d0c2eee8472587dc5e691c04 |access-date=2024-01-03 |website=git.ffmpeg.org}}
- WMV version 7 and 8
- WMV version 9 (decoding only)
- Windows Media Video Image (decoding only)
- Windows Media Video Screen 1 and 2 (decoding only)
- Wing Commander/Xan Video (decoding only)
}}
Implemented audio codecs
libavcodec includes decoders and encoders for the following formats:
{{columns-list|colwidth=30em|
- 8SVX (decoding only)
- AAC
- AC-3
- AMR (decoding only)
- AMR-WB (decoding only)
- Apple Lossless
- ATRAC1, ATRAC3, ATRAC3plus and ATRAC9 (decoding only)
- Codec 2
- Cook Codec (decoding only)
- DTS (encoder is highly experimental)
- EA ADPCM (decoding only)
- E-AC-3
- EVRC (decoding only)
- FLAC
- G.711 (μ-law and A-law)
- G.722
- G.723.1
- G.726
- G.729 (decoding only)
- GSM 06.10 (native decoder, encoding through libgsm)
- Intel Music Coder and Indeo Audio Coder (decoding only)
- Meridian Lossless Packing / Dolby TrueHD
- Monkey's Audio (decoding only)
- MP1 (decoding only)
- MP2
- MP3 (native decoder, encoding through LAME)
- Nellymoser Asao Codec in Flash
- Opus (native encoder and decoder, encoding through libopus)
- QCELP (decoding only)
- QDM2 (decoding only)
- RealAudio 1.0
- RealAudio 2.0 (decoding only)
- Shorten (decoding only)
- Truespeech (decoding only)
- TTA
- TwinVQ (decoding only)
- Vorbis
- WAV
- WavPack
- Windows Media Audio 1 and 2
- Windows Media Audio 9 Lossless (decoding only)
- Windows Media Audio 9 Professional (decoding only)
- Windows Media Audio Voice (decoding only)
}}
Legal aspects
Libavcodec contains more than 100 codecs,{{cite web |url=http://ffmpeg.org/general.html#SEC8 |title=Codecs list |publisher=ffmpeg.org |access-date=2012-01-01 |archive-date=2014-06-29 |archive-url=https://web.archive.org/web/20140629194528/http://ffmpeg.org/general.html#SEC8 |url-status=live }} most of which do not just store uncompressed data. Most codecs that compress information could be claimed by patent holders.{{cite web |url=http://ffmpeg.org/legal.html |title=Legal information on FFmpeg's website |publisher=ffmpeg.org |access-date=2012-01-04 |archive-date=2010-09-18 |archive-url=https://web.archive.org/web/20100918222108/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 countries that have not implemented software patents.
Furthermore, many of these codecs are only released under terms that forbid reverse engineering, even for purposes of interoperability. These terms of use are forbidden in certain countries. For example, some European Union nations have not implemented software patents and have laws expressly allowing reverse engineering for purposes of interoperability.Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs
Libraries that depend on libavcodec
Applications using libavcodec
{{main category|Software that uses FFmpeg}}
=Video players=
=Audio players=
=Multimedia players=
=Video editors=
=Audio editors=
=Video converters=
=Video libraries=
- GPAC{{Cite book|title=Proceedings of the 29th ACM International Conference on Multimedia|arxiv=2107.13385|last1=Wieckowski|first1=Adam|last2=Lehmann|first2=Christian|last3=Bross|first3=Benjamin|last4=Marpe|first4=Detlev|last5=Biatek|first5=Thibaud|last6=Raulet|first6=Mickael|author7=Jean Le Feuvre|chapter=A Complete End to End Open Source Toolchain for the Versatile Video Coding (VVC) Standard |year=2021|pages=3795–3798 |doi=10.1145/3474085.3478320 |isbn=9781450386517 |s2cid=236469263 }}
- Media Lovin' Toolkit
=Optical disc authoring=
=Graphics libraries=
=3D graphics editors=
- Blender{{citation |url=https://books.google.com/books?id=OaAl4PdZs5EC&q=Blender+ffmpeg&pg=PT332 |title=Blender for Dummies |page=320 |date=13 April 2009 |isbn=9780470471586 |access-date=2012-01-17 |last1=Gumster |first1=Jason van |publisher=Wiley |archive-date=2022-03-14 |archive-url=https://web.archive.org/web/20220314065036/https://books.google.com/books?id=OaAl4PdZs5EC&q=Blender+ffmpeg&pg=PT332 |url-status=live }}
=VoIP=
=Multimedia streaming server=
=Multimedia frameworks=
- ffdshow (wraps libavcodec as a DirectShow filter and adds postprocessing to improve image quality; once installed, it is automatically used by all Windows DirectShow video players, such as Windows Media Player, Media Player Classic, Winamp etc. It also wraps libavcodec as a Video for Windows filter; the framework used by most video editing software.)
- LAV Filters
- GStreamer via the GStreamer FFmpeg plugin
- Perian
- Bellagio OpenMAX Integration Layer – open-source OpenMAX IL API implementation
=Computer vision libraries=
- OpenCV{{citation |url=https://books.google.com/books?id=seAgiOfu2EIC&q=libavcodec&pg=PA9 |title=Learning OpenCV: computer vision with the OpenCV library |page=9 |date=2008-09-24 |isbn=9780596554040 |access-date=2012-01-17 |last1=Bradski |first1=Gary |last2=Kaehler |first2=Adrian |publisher="O'Reilly Media, Inc." |archive-date=2021-08-27 |archive-url=https://web.archive.org/web/20210827165349/https://books.google.com/books?id=seAgiOfu2EIC&q=libavcodec&pg=PA9 |url-status=live }}
=Browser=
- Google Chrome{{citation |url=http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-May/020001.html |title=whatwg MPEG-1 subset proposal for HTML5 video codec |publisher=Lists.whatwg.org |access-date=2012-01-17 |url-status=dead |archive-url=https://web.archive.org/web/20120219233043/http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-May/020001.html |archive-date=2012-02-19 }}
- Mozilla Firefox{{Cite web |title=Firefox Source Code Libavcodec |url=https://hg.mozilla.org/mozilla-central/file/tip/media/ffvpx/libavcodec |archive-date= |access-date=2024-01-08 |website=Firefox source code repository}}
=Media center=
=Screen capture=
=Device utilities=
- BitPim – utilities for CDMA phones
=CCTV=
- ZoneMinder – video camera security suite
- Motion – video camera security/monitoring program
=Games=
- Performous – music game including singing, band and dance.
- StepMania
- Ultrastar
- osu!
=Others=
- CorePlayer
- FreeJ
- Ingex Studio – used by BBC
- PulseAudio – includes only resamplers code{{citation |url=http://git.0pointer.de/?p=pulseaudio.git;a=tree;f=src/pulsecore/ffmpeg |archive-url=https://archive.today/20120713060425/http://git.0pointer.de/?p=pulseaudio.git;a=tree;f=src/pulsecore/ffmpeg |url-status=dead |archive-date=2012-07-13 |title=pulseaudio.git/tree – src/pulsecore/ffmpeg/ |publisher=Git.0pointer.de |access-date=2012-01-17 }}
- Steam digital distribution service
References
{{reflist|30em}}
{{Compression Software Implementations}}
{{Compression formats}}
Category:C (programming language) libraries