Misplaced Pages

Libav

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

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

#677322

62-471: 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

124-454: A codeword . When a codeword is received or read, the device either compares its check value with one freshly calculated from the data block, or equivalently, performs a CRC on the whole codeword and compares the resulting check value with an expected residue constant. If the CRC values do not match, then the block contains a data error. The device may take corrective action, such as rereading

186-469: A zigzag scan pattern that shows how MPEG video codecs handle entropy encoding . On March 13, 2011, a group of FFmpeg developers decided to fork the project under the name Libav . The event was related to an issue in project management, in which developers disagreed with the leadership of FFmpeg. On January 10, 2014, two Google employees announced that over 1000 bugs had been fixed in FFmpeg during

248-411: A 3-bit CRC: The algorithm acts on the bits directly above the divisor in each step. The result for that iteration is the bitwise XOR of the polynomial divisor with the bits above it. The bits not above the divisor are simply copied directly below for that step. The divisor is then shifted right to align with the highest remaining 1 bit in the input, and the process is repeated until the divisor reaches

310-405: A desired error detection power. The BCH codes are a powerful class of such polynomials. They subsume the two examples above. Regardless of the reducibility properties of a generator polynomial of degree  r , if it includes the "+1" term, the code will be able to detect error patterns that are confined to a window of r contiguous bits. These patterns are called "error bursts". The concept of

372-420: A divisor that guarantees good error-detection properties. In this analysis, the digits of the bit strings are taken as the coefficients of a polynomial in some variable x —coefficients that are elements of the finite field GF(2) (the integers modulo 2, i.e. either a zero or a one), instead of more familiar numbers. The set of binary polynomials is a mathematical ring . The selection of the generator polynomial

434-412: A name of the form CRC- n -XXX as in the table below. The simplest error-detection system, the parity bit , is in fact a 1-bit CRC: it uses the generator polynomial  x + 1 (two terms), and has the name CRC-1. A CRC-enabled device calculates a short, fixed-length binary sequence, known as the check value or CRC , for each block of data to be sent or stored and appends it to the data, forming

496-555: A particular protocol can impose pre-inversion, post-inversion and reversed bit ordering as described above. For example, the CRC32 used in Gzip and Bzip2 use the same polynomial, but Gzip employs reversed bit ordering, while Bzip2 does not. Note that even parity polynomials in GF(2) with degree greater than 1 are never primitive. Even parity polynomial marked as primitive in this table represent

558-468: A polynomial according to the application requirements and the expected distribution of message lengths. The number of distinct CRCs in use has confused developers, a situation which authors have sought to address. There are three polynomials reported for CRC-12, twenty-two conflicting definitions of CRC-16, and seven of CRC-32. The polynomials commonly applied are not the most efficient ones possible. Since 1993, Koopman, Castagnoli and others have surveyed

620-525: A received message can easily be verified by performing the above calculation again, this time with the check value added instead of zeroes. The remainder should equal zero if there are no detectable errors. The following Python code outlines a function which will return the initial CRC remainder for a chosen input and polynomial, with either 1 or 0 as the initial padding. Note that this code works with string inputs rather than raw numbers: Mathematical analysis of this division-like process reveals how to select

682-471: 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

SECTION 10

#1732790919678

744-401: 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), an audio/video container mux and demux library, and libavfilter, a library for enhancing and editing filters through a GStreamer -like filtergraph. FFmpeg

806-442: 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 ,

868-658: 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. 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

930-465: Is n bits long. For a given n , multiple CRCs are possible, each with a different polynomial. Such a polynomial has highest degree n , which means it has n + 1 terms. In other words, the polynomial has a length of n + 1 ; its encoding requires n + 1 bits. Note that most polynomial specifications either drop the MSb or LSb , since they are always 1. The CRC and associated polynomial typically have

992-589: 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: The libraries: This library includes Adler-32 , CRC , MD5 , SHA-1 , LZO decompressor, Base64 encoder/decoder, DES encrypter/decrypter, RC4 encrypter/decrypter and AES encrypter/decrypter. Numerous free and open-source implementations of existing algorithms for

