<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd">

<channel>
	<title>austenconstable.com &#187; x264</title>
	<atom:link href="http://www.austenconstable.com/tag/x264/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.austenconstable.com</link>
	<description>a year in the merde</description>
	<lastBuildDate>Thu, 15 Oct 2009 16:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>HOWTO: Compiling the latest FFmpeg &amp; x264 on CentOS 4</title>
		<link>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/</link>
		<comments>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 10:13:50 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[FLV]]></category>
		<category><![CDATA[Nokia N95]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=44</guid>
		<description><![CDATA[Intoduction FFmpeg is a superb video processing tool used to encode and transcode video files. In this particular project I needed to build &#8220;youtube&#8221; style video upload which would transcode into FLV, specifically catering for video files from the Nokia &#8230; <a href="http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Intoduction</h3>
<p>FFmpeg is a superb video processing tool used to encode and transcode video files. In this particular project I needed to build &#8220;youtube&#8221; style video upload which would transcode into FLV, specifically catering for video files from the Nokia N95.</p>
<p>I spent quite a long time messing about with the stock version of ffmpeg on CentOS 4/Ubuntu trying to make it work, but it turned out not to be new enough/have all the right support compiled in.</p>
<p>This howto was written because I couldn&#8217;t find anything that fitted the bill for CentOS/RHEL (And being a Ubuntu man, found it a pain to get it compiled and working under CentOS). It&#8217;s based on the excellent tutorial by FakeOutdoorsman over on the <a href="http://ubuntuforums.org/showthread.php?t=786095" target="_blank" onclick="pageTracker._trackPageview('/outgoing/ubuntuforums.org/showthread.php?t=786095&amp;referer=');">Ubuntu forums</a>. So big thanks to them.</p>
<p>These instructions have been tested on a fresh minimal install of CentOS 4.6 running in a VirtualBox VM.</p>
<h3>Preparation</h3>
<ol>
<li>Ensure that you have the rpmforge repo&#8217;s added to yum. See <a href="http://dag.wieers.com/rpm/FAQ.php#B1" target="_blank" onclick="pageTracker._trackPageview('/outgoing/dag.wieers.com/rpm/FAQ.php_B1?referer=');">here</a> for instructions.</li>
<li>Update the install

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum update</pre></div></div>

</li>
<li>(If you are <strong>not</strong> installing onto a fresh minimal install) Remove ffmpeg, x264 and faad2 to avoid confusion.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum remove <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> x264 faad2 faad2-devel</pre></div></div>

</li>
<li>Install the necessary build tools

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> gcc-c++ <span style="color: #c20cb9; font-weight: bold;">automake</span> <span style="color: #c20cb9; font-weight: bold;">autoconf</span> libtool yasm git subversion</pre></div></div>

</li>
<li>Install the necessary libraries

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> zlib-devel libmad-devel libvorbis-devel libtheora-devel lame-devel faac-devel a52dec-devel xvidcore-devel freetype-devel</pre></div></div>

</li>
</ol>
<h3>Compile supporting libraries</h3>
<ol>
<li>Compile &amp; Install <a href="http://www.audiocoding.com/faad2.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.audiocoding.com/faad2.html?referer=');">faad2</a> (for some reason I couldn&#8217;t get it to compile against the standard rpm version)

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>faac<span style="color: #000000; font-weight: bold;">/</span>faad2-2.6.1.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xzvf faad2-2.6.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> faad2
autoreconf <span style="color: #660033;">-vif</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>Compile &amp; Install <a href="http://gpac.sourceforge.net/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/gpac.sourceforge.net/?referer=');">GPAC</a>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>gpac<span style="color: #000000; font-weight: bold;">/</span>gpac-0.4.4.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> gpac-0.4.4.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> gpac
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> install-lib</pre></div></div>

<p>Note: if the compile fails with a osmozilla related error, please see <a href="http://sourceforge.net/forum/forum.php?thread_id=1950227&amp;forum_id=287546" target="_blank" onclick="pageTracker._trackPageview('/outgoing/sourceforge.net/forum/forum.php?thread_id=1950227_amp_forum_id=287546&amp;referer=');">here</a>. I had to remove mozilla support to get it to compile.</li>
<li>Update the links to the shared libs

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'/usr/local/lib/'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf.d<span style="color: #000000; font-weight: bold;">/</span>gapc-1386.conf
ldconfig</pre></div></div>

</li>
<li>Compile &amp; Install <a href="http://www.videolan.org/developers/x264.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.videolan.org/developers/x264.html?referer=');">x264</a>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
git clone git:<span style="color: #000000; font-weight: bold;">//</span>git.videolan.org<span style="color: #000000; font-weight: bold;">/</span>x264.git
<span style="color: #7a0874; font-weight: bold;">cd</span> x264
.<span style="color: #000000; font-weight: bold;">/</span>configure  <span style="color: #660033;">--enable-pthread</span> <span style="color: #660033;">--enable-mp4-output</span> <span style="color: #660033;">--enable-shared</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>Update the links to the shared libs&#8230;again

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldconfig</pre></div></div>

</li>
</ol>
<h3>Install ffmpeg</h3>
<ol>
<li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>svn.mplayerhq.hu<span style="color: #000000; font-weight: bold;">/</span>ffmpeg<span style="color: #000000; font-weight: bold;">/</span>trunk <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #660033;">--disable-debug</span> <span style="color: #660033;">--enable-shared</span> <span style="color: #660033;">--enable-gpl</span> <span style="color: #660033;">--enable-nonfree</span> <span style="color: #660033;">--enable-postproc</span> <span style="color: #660033;">--enable-swscale</span> <span style="color: #660033;">--enable-pthreads</span> <span style="color: #660033;">--enable-x11grab</span> <span style="color: #660033;">--enable-liba52</span> <span style="color: #660033;">--enable-libx264</span> <span style="color: #660033;">--enable-libxvid</span> <span style="color: #660033;">--enable-libvorbis</span> <span style="color: #660033;">--enable-libfaac</span> <span style="color: #660033;">--enable-libfaad</span> <span style="color: #660033;">--enable-libmp3lame</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>If ffmpeg has problems finding shared libraries, set the LD_LIBRARY_PATH

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; export LD_LIBRARY_PATH'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf
ldconfig</pre></div></div>

<p>I&#8217;m not convinced that this is the <a href="http://xahlee.org/UnixResource_dir/_/ldpath.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/xahlee.org/UnixResource_dir/_/ldpath.html?referer=');">correct thing</a> to do, or the correct way to do it&#8230;but it seems to work&#8230;</li>
<li>All done.</li>
</ol>
<h4>Additional resources:</h4>
<p><a href="http://www.nazly.net/index.php?page=showevents&amp;selTopic=230" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.nazly.net/index.php?page=showevents_amp_selTopic=230&amp;referer=');">http://www.nazly.net/index.php?page=showevents&amp;selTopic=230</a></p>
<p><a href="http://www.tuxmachines.org/node/17063" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.tuxmachines.org/node/17063?referer=');">http://www.tuxmachines.org/node/17063</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/08/06/howto-compiling-the-latest-ffmpeg-x264-on-centos-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

