# Libav

Libav is an abandoned free software project, forked from FFmpeg in 2011, that contains libraries and programs for handling multimedia data.

## History
### Fork from FFmpeg

The Libav project was a fork of the FFmpeg project. It was announced on March 13, 2011 by a group of FFmpeg developers. The event was related to an issue in project management and different goals: FFmpeg supporters wanted to keep development velocity in favour of more features, while Libav supporters and developers wanted to improve the state of the code and take the time to design better APIs.
The maintainer of the FFmpeg packages for Debian and Ubuntu, being one of the group of developers who forked FFmpeg, switched the packages to this fork in 2011. Hence, most software on these systems that depended on FFmpeg automatically switched to Libav. On July 8, 2015, Debian announced it would return to FFmpeg for various, technical reasons. Several arguments justified this step. Firstly, FFmpeg had a better record of responding to vulnerabilities than Libav. Secondly, Mateusz "j00ru" Jurczyk, a security-oriented developer at Google, argued that all issues he found in FFmpeg were fixed in a timely manner, while Libav was still affected by various bugs. Finally, FFmpeg supported a far wider variety of codecs and containers than Libav.
As of 2022, Libav is an abandoned software project, with Libav developers either returning to FFmpeg, moving to other multimedia projects like the AV1 video codec, or leaving the multimedia field entirely.

### Confusion

At the beginning of this fork, Libav and FFmpeg separately developed their own versions of the ffmpeg command. Libav then renamed their ffmpeg to avconv to distance themselves from the FFmpeg project. During the transition period, when a Libav user typed ffmpeg, there was a message telling the user that the ffmpeg command was deprecated and avconv has to be used instead. This confused some users into thinking that FFmpeg (the project) was dead.
This message was removed upstream when ffmpeg was finally removed from the Libav sources. In June 2012, on Ubuntu 12.04, the message was re-worded, but that new "deprecated" message caused even more user confusion. Starting with Ubuntu 15.04 "Vivid", FFmpeg's ffmpeg is back in the repositories again.
To further complicate matters, Libav chose a name that was used by FFmpeg to refer to its libraries (libavcodec, libavformat, etc.). For example, the libav-user mailing list, for questions and discussions about using the FFmpeg libraries, is unrelated to the Libav project.

### Software using Libav instead of FFmpeg

Debian followed Libav when it was announced, and announced it would return to FFmpeg for Debian Stretch (9.0).
MPlayer2, a defunct fork of MPlayer, used Libav exclusively, but could be used with GStreamer with its public API. The MPV media player no longer supports Libav due to missing API changes.

## Legal aspects
### Codecs

Libav contains more than 100 codecs. Many codecs that compress information have been claimed by patent holders. 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.

### Logo

The Libav logo uses a zigzag pattern that references how MPEG video codecs handle entropy encoding. It was previously the logo of the FFmpeg project until Libav was forked from it. Following the fork, in 2011 one of the Libav developers Måns Rullgård claimed copyright over the logo and requested FFmpeg cease and desist from using it. FFmpeg subsequently altered their logo into a 3D version.

## Google Summer of Code participation

Libav participated in the Google Summer of Code program in 2011 and 2012.
With participation in the Google Summer of Code, Libav has had many new features and improvements developed, including a WMVP/WVP2 decoder, hardware accelerated H.264 decoding on Android, and G.723.1 codec support.

## Technical details
### Components

Libav primarily consists of libavcodec, which is an audio/video codec library used by several other projects, libavformat, which is an audio/video container muxing and demuxing library, and avconv, which is a multimedia manipulation tool similar to FFmpeg's ffmpeg or Gstreamer gst-launch-1.0 command.
The command line-programs:

#### avconv

    A video and audio converter that can also grab from a live audio/video source.

#### avserver

    A streaming server for both audio and video.

#### avplay

    A very simple and portable media player using the Libav libraries and the SDL library.

#### avprobe

    Gathers information from multimedia streams and prints it in human- and machine-readable fashion.
The libraries:

#### libavcodec

    A library containing all the Libav audio/video encoders and decoders.

#### libavfilter

    The substitute for vhook which allows the video/audio to be modified or examined between the decoder and the encoder.

#### libavformat

    A library containing demuxers and muxers for audio and video container formats.

#### libavresample

    A library containing audio resampling routines.

#### libavutil

    A helper library containing routines common to different parts of Libav.
This library includes Adler-32, CRC, MD5, SHA-1, LZO decompressor, Base64 encoder/decoder, DES encrypter/decrypter, RC4 encrypter/decrypter and AES encrypter/decrypter.

#### libswscale

    A library containing video image scaling and colorspace/pixelformat conversion routines.

### Contained codecs

Numerous free and open-source implementations of existing algorithms for the (usually lossy) compression and decompression of audio or video data, called codecs, are available. Please note that an algorithm can be subject to patent law in some jurisdictions. Here are lists of the ones contained in the libav library:

#### Video codecs

Libav includes video decoders and/or encoders for the following formats:

#### Audio codecs

Libav includes decoders and encoders for the following formats:

### Supported file formats

Additionally to the aforementioned codecs, Libav also supports several file formats (file formats designed to contain audio and/or video data and subtitles, are called "containers", but that is just a special denomination.):

### Supported protocols

Support for several communications protocols is also contained in Libav. Here is a list:
* IETF standards: TCP, UDP, Gopher, HTTP, RTP, RTSP and SDP
* Apple related protocols: HTTP Live Streaming
* RealMedia related protocols: RealMedia RTSP/RDT
* Adobe related protocols: RTMP, RTMPT (via librtmp), RTMPE (via librtmp), RTMPTE (via librtmp) and RTMPS (via librtmp)
* Microsoft related protocols: MMS over TCP and MMS over HTTP