1054-577: Is an easily reversible function, which makes it unsuitable for use in digital signatures. Thirdly, CRC satisfies a relation similar to that of a linear function (or more accurately, an affine function ): where c {\displaystyle c} depends on the length of x {\displaystyle x} and y {\displaystyle y} . This can be also stated as follows, where x {\displaystyle x} , y {\displaystyle y} and z {\displaystyle z} have

1116-442: Is called an n -bit CRC when its check value is n -bits. For a given n , multiple CRCs are possible, each with a different polynomial. Such a polynomial has highest degree n , and hence n + 1 terms (the polynomial has a length of n + 1 ). The remainder has length n . The CRC has a name of the form CRC- n -XXX. The design of the CRC polynomial depends on the maximum total length of the block to be protected (data + CRC bits),

1178-548: Is no authentication, an attacker can edit a message and recompute the CRC without the substitution being detected. When stored alongside the data, CRCs and cryptographic hash functions by themselves do not protect against intentional modification of data. Any application that requires protection against such attacks must use cryptographic authentication mechanisms, such as message authentication codes or digital signatures (which are commonly based on cryptographic hash functions). Secondly, unlike cryptographic hash functions, CRC

1240-484: 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

1302-646: Is omitted. So the polynomial x 4 + x + 1 {\displaystyle x^{4}+x+1} may be transcribed as: In the table below they are shown as: CRCs in proprietary protocols might be obfuscated by using a non-trivial initial value and a final XOR, but these techniques do not add cryptographic strength to the algorithm and can be reverse engineered using straightforward methods. Numerous varieties of cyclic redundancy checks have been incorporated into technical standards . By no means does one algorithm, or one of each degree, suit every purpose; Koopman and Chakravarty recommend selecting

SECTION 20

#1732790919678

1364-539: 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 . 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. The project

1426-576: Is repeated and, in the event the check values do not match, corrective action can be taken against data corruption. CRCs can be used for error correction (see bitfilters ). CRCs are so called because the check (data verification) value is a redundancy (it expands the message without adding information ) and the algorithm is based on cyclic codes . CRCs are popular because they are simple to implement in binary hardware , easy to analyze mathematically, and particularly good at detecting common errors caused by noise in transmission channels. Because

1488-399: Is sent to Earth. Cyclic redundancy check A cyclic redundancy check ( CRC ) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to digital data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation

1550-520: Is the most important part of implementing the CRC algorithm. The polynomial must be chosen to maximize the error-detecting capabilities while minimizing overall collision probabilities. The most important attribute of the polynomial is its length (largest degree(exponent) +1 of any one term in the polynomial), because of its direct influence on the length of the computed check value. The most commonly used polynomial lengths are 9 bits (CRC-8), 17 bits (CRC-16), 33 bits (CRC-32), and 65 bits (CRC-64). A CRC

1612-805: The European Union , 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. FFmpeg is used by software such as Blender , Cinelerra-GG Infinity , HandBrake , Kodi , MPC-HC , Plex , Shotcut , VirtualDub2 (a VirtualDub fork), VLC media player , xine and YouTube . It handles video and audio playback in Google Chrome and

1674-419: 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: Libav includes video decoders and/or encoders for the following formats: Libav includes decoders and encoders for the following formats: Additionally to

1736-771: The 32-bit polynomial were in their 1975 publications: Technical Report 2956 by Brayer for Mitre, published in January and released for public dissemination through DTIC in August, and Hammond, Brown and Liu's report for the Rome Laboratory, published in May. Both reports contained contributions from the other team. During December 1975, Brayer and Hammond presented their work in a paper at the IEEE National Telecommunications Conference:

1798-481: The CRC as an error-detecting code gets complicated when an implementer or standards committee uses it to design a practical system. Here are some of the complications: These complications mean that there are three common ways to express a polynomial as an integer: the first two, which are mirror images in binary, are the constants found in code; the third is the number found in Koopman's papers. In each case, one term

