| Xvid | |
|---|---|
| Initial release | 2001; 24 years ago (2001) (as XviD) |
| Stable release | 1.3.7 (December 28, 2019; 5 years ago (2019-12-28)) [±] |
| Preview release | SVN [±] |
| Repository | websvn |
| Written in | C |
| Operating system | Cross-platform |
| Size | 11 MB |
| Standard | MPEG-4 ASP |
| Type | Video codec |
| License | GNU General Public License, version 2 (SPDX identifier: GPL-2.0-or-later) |
| Website | www |
Xvid (formerly "XviD") is avideo codeclibrary following theMPEG-4video coding standard, specificallyMPEG-4 Part 2 Advanced Simple Profile (ASP). It uses ASP features such asb-frames, global and quarter pixelmotion compensation,lumi masking,trellis quantization, andH.263, MPEG and customquantization matrices.
Xvid is a primary competitor of theDivX Pro Codec.In contrast with the DivX codec, which isproprietary software developed byDivX, LLC, Xvid isfree software distributed under the terms of theGNU General Public License.[1] This also means that unlike the DivX codec, which is only available for a limited number of platforms,[2] Xvid can be used on all platforms and operating systems for which the source code can be compiled.
In January 2001,DivXNetworks foundedOpenDivX as part ofProject Mayo which was intended to be a home for open source multimedia projects. OpenDivX was an open-source MPEG-4 video codec based on a stripped-down version of the MoMuSys reference MPEG-4 encoder. The source code, however, was placed under a restrictive license and only members of the DivX Advanced Research Centre (DARC) had write access to the project'sCVS. In early 2001, DARC member Sparky wrote an improved version of the encoding core called encore2. This was updated several times before, in April, it was removed from CVS without warning. The explanation given by Sparky was"We (our bosses) decided that we are not ready to have it in public yet."[3]
In July 2001, developers started complaining about a lack of activity in the project; the last CVS commit was several months old, bugfixes were being ignored, and promised documentation had not been written. Soon after, DARC released a beta version of their closed-source commercial DivX 4 codec, which was based on encore2, saying that"what the community really wants is aWinamp, not aLinux."[4] It was after this that afork of OpenDivX was created, using the latest version of encore2 that was downloaded before it was removed. Since then, all the OpenDivX code has been replaced and Xvid has been published under theGNU General Public License.
As an implementation ofMPEG-4 Part 2, Xvid uses many patented technologies.[5] For this reason, Xvid 0.9.x versions were not licensed in countries where thesesoftware patents are recognized. With the 1.0.x releases, a GNU GPL v2 license is used with no explicit geographical restriction.
The last US patents expired in November 2023. The only patents left worldwide are in Brazil. TheFedora Project, a community backed byRed Hat, has imported xvidcore to its repositories on January 24, 2023.[6]
In July 2002,Sigma Designs released an MPEG-4 video codec called the REALmagic MPEG-4 Video Codec. Before long, people testing this new codec found that it contained considerable portions of Xvid code. Sigma Designs was contacted and confirmed that a programmer had based REALmagic on Xvid, but assured that all GPL code would be replaced to avoid copyright infringement. When Sigma Designs released the supposedly rewritten REALmagic codec, the Xvid developers immediately disassembled it and concluded that it still contained Xvid code, only rearranged in an attempt todisguise its presence. The Xvid developers decided to stop work and go public to force Sigma Designs to respect the terms of the GPL. After articles were published inSlashdot[7] andThe Inquirer,[8] in August 2002 Sigma Designs agreed to publish their source code.[9]

Xvid is not avideo format; it is a program for compressing to and decompressing from (hence the namecodec) the MPEG-4 ASP format. Since Xvid usesMPEG-4 Advanced Simple Profile (ASP) compression, video encoded with Xvid is MPEG-4 ASP video (not "Xvid video"), and can therefore theoretically be decoded with all ASP-compliant decoders. This includes a large number of media players and decoders based onlibavcodec (such asMPlayer,VLC,ffdshow orPerian). As of 2016[update], xvid.com carries binaries for using the codec.[10] However, early versions of the codec had a bug that prevented XviD-encoded files from being decoded with DivX, even when they were encoded using the DivX fourcc.
Xvid encoded files can be written to aCD orDVD and played in some (but not all) DivX compatibleDVD players andmedia players. However, Xvid can optionally encode video with advanced MPEG-4 features that most DivX Certified set-top players do not support. Files encoded withglobal motion compensation,Qpel, MPEGquantization, multipleB-frames or files that exceed theVideo buffering verifier limitations may not play back properly on DivX Certified hardware devices.
For example, Xvid specifies three warp points for its implementation of global motion compensation as opposed to the single warp point implementation of DivX. Enabling some of the more advanced encoding features can compromise player compatibility. Some issues exist with the custom quantization matrices used in tools such asAutoGK that automate encoding with Xvid. This can (depending on the decoder chipset of the set-top player in question) produce videos that have unstable playback and artifacts. However, most recent model DivX compatibleDVD players have improved support for custom quantization matrices.
| Operating systems | Software | Comment |
|---|---|---|
| Windows | VirtualDub, DVDx, xvid encraw, AutoGK, MeGUI etc. | And all other applications that support encoding through theVfW framework. |
| Mac OS X,Linux,BSD, andWindows | MEncoder,Avidemux,VLC,[11] WinFF (graphical front-end based onFFmpeg), etc. | These platform and framework independent applications access the Xvid library directly. |
Xvid is Free Software and published under the GNU GPL license.
In March 2001, a rewritten encoder library was committed to the CVS (by a DivXNetworks staff). The rewritten library was removed shortly after, with DivXNetworks citing that "We (our bosses) decided that we are not ready to have it in public yet."