from Wikipedia, the free encyclopedia

Basic data

developer x264 team
Current  version r2969
(March 12, 2019)
operating system platform independent
programming language ISO-C
category Video compression
License GPL , proprietary (optional)

x264 is a cross-platform encoder for the video format H.264 (MPEG-4 AVC) and is published under the GNU General Public License .

The x264 encoder library is developed by Laurent Aimar, Loren Merritt, Fiona Glaser, Eric Petit, Min Chen, Justin Clay, Måns Rullgård, Radek Czyz, Christian Heine, Holger Lubitz, Alex Izvorski, and Alex Wright. The program code is written in ISO-C .


The x264 encoder may be used. a. made available as a command line program (CLI). The program can process uncompressed raw data ( YCbCr color model 4: 2: 0 format), AviSynth scripts and all formats that FFmpeg can read as a source .

Alternatively, there are various graphical user interfaces that simplify the operation of the CLI encoder. The most popular are StaxRip, MeGUI , Gordian Knot , HandBrake and x264gtk. The platform-independent video editor Avidemux also offers the option of encoding videos with x264. In addition, a wrapper for the Video-for-Windows interface (VfW) is available, which enables the use of x264 in VirtualDub . However, the VfW interface of x264 is subject to some restrictions and is not recommended by the developers. In order to emphasize this recommendation, the VfW version has meanwhile been discontinued. With DTS x264 VfW there is an unofficial version that restores the compatibility with the AVI format, supports the decoding of videos and can be used as usual. Another possibility to use the x264 encoder via a command line interface is with MEncoder or FFmpeg.

Technical details

As an H.264 encoder, x264 works much more efficiently than encoders based on the simpler MPEG-4 ASP (such as the DivX codec up to v6), or those encoders that use the even older MPEG-2 process. This means that compared to earlier codecs, x264 delivers better image quality at a given data rate or achieves a higher level of compression for a given quality. x264 also supports the more demanding profiles such as the High Profile and Hi10p of the H.264 standard (details in the corresponding article). In addition, x264 is able to perform certain calculations in parallel, so that symmetrical multiprocessor systems can be optimally used. However, some functions of the H.264 standard have not (yet) been implemented in the x264 codec, such as the error correction of the Baseline Profile . It should also be noted that x264 - like any H.264 codec - is significantly more computationally intensive than the simpler MPEG-4 ASP-based codecs. Encoding therefore requires more time and greater demands are placed on the system for playback. Playback with processors below 800 MHz can therefore cause problems, especially if these do not have the SSE command set. Since r1480 it has been possible with the x264 encoder to generate bit streams that correspond to the Blu-ray Disc specification and thus to use it when creating Blu-ray Discs.

Supported H.264 features

  • Multiple references
  • Intra-Frames: All macroblock types (16 × 16, 8 × 8 (high profile), and 4 × 4 with all forecasts)
  • Within P-pictures : All partition sizes (from 16 × 16 to 4 × 4)
  • Within B-scans : partitions from 16 × 16 to 8 × 8 (including skip / direct)
  • B-frames as reference / any frame order
  • 8 × 8 and 4 × 4 adaptive spatial transformation (high profile)
  • Lossless compression (optional)
  • Custom Quantization Matrices (High Profile)
  • Optimized for several processors or multi-core processors
  • Mixed reference frames for sub-macroblocks
  • Integrated deblocking filter
  • Interlace procedure (MBAFF)
  • 8-, 9- and 10-bit sampling depth
  • Support for 4: 2: 0, 4: 2: 2 and 4: 4: 4 chroma subsampling

Additional characteristics

  • Frame- based multithreading , scaled to at least 16 CPU cores
  • Different modes for controlling the data rate : constant quantization, constant data rate, average data rate with one or more passes
  • Bit rate control using the macroblock tree method
  • Lookahead VBV (Video Buffering Verifier)
  • Psychovisually optimized adjustment of the bit rate to the image quality ("Psy RDO") and trellis quantization ("Psy Trellis")
  • Variance AQ (Adaptive Quantization) and AutoVAQ
  • Optimal adaptive B-frame control
  • Support of multiple slices ("Multi-slice") is required for BluRay compatibility
  • Lookahead function in a separate thread ("Threaded lookahead")
  • Weighted P-Frame Prediction (developed as part of GSoC 2009 )
  • Bit rate / quality optimization
  • Scene change detection
  • Various motion detection modes (including diamond, hexagon, multi-hexagon and exhaustive search)
  • DCT - Domain Noise Filter
  • RD-optimized quantization ("Trellis")

Projects with x264

Free and open source software

x264 is a free open source software ( FOSS ). This means, among other things, that the source code is freely available and that you can compile the program yourself . It is possible to adapt the program to your own main processor and the operating system. There are no official builds on the x264 homepage, only the current version of the source code. However, various unofficial builds are available so that even users without special knowledge can easily install and use the x264 codec. Ready-made builds are available for Windows (32-bit, 64-bit), Linux or macOS, for example . The most common x264 builds for Windows are currently those from Sharktooth (Doom9.net forum) and Bob0r (www.x264.nl). Updates are available there almost daily.

On July 14, 2010, Jason Garrett-Glaser, the current project manager, announced that x264 can now also be purchased with a commercial license so that licensees can also sell the software without having to offer the source code (themselves) . The cheapest license fee is said to be $ 10,000 for 10,000 encoder units. The first licensee is Pegasys TMPGEnc .

Web links

Individual evidence

  1. Index of / pub / x264 / binaries / win64 /. Retrieved June 10, 2019 .
  2. FFMS2 / libav * patch ( x264-git ( Memento from September 21, 2011 in the Internet Archive ))
  3. Codecs.com: DTS x264 VfW ( Memento of March 1, 2008 in the Internet Archive )
  4. Historical notes: ( Memento of March 4, 2016 in the Internet Archive )
  5. http://forum.doom9.org/showthread.php?t=148686
  6. http://forum.doom9.org/showthread.php?t=148964
  7. http://forum.doom9.org/showthread.php?t=138293
  8. http://forum.doom9.org/showthread.php?t=132760
  9. http://forum.doom9.org/showthread.php?t=147067
  10. http://forum.doom9.org/showthread.php?t=139827
  11. Multi-slice encoding support ( Memento from November 1, 2011 in the Internet Archive )
  12. Threaded lookahead ( Memento from November 1, 2011 in the Internet Archive )
  13. Weighted P-frame prediction ( Memento from November 1, 2011 in the Internet Archive )
  14. https://www.heise.de/newsticker/meldung/Kommerzielle-Lianzen-fuer-H-264-Encoder-x264-1037582.html
  15. http://mailman.videolan.org/pipermail/x264-devel/2010-July/007508.html
  16. Diary Of An x264 Developer ( Memento from November 30, 2010 in the Internet Archive )