1860-754: The CRC-32C (Castagnoli) polynomial. The design of the 32-bit polynomial most commonly used by standards bodies, CRC-32-IEEE, was the result of a joint effort for the Rome Laboratory and the Air Force Electronic Systems Division by Joseph Hammond, James Brown and Shyan-Shiang Liu of the Georgia Institute of Technology and Kenneth Brayer of the Mitre Corporation . The earliest known appearances of

1922-488: 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,

Libav - Misplaced Pages Continue

1984-553: The IEEE CRC-32 polynomial is the generating polynomial of a Hamming code and was selected for its error detection performance. Even so, the Castagnoli CRC-32C polynomial used in iSCSI or SCTP matches its performance on messages from 58 bits to 131 kbits, and outperforms it in several size ranges including the two most common sizes of Internet packet. The ITU-T G.hn standard also uses CRC-32C to detect errors in

2046-645: The Linux version of Firefox. GUI front-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 's Mars 2020 mission, FFmpeg is used by the Perseverance rover on Mars for image and video compression before footage

2108-553: The United States which have implemented software patents , but are considered unenforceable or void in countries that have not implemented software patents. 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

2170-400: 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.): Support for several communications protocols is also contained in Libav. Here is a list: FFmpeg FFmpeg is a free and open-source software project consisting of

2232-426: The associated code is able to detect any single-bit or double-bit errors. We can improve this situation. If we use the generator polynomial g ( x ) = p ( x ) ( 1 + x ) {\displaystyle g(x)=p(x)(1+x)} , where p {\displaystyle p} is a primitive polynomial of degree r − 1 {\displaystyle r-1} , then

2294-428: The benefit of being particularly well suited for the detection of burst errors : contiguous sequences of erroneous data symbols in messages. This is important because burst errors are common transmission errors in many communication channels , including magnetic and optical storage devices. Typically an n -bit CRC applied to a data block of arbitrary length will detect any single error burst not longer than n bits, and

2356-427: The bits representing the input in a row, and position the ( n + 1 )-bit pattern representing the CRC's divisor (called a " polynomial ") underneath the left end of the row. In this example, we shall encode 14 bits of message with a 3-bit CRC, with a polynomial x + x + 1 . The polynomial is written in binary as the coefficients; a 3rd-degree polynomial has 4 coefficients ( 1 x + 0 x + 1 x + 1 ). In this case,

2418-522: The block or requesting that it be sent again. Otherwise, the data is assumed to be error-free (though, with some small probability, it may contain undetected errors; this is inherent in the nature of error-checking). CRCs are specifically designed to protect against common types of errors on communication channels, where they can provide quick and reasonable assurance of the integrity of messages delivered. However, they are not suitable for protecting against intentional alteration of data. Firstly, as there

2480-448: The check value has a fixed length, the function that generates it is occasionally used as a hash function . CRCs are based on the theory of cyclic error-correcting codes . The use of systematic cyclic codes, which encode messages by adding a fixed-length check value, for the purpose of error detection in communication networks, was first proposed by W. Wesley Peterson in 1961. Cyclic codes are not only simple to implement but have

2542-418: The coefficients are 1, 0, 1 and 1. The result of the calculation is 3 bits long, which is why it is called a 3-bit CRC. However, you need 4 bits to explicitly state the polynomial. Start with the message to be encoded: This is first padded with zeros corresponding to the bit length n of the CRC. This is done so that the resulting code word is in systematic form. Here is the first calculation for computing

Libav - Misplaced Pages Continue

2604-400: The desired error protection features, and the type of resources for implementing the CRC, as well as the desired performance. A common misconception is that the "best" CRC polynomials are derived from either irreducible polynomials or irreducible polynomials times the factor  1 + x , which adds to the code the ability to detect all errors affecting an odd number of bits. In reality, all

2666-625: The environment, these APIs may lead to specific ASICs, to GPGPU routines, or to SIMD CPU code. 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 . In addition to FFV1 and Snow formats, which were created and developed from within FFmpeg,

