This is an old revision of the document!
This article describes briefly what H.264 is and how to get H.264 encoding support for Avidemux. It also summarizes and explains the x264 options available in Avidemux. This can be considered a (simple) guide to the encoder.
H.264, which is also known as “MPEG-4 Part-10” or “MPEG-4 Advanced Video Coding” (AVC), is a digital video compression standard, which is noted for achieving very high data compression. While H.264 generally requires more CPU power for playback than video encoded with the older MPEG-4 Part-2 standard (as used by Xvid or DivX), the compression efficiency is much better! That means: With H.264/AVC you can get a significant better quality at the same file size -or- you can get the same quality at a significant smaller file size (compared to MPEG-4 ASP). While H.264 compresses much more efficient than MPEG-4 Part-2, the advantage over MPEG-2 is even greater.
More detailed information about H.264 can be found in the corresponding Wikipedia article. A comparison of various H.264 encoders against MPEG-4 Part-2, MPEG-2 and other video formats can be found here.
While Avidemux uses “built-in” libavcodec from FFmpeg for H.264 decoding, it needs an additional (external) library for H.264 encoding. Therefore Avidemux uses x264. x264 is a free library for encoding H.264/AVC video streams. The code is written from scratch by Laurent Aimar, Loren Merritt, Eric Petit (OS X), Min Chen (VfW/asm), Justin Clay (VfW), Måns Rullgård, Radek Czyz, Christian Heine (asm), Alex Izvorski (asm), and Alex Wright. It is released under the terms of the GPL license. So to clarify, the encoder library is called x264 while the compression standard it uses is called H.264 (or MPEG-4 AVC). In other words: The x264 encoder software creates H.264/AVC video. It should be noted that x264 while being “free” software can compete with commercial H.264 encoders in terms of quality and speed. Major companies in the video business, such as Youtube and Facebook, are known to use the x264 encoder.
If x264 is not available in your version of Avidemux, there is a guide on how to download and compile x264 by yourself. It is in the H.264 section.
After you compile x264, you will have to re-compile Avidemux to build in the x264 feature. There is also a guide on how to do this in the Install -> Compile Avidemux from SVN (Subversion) section.
Note that if you are using the pre-compiled Avidemux builds for Microsoft Windows, the required x264 library ships with the installer. Hence no additional software is required! Stuff like “Codec Packs”, “VFW Codecs” or “DirectShow Filters” will not work with Avidemux! Anyway, the latest builds of the x264 library for Avidemux can be found in this thread (make sure you navigate to the very last post!). These builds usually are newer - and less tested - than the ones that ships with Avidemux.
Avidemux contains most of the options available in the x264 library. For options not yet available, see the “Unavailable” section in this article.