<?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; HOWTO</title>
	<atom:link href="http://www.austenconstable.com/category/howto/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: Remove GWT package from url when using gwt-maven</title>
		<link>http://www.austenconstable.com/2009/03/13/howto-remove-gwt-package-from-url-when-using-gwt-maven/</link>
		<comments>http://www.austenconstable.com/2009/03/13/howto-remove-gwt-package-from-url-when-using-gwt-maven/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 14:49:05 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=193</guid>
		<description><![CDATA[Seriously, who wants a url like /my.long.package.name.Application/Application.html To remedy this use the following steps: Make the webapp directory the same as the output for your gwt code. ... &#60;plugin&#62; &#60;groupId&#62;org.apache.maven.plugins&#60;/groupId&#62; &#60;artifactId&#62;maven-war-plugin&#60;/artifactId&#62; &#60;configuration&#62; &#60;webappDirectory&#62;${project.build.directory}/${project.build.finalName}/my.long.package.name.Application &#60;/webappDirectory&#62; &#60;/configuration&#62; &#60;/plugin&#62; ... Ensure that your &#8230; <a href="http://www.austenconstable.com/2009/03/13/howto-remove-gwt-package-from-url-when-using-gwt-maven/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Seriously, who wants a url like /my.long.package.name.Application/Application.html</p>
<p>To remedy this use the following steps:</p>
<ol>
<li>Make the webapp directory the same as the output for your gwt code.

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-war-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webappDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${project.build.directory}/${project.build.finalName}/my.long.package.name.Application	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webappDirectory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

</li>
<li>Ensure that your rpc servlets don&#8217;t have the package as a prefix.

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.totsp.gwt<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-googlewebtoolkit2-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	...
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		...
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webXmlServletPathAsIs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webXmlServletPathAsIs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
...</pre></div></div>

</li>
<li>Change your index.html file to point to your app.<br />
From:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;REFRESH&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0;url=my.long.package.name.Application/Application.html&quot;</span>&gt;</span></pre></div></div>

<p>To:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;REFRESH&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0;url=Application.html&quot;</span>&gt;</span></pre></div></div>

</li>
<li>Your done.</li>
</ol>
<p>Additional resources:<br />
<a href="http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f8b06676098b8cc6" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f8b06676098b8cc6?referer=');">http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f8b06676098b8cc6</a></p>
<p><a href="http://groups.google.com/group/gwt-maven/browse_thread/thread/a46f540ca823e3d3/7d5febf0776958db?lnk=gst&amp;q=rename#7d5febf0776958db" onclick="pageTracker._trackPageview('/outgoing/groups.google.com/group/gwt-maven/browse_thread/thread/a46f540ca823e3d3/7d5febf0776958db?lnk=gst_amp_q=rename_7d5febf0776958db&amp;referer=');">http://groups.google.com/group/gwt-maven/browse_thread/thread/a46f540ca823e3d3/7d5febf0776958db?lnk=gst&amp;q=rename#7d5febf0776958db</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2009/03/13/howto-remove-gwt-package-from-url-when-using-gwt-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Run your java web app as the root context on Tomcat</title>
		<link>http://www.austenconstable.com/2009/03/13/howto-run-your-java-web-app-as-the-root-context-on-tomcat/</link>
		<comments>http://www.austenconstable.com/2009/03/13/howto-run-your-java-web-app-as-the-root-context-on-tomcat/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 10:21:30 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=186</guid>
		<description><![CDATA[If you have a context XML fragment in your war (META-INF/context.xml) then it&#8217;s as easy as renaming your war file to ROOT.war If you&#8217;re using the maven build system then just alter your pom to have: &#60;build&#62; &#60;finalName&#62;ROOT&#60;/finalName&#62; ... &#60;/build&#62; &#8230; <a href="http://www.austenconstable.com/2009/03/13/howto-run-your-java-web-app-as-the-root-context-on-tomcat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have a context XML fragment in your war (<code>META-INF/context.xml</code>) then it&#8217;s as easy as renaming your war file to <code>ROOT.war</code></p>
<p>If you&#8217;re using the maven build system then just alter your pom to have:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ROOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Simple when you know how&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2009/03/13/howto-run-your-java-web-app-as-the-root-context-on-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Setup a shell Java Struts 2 web app using Maven 2 &amp; Eclipse 3.4</title>
		<link>http://www.austenconstable.com/2008/11/26/howto-setup-a-shell-java-struts-2-web-app-using-maven-2-eclipse-34/</link>
		<comments>http://www.austenconstable.com/2008/11/26/howto-setup-a-shell-java-struts-2-web-app-using-maven-2-eclipse-34/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 16:17:16 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=180</guid>
		<description><![CDATA[The latest project I&#8217;m working on is a Java web app using Struts 2. I wanted to use the eclipse IDE since it&#8217;s industry standard and the Maven 2 build system for compatibility with other company projects. I did plenty &#8230; <a href="http://www.austenconstable.com/2008/11/26/howto-setup-a-shell-java-struts-2-web-app-using-maven-2-eclipse-34/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The latest project I&#8217;m working on is a Java web app using Struts 2. I wanted to use the eclipse IDE since it&#8217;s industry standard and the Maven 2 build system for compatibility with other company projects.</p>
<p>I did plenty of reading (<a href="http://books.sonatype.com/maven-book/" onclick="pageTracker._trackPageview('/outgoing/books.sonatype.com/maven-book/?referer=');">Maven: The Definitive Guide</a> is a good place to start), but nowhere did I find an easy step-by-step quickstart for this combination of tools.</p>
<p>So I&#8217;ve pieced my reading and research together and here it is:</p>
<h3>Prerequisites</h3>
<p>Java<br />
maven 2<br />
eclipse 3.4.1</p>
<h3>Create a new skeleton project:</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/&lt;/</span>br<span style="color: #000000; font-weight: bold;">&gt;</span>
mvn archetype:generate <span style="color: #660033;">-DgroupId</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>name of your group e.g. com.austenconstable<span style="color: #7a0874; font-weight: bold;">&#125;</span> \
<span style="color: #660033;">-DartifactId</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>name of your app<span style="color: #7a0874; font-weight: bold;">&#125;</span> \
<span style="color: #660033;">-DarchetypeGroupId</span>=org.apache.struts \
<span style="color: #660033;">-DarchetypeArtifactId</span>=struts2-archetype-starter \
<span style="color: #660033;">-DarchetypeVersion</span>=2.0.11.2</pre></td></tr></table></div>

<p>If you&#8217;re not sure on the latest struts 2 archetype release version check <a href="http://repo1.maven.org/maven2/org/apache/struts/struts2-archetype-starter/" onclick="pageTracker._trackPageview('/outgoing/repo1.maven.org/maven2/org/apache/struts/struts2-archetype-starter/?referer=');">here</a>.</p>
<h3>Generate the eclipse project files:</h3>

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

<h3>Configure eclipse:</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mvn eclipse:configure-workspace -Declipse.workspace=<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>your<span style="color: #000000; font-weight: bold;">/</span>workspace<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<h3>Import the project into eclipse:</h3>
<p>Fire up eclipse and use File>Import&#8230;</p>
<p>And now all you need to do is build your app!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/11/26/howto-setup-a-shell-java-struts-2-web-app-using-maven-2-eclipse-34/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Recursively delete matching files on the Linux command line</title>
		<link>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/</link>
		<comments>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 09:18:11 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=67</guid>
		<description><![CDATA[An easy way to recursively delete files matching a particular pattern is to use this one liner: find &#124; grep &#34;search&#34; &#124; perl -nle unlink UPDATE &#8211; Another handy one liner to recursively delete directories is: rm -rf `find . &#8230; <a href="http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>An easy way to recursively delete files matching a particular pattern is to use this one liner:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;search&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-nle</span> <span style="color: #c20cb9; font-weight: bold;">unlink</span></pre></div></div>

<p>UPDATE &#8211; Another handy one liner to recursively delete directories is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> d <span style="color: #660033;">-name</span> .svn<span style="color: #000000; font-weight: bold;">`</span></pre></div></div>

<p>Obviously replacing &#8220;.svn&#8221; with whatever your directories are called. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/10/08/recursively-delete-matching-files-on-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Recursive search and replace on the Linux command line</title>
		<link>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/</link>
		<comments>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:35:16 +0000</pubDate>
		<dc:creator>Austen</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.austenconstable.com/?p=58</guid>
		<description><![CDATA[The &#8216;traditional&#8217; way to search and replace on the command line was to use some combination of grep/find/perl/sed etc. Which offers great flexibility but at the end of the day can turn into a right pain in order to complete &#8230; <a href="http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: line-through;">The &#8216;traditional&#8217; way to search and replace on the command line was to use some combination of grep/find/perl/sed etc. Which offers great flexibility but at the end of the day can turn into a right pain in order to complete a simple task.</span> <em>Turns out only to be a pain in the ass if you don&#8217;t know or can&#8217;t remember the correct syntax! </em><span style="text-decoration: line-through;"><br />
</span></p>
<p>Recently I stumbled across rpl. (<a href="http://freshmeat.net/projects/rpl/" onclick="pageTracker._trackPageview('/outgoing/freshmeat.net/projects/rpl/?referer=');">http://freshmeat.net/projects/rpl/</a>) It&#8217;s a nice little text replacement utility which is as simple as:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rpl <span style="color: #660033;">-R</span> search replace <span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>Although rpl is easy, the other alternatives are hardly difficult. (At least once you know them)</p>
<p>For non-recursive search and replace try: <a href="http://www.liamdelahunty.com/tips/linux_search_and_replace_multiple_files.php" onclick="pageTracker._trackPageview('/outgoing/www.liamdelahunty.com/tips/linux_search_and_replace_multiple_files.php?referer=');">Perl</a> or <a href="http://gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/" onclick="pageTracker._trackPageview('/outgoing/gabeanderson.com/2008/02/01/unixlinux-find-replace-in-multiple-files/?referer=');">sed</a>. (At some point I&#8217;m sure I&#8217;ll get around to finding recursive Perl and sed alternatives.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.austenconstable.com/2008/09/02/recursive-search-and-replace-on-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