2728-407: The factors described above should enter into the selection of the polynomial and may lead to a reducible polynomial. However, choosing a reducible polynomial will result in a certain proportion of missed errors, due to the quotient ring having zero divisors . The advantage of choosing a primitive polynomial as the generator for a CRC code is that the resulting code has maximal total block length in

2790-463: The following filters. FFmpeg supports the following devices via external libraries. 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 patents . 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

2852-401: The fraction of all longer error bursts that it will detect is approximately (1 − 2 ) . Specification of a CRC code requires definition of a so-called generator polynomial . This polynomial becomes the divisor in a polynomial long division , which takes the message as the dividend and in which the quotient is discarded and the remainder becomes the result. The important caveat is that

2914-600: The libav-user mailing list, for questions and discussions about using the FFmpeg libraries, is unrelated to the Libav project. 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. 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

2976-595: The logo and requested FFmpeg cease and desist from using it. FFmpeg subsequently altered their logo into a 3D version. 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. Libav primarily consists of libavcodec, which

3038-404: The maximal total block length is 2 r − 1 − 1 {\displaystyle 2^{r-1}-1} , and the code is able to detect single, double, triple and any odd number of errors. A polynomial g ( x ) {\displaystyle g(x)} that admits other factorizations may be chosen then so as to balance the maximal total blocklength with

3100-471: The multimedia field entirely. 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)

3162-912: 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 incl. WebM . 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 . There are

SECTION 50

#1732790919678

3224-486: The payload (although it uses CRC-16-CCITT for PHY headers ). CRC-32C computation is implemented in hardware as an operation ( CRC32 ) of SSE4.2 instruction set, first introduced in Intel processors' Nehalem microarchitecture. ARM AArch64 architecture also provides hardware acceleration for both CRC-32 and CRC-32C operations. The table below lists only the polynomials of the various algorithms in use. Variations of

3286-427: The polynomial coefficients are calculated according to the arithmetic of a finite field , so the addition operation can always be performed bitwise-parallel (there is no carry between digits). In practice, all commonly used CRCs employ the finite field of two elements, GF(2) . The two elements are usually called 0 and 1, comfortably matching computer architecture. A CRC is called an n -bit CRC when its check value

3348-418: 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 interfaces . The project publishes a new release every three months on average. While release versions are available from

3410-446: The project also supports the following formats: Output formats (container formats and other ways of creating output streams) in FFmpeg are called "muxers". FFmpeg supports, among others, the following: 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,

3472-448: The right-hand end of the input row. Here is the entire calculation: Since the leftmost divisor bit zeroed every input bit it touched, when this process ends the only bits in the input row that can be nonzero are the n bits at the right-hand end of the row. These n bits are the remainder of the division step, and will also be the value of the CRC function (unless the chosen CRC specification calls for some postprocessing). The validity of

3534-536: The same length as a result, even if the CRC is encrypted with a stream cipher that uses XOR as its combining operation (or mode of block cipher which effectively turns it into a stream cipher, such as OFB or CFB), both the message and the associated CRC can be manipulated without knowledge of the encryption key; this was one of the well-known design flaws of the Wired Equivalent Privacy (WEP) protocol. To compute an n -bit binary CRC, line

3596-470: The sense that all 1-bit errors within that block length have different remainders (also called syndromes ) and therefore, since the remainder is a linear function of the block, the code can detect all 2-bit errors within that block length. If r {\displaystyle r} is the degree of the primitive generator polynomial, then the maximal total block length is 2 r − 1 {\displaystyle 2^{r}-1} , and

3658-406: The space of polynomials between 3 and 64 bits in size, finding examples that have much better performance (in terms of Hamming distance for a given message size) than the polynomials of earlier protocols, and publishing the best of these with the aim of improving the error detection capacity of future standards. In particular, iSCSI and SCTP have adopted one of the findings of this research,

3720-564: 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 . 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

3782-463: 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,

SECTION 60

#1732790919678

3844-509: Was started by Fabrice Bellard (using the pseudonym "Gérard Lantau") in 2000, and was led by Michael Niedermayer from 2004 until 2015. 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". The logo represents

#677322