<?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/"
	>

<channel>
	<title>Andrew Gormley &#187; Tutorial</title>
	<atom:link href="http://andrewgormley.com/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewgormley.com</link>
	<description>Andrew Gormley is a Philadelphia-based Front End Developer who has been known to have higher standards for his CSS than for his friends.</description>
	<lastBuildDate>Thu, 26 Aug 2010 13:08:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bulletproof OS X Installation &amp; Backup</title>
		<link>http://andrewgormley.com/2010/bulletproof-os-x-installation-backup/</link>
		<comments>http://andrewgormley.com/2010/bulletproof-os-x-installation-backup/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 13:33:52 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Gear]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=1024</guid>
		<description><![CDATA[As you may know, I recently purchased a brand new 15" MacBook Pro that I am completely enamored with. Despite its raw power and ample hard drive space, I wanted to ensure that this machine stays as lean as possible in the event of catastrophic loss of data. Here's my triple fail-safe process of setting up a new Mac, from start to finish.]]></description>
			<content:encoded><![CDATA[<p>As you may know, I recently purchased a brand new 15&#8243; MacBook Pro that I am completely enamored with. Despite its raw power and ample hard drive space, I wanted to ensure that this machine stays as lean as possible in the event of catastrophic loss of data. Here&#8217;s my triple fail-safe process of setting up a new Mac, from start to finish.</p>
<p><span id="more-1024"></span></p>
<h3>The First Thing? Reinstall the OS</h3>
<p>This might seem like craziness to some people, but the default OS X install has a bunch of language files, fonts, and printer drivers that you will never ever use. I immediately get the restore disc out and do a clean install of OS X (in this case, Snow Leopard). To do this properly, once you boot from the install disc and select your language, click on Tools in the Menu Bar and open Disk Utility. From there, select your primary hard drive from the column on the left and click on the Erase tab on the right hand side. Ensure that Mac OS Extended (Journaled) is selected and hit Erase. Now you&#8217;re ready to hit the ground running.</p>
<p>Quit Disk Utility and you&#8217;ll be brought back to the Installer. Click continue until you arrive at a screen with the &#8220;Customize&#8221; button in the lower left. Click on that and uncheck everything in there so that &#8220;Essential System Software&#8221; is the only thing being installed. You&#8217;re already well on your way to a leaner, meaner system.</p>
<p><img class="aligncenter size-medium wp-image-1032" title="install-customize" src="http://andrewgormley.com/wp-content/uploads/2010/08/install-customize-516x239.gif" alt="" width="516" height="239" /></p>
<h3>Update Everything, Install Only One Program</h3>
<p>Even on my brand new machine, the first thing I had to do after booting up for the first time was apply critical system and security updates to OS X. This may take you a few restarts depending on how old your installation disc is, but with my method you&#8217;ll never need it again. After your system is completely up to date, open Disk Utility again (located in Applications &gt; Utilities), select your partiton from the left (usually named Macintosh HD), and click on the button that says &#8220;Repair Disk Permissions&#8221; under the First Aid tab. I generally do this after applying large amounts of updates just to ensure there&#8217;s no data corruption now or in the future. If you want to know a little more about this process, check out <a href="http://support.apple.com/kb/HT1452" target="_blank">Apple&#8217;s Support Document</a> on the topic.</p>
<p>The hard drive should only contain the freshly installed-and-updated system: none of the programs you use, none of your user files like pictures, music, etc. I download only one program at this point: <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html" target="_blank">SuperDuper!</a></p>
<h3>Time For the First of Many Backups</h3>
<p>Some people swear by <a href="http://www.bombich.com/" target="_blank">Carbon Copy Cloner</a>, but I love the speed and interface of SuperDuper! — In reality both programs are amazing at what they do: creating a bootable backup of your system. The one feature of the new MacBook Pros and iMacs that got me jazzed was the inclusion of a dedicated SD card reader. The first practical application I thought of, beyond the obvious quick retrieval of photos and videos, was a bootable SD card backup and that&#8217;s exactly what I did. You&#8217;ll need at least an 8GB SD card for this to work, and I&#8217;d recommend Class 6 or higher. The Class of an SD card is a measure of it&#8217;s speed; Class 6 cards usually range in the 20-24mbps range, which is plenty fast for our purposes.</p>
<p>Insert the SD card into the dedicated slot or into a card reader connected via USB, open Disk Utility and select it (not its indented partition, but the device itself) in the left column. Once you&#8217;ve done that, click on the &#8220;Partition&#8221; tab on the right side. Under Volume Scheme, select 1 Partition, then click on the &#8220;Options&#8230;&#8221; button. From here, make sure to select the GUID Partition Table, which will make this SD card a bootable OS X device, then click OK to come back to the main Partition section. From here you can optionally name your volume or just hit the Apply button. Disk Utility will format and partition the card and it will appear back on your desktop. Quit Disk Utility and switch over to SuperDuper!</p>
<p><img class="aligncenter size-medium wp-image-1051" title="disk-util" src="http://andrewgormley.com/wp-content/uploads/2010/08/disk-util-516x496.png" alt="" width="516" height="496" /></p>
<p>The interface here couldn&#8217;t be simpler: In the first drop down, you select your primary hard drive, in the second you select your SD card, and the one underneath should have &#8220;Backup &#8211; all files&#8221; selected. Once that&#8217;s done, click on Copy Now, enter your user password, and go grab a sandwich.</p>
<p><img class="aligncenter size-medium wp-image-1029" title="superduper" src="http://andrewgormley.com/wp-content/uploads/2010/08/superduper-516x283.png" alt="" width="516" height="283" /></p>
<h3>First Backup Done, Initialize Offsite Backup</h3>
<p>You now have a fresh, up-to-date version of Snow Leopard you can restore from in the future should you ever want to start over or deploy a basic installation quickly on a new machine. Remove the SD card, flip the switch into the &#8220;Lock&#8221; position, and store the card away somewhere safe.</p>
<p>The next thing I do is install an off-site backup manager. There are literally dozens to choose from and after giving them all a fair shake I decided to go with <a href="http://www.backblaze.com/partner/af0836" target="_blank">BackBlaze</a>. Here&#8217;s a quick list of other services you can choose from for the sake of fair-and-unbiased-ness:</p>
<ul>
<li><a href="http://mozy.com" target="_blank">Mozy</a></li>
<li><a href="http://www.carbonite.com" target="_blank">Carbonite</a></li>
<li><a href="http://www.idrive.com" target="_blank">iDrive</a></li>
<li><a href="http://www.crashplan.com" target="_blank">Crashplan</a></li>
<li><a href="http://www.jungledisk.com" target="_blank">JungleDisk</a></li>
<li><a href="http://www.elephantdrive.com" target="_self">ElephantDrive</a></li>
</ul>
<p><img class="aligncenter size-medium wp-image-1038" title="backblaze" src="http://andrewgormley.com/wp-content/uploads/2010/08/backblaze-516x368.png" alt="" width="516" height="368" /></p>
<p>They all vary slightly in price and implementation, but all work great. I chose BackBlaze because it&#8217;s $5/month/computer for unlimited storage and installs itself as a simple System Preferences panel. All of these services say that the initial backup takes the longest, which is why I still don&#8217;t put any of my files on the computer at this point: I basically want  a working duplicate of my computer in the cloud. Your mileage will vary from mine at this point depending on your internet connection, but you basically have to upload roughly 12GB of system files onto the internet. This is something I let run overnight, while I sleep soundly knowing my data is being secured.</p>
<h3>Finally, Move Your Files Over, Install Your Apps</h3>
<p>I assumed a lot from you going into this article, not the least of which was that you had your data safely stored on some sort of external device or computer. Well, now&#8217;s the time to bring all of your goodies into the fray. Add your music, movies, photos, etc and order them however you&#8217;d like. If you&#8217;re as particular about your folder structures and naming conventions as I am, this could very well be the longest step. Also feel free to install all of the programs you use as this point.</p>
<h3>More Backing Up</h3>
<p>We&#8217;re almost at the home stretch, so now you&#8217;re probably thinking &#8220;What the hell more could we do to secure our data?&#8221; Well, we&#8217;ve already started on one: Backblaze.</p>
<p>After I moved all my files over and installed the programs I use on a regular basis, the amount of space I was using jumped from 12GB to 204GB. Backblaze (or whichever service you&#8217;ve chosen) will back all of that information up. For me, it took roughly 3 weeks (all the while adjusting how much bandwidth I wanted BackBlaze to use: more at night, less during the day, etc), so that&#8217;s pretty much a background thing that will be happening for a while. The last thing to set up is OS X&#8217;s own Time Machine.</p>
<h3>Taming Time Machine</h3>
<p>I love Time Machine; before it was introduced in Leopard I never had a backup/restore plan. I figured if I lost everything (thankfully that&#8217;s never happened), I&#8217;d just start over again from scratch — the force (of  laziness) was strong in this one. Time Machine made it easy and important to me to back up everything digital. Though it isn&#8217;t without it&#8217;s flaws, it&#8217;s certainly the solution a majority of people who use OS X are most familiar with. I don&#8217;t use any third party tools to control the times of day it chooses to back up, but I am very particular about <em>what</em> it backs up. Below is a list of folders that I explicitly tell Time Machine NOT to back up and why. If you&#8217;d like to save a little space on each back up, you can add any or all of these folders by going to System Preferences &gt; Time Machine &gt; Options.</p>
<ul>
<li><strong>/Applications</strong> — This folder changes so often and drastically that I&#8217;d prefer to manage it on my own. If I need to get an app that I accidentally deleted, I&#8217;ll make sure to get the latest version from the company&#8217;s website.</li>
<li><strong>/Library/Audio</strong> — After installing Final Cut Studio and Logic Pro, this folder jumps up to a whopping 32GB. Again, if I accidentally delete something from here (unlikely), I&#8217;ll reinstall from the disc.</li>
<li><strong>/Library/Caches</strong> — Non-vital files that can accumulate in size rather quickly and change even quicker. No harm here.</li>
<li><strong>~/Library/Caches</strong> — Same as above</li>
<li><strong>~/Downloads</strong> — This folder changes so often that I&#8217;d rather not have anything in here backed up. I do pretty regular maintenance to keep this folder clear anyhow.</li>
<li><strong>~/Dropbox</strong> — I&#8217;m a mega <a href="http://www.dropbox.com/referrals/NTE3NjIxODQ5" target="_blank">Dropbox</a> user. If you haven&#8217;t heard of it, you should really make it a part of your life. Anyway, Dropbox files already live in the cloud (and usually on many other computers) and have the ability to go back multiple versions. No need to back this stuff up.</li>
<li><strong>~/Library/Application Support/MobileSync</strong> — Only applicable if you&#8217;re an iPhone user, but definitely worth looking into. I&#8217;ve synced my iPhone 4, which is loaded with video, to my MacBook only a handful of times, but this folder clocks in at 18GB+ for me.</li>
<li><strong>~/Movies</strong> — I only use this folder as a drop point for DVDs I rip before storing them on an external drive. This is another situation where the folder changes so many times I&#8217;d rather not waste the time having Time Machine back up huge, temporary files.</li>
<li><strong>~/Music/iTunes/iTunes Music/Podcasts</strong> — This folder might have a slightly different path depending on whether iTunes has updated your library recently, but I never bother to backup Podcasts since I download so many of them at a time, watch them, then delete a majority of them.</li>
<li><strong>~/Documents/Virtual Machines</strong> — This is the folder that VMware uses to store Virtual Machines in. If you use Parallels, VirtualBox, or something else you&#8217;ll have to find out where they store these massive files. Basically, every time you boot into the virtual machine the files within are changed slightly, but since the Finder (and, ergo, Time Machine) only see this as one large file, it will back up the whole thing again and again. Needless waste of space here.</li>
</ul>
<h3>Dropbox and Alternative Approaches</h3>
<p>Some files I choose to keep in my <a href="http://www.dropbox.com/referrals/NTE3NjIxODQ5" target="_blank">Dropbox</a> folder for easy access: documents, some pictures, application data, and more. Dropbox is as good a backup solution as any if you&#8217;re willing to pay a little more for a very fast, very convenient service that offers a native app as well as a web interface.</p>
<p>It&#8217;s worth mentioning that you don&#8217;t need to back up to an SD card, but it&#8217;s a method I chose because they&#8217;re inexpensive, reliable, and fast. You could just as easily follow the same steps on an external USB or Firewire hard drive. Hell, you could even use a USB memory stick if you had one of those lying around. Another option would be to save that step until after you&#8217;ve moved all of your files and programs onto the machine and then create a bootable backup of your entire system. You can even automate this with the paid version of SuperDuper so if your primary hard drive ever fails, you literally boot into your backup and pick up where your last backup left you off.</p>
<h3>Recap</h3>
<p>Here&#8217;s how I roll, in list format:</p>
<ol>
<li>Clean OS X Installation</li>
<li>Update OS X via Software Update</li>
<li>Repair Disk Permissions in Disk Utility</li>
<li>Create a bootable backup of my primary hard drive using <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html" target="_blank">SuperDuper!</a></li>
<li>Install <a href="http://www.backblaze.com/partner/af0836" target="_blank">BackBlaze</a> for off-site backups</li>
<li>Move all of my files onto the hard drive, install all of my apps
<ol>
<li>BackBlaze passively continues to back up all of these files</li>
</ol>
</li>
<li>Set up Time Machine on my Mac, excluding several folders that are greedy with my gigabytes</li>
<li>Revel in the fact that I&#8217;m safe should my MacBook&#8217;s internal hard drive bite the dust</li>
</ol>
<h3>In Closing</h3>
<p>There are clearly a variety of ways to ensure that your data is safe. None of them are perfect and a few of them (I&#8217;m thinking my way, for sure) are a hell of a lot of work to maintain, but when your primary source of income can be crippled because of something as small as a corrupted hard drive, it&#8217;s a good feeling to know that you&#8217;ve taken steps to make sure you won&#8217;t be out of commission for too long.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2010/bulletproof-os-x-installation-backup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 Video: Cooking With Fire</title>
		<link>http://andrewgormley.com/2009/html5-video-cooking-with-fire/</link>
		<comments>http://andrewgormley.com/2009/html5-video-cooking-with-fire/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:16:49 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=785</guid>
		<description><![CDATA[I recently had the good fortune of working on a small project that lent itself to some experimentation with newer technologies.  The goal was to create a simple landing page with some light graphics, pictures, and a video.  I had the option to let it live inside the existing ecosphere of the site (using PHP to include site-wide JS and CSS) or opt for a leaner, more agile output. I took the latter route as it was something I've done a lot of reading on and eventually wanted to do with my site for either screencasts, general portfolio work, or both. I dove headlong into HTML 5 and was pleasantly surprised by the results.  I now present you with the process, the pitfalls, and other considerations.]]></description>
			<content:encoded><![CDATA[<p>I recently had the good fortune of working on a small project that lent itself to some experimentation with newer technologies.  The goal was to create a simple landing page with some light graphics, pictures, and a video.  I had the option to let it live inside the existing ecosphere of the site (using PHP to include site-wide JS and CSS) or opt for a leaner, more agile output. I took the latter route as it was something I&#8217;ve done a lot of reading on and eventually wanted to do with my site for either screencasts, general portfolio work, or both. I dove headlong into HTML 5 and was pleasantly surprised by the results.  I now present you with the process, the pitfalls, and other considerations.</p>
<p><span id="more-785"></span></p>
<p class="bigger">First Things First</p>
<p>Obviously the first thing you&#8217;ll need is a high quality source file. (Note: any file will do, but encoding from the original, lossless source always yields best results).  In my case, I was working with an HD video file that I just finished editing in Final Cut and exported using Compressor.  If you&#8217;re exporting from an editing suite and not intending to serve up an HD version of your video, then exporting a standard DV file will work. If you&#8217;re taking the video directly from a video camera like a Flip Mino, Kodak Zi8, or even your phone, then chances are your videos are already compatible.</p>
<p class="bigger">A Brief and Incomplete History of Video Codecs and Containers</p>
<p>Working with video can get overwhelming very quickly if you&#8217;re unfamiliar with the terminology or concepts, so here&#8217;s a quick breakdown of video as well as the two types we&#8217;ll be dealing with: MP4 and Ogg.</p>
<p>It&#8217;s safe to assume that if you download videos from the internet, you&#8217;ve encountered a few of the more common extensions: MOV, MPG, AVI and unfortunately WMV. Those files are known as video containers. Think of a video container as you would a ZIP file: an all-in-one package that contains the content you&#8217;re really after.  In the case of video containers, the files within are known as streams or tracks and represent a variety of things including video, audio, subtitles, and more.</p>
<p>Ogg is a free, open-standard container format supported natively by Firefox 3.5+, Google Chrome, Opera and most distributions of Linux. You can also watch Ogg content on OS X or Windows easily enough by installing the appropriate codecs. For our purposes, we&#8217;ll be dealing with the OGV container, which is specific to video.  Within the OGV container, we&#8217;ll have two tracks: the Ogg Video track known as &#8220;Theora&#8221; and the Ogg Audio track known as &#8220;Vorbis&#8221;. Ogg file formats are on their way to becoming the standard way that Wikipedia delivers audio and video information, in hope of establishing this patent-free codec as the &lt;video&gt; standard.</p>
<p>MP4 is the container format of choice for Apple and most mobile platforms and is supported natively by Safari (Webkit), Flash video players, the iPhone, some Android phones, and also Google Chrome.  Within the MP4 files we&#8217;ll be working with, we&#8217;ll again have two tracks: &#8220;H.264&#8243; for video and &#8220;AAC&#8221; for audio. H.264, like Theora, is a video codec, but the comparisons end there. H.264 offers a plethora of options and features that are a result of it&#8217;s evolution over many years.  If you&#8217;ve ever watched a trailer on Apple&#8217;s site, a BluRay movie, and HD video on YouTube, or downloaded a movie/television show through iTunes, then you&#8217;ve encountered H.264 in one of it&#8217;s many profiles. H.264 profiles are the key to its versatility, as different profiles best serve different mediums. The Baseline H.264 profile is supported on the iPhone and some Android phones, while the Advanced Profile is used by BluRay discs for the ultimate in video quality.</p>
<p class="bigger">So, to recap:</p>
<p><strong>Ogg</strong></p>
<ul>
<li>Ogg is supported natively by Firefox 3.5+, Google Chrome, Opera, and most Linux distros</li>
<li>Ogv is the container we&#8217;ll be working with</li>
<li>The video track within an ogv container is known as &#8220;Theora&#8221;</li>
<li>The audio track within an ogv container is known as &#8220;Vorbis&#8221;</li>
</ul>
<p><strong>MP4</strong></p>
<ul>
<li>MP4 is supported natively by Safari, Google Chrome, iPhone OS, Android OS, OS X, and Flash video players</li>
<li>MP4 is also the name of the container we&#8217;ll be working with</li>
<li>The video track within our mp4 container is known as &#8220;H.264&#8243;</li>
<li>The audio track within our mp4 container is known as &#8220;AAC&#8221;</li>
</ul>
<p class="bigger">Acquiring the Encoders</p>
<p>I&#8217;ll preface by saying that I had a hell of a time finding a reliable GUI-based Theora encoder. The <a title="XIPH OGG Quicktime Components" href="http://www.xiph.org/quicktime/" target="_blank">Quicktime plugin</a> was buggy and didn&#8217;t always output files as expected, even resulting in a few crashes. <a title="Firefogg Video Encoder" href="http://firefogg.org/" target="_blank">Firefogg</a>, a highly recommended Firefox extension, simply did not work for me while dedicated encoding programs that I looked into, particularly Episode and Sorenson Squeeze, were both absent of the Theora codec entirely. This left me with the command line alternative: <a title="ffmpeg2theora" href="http://v2v.cc/~j/ffmpeg2theora/" target="_blank">ffmpeg2theora</a>.  For those of you not comfortable working in the command line, fear not, as the calls to output a Theora video file are quick and easy. For exporting the H.264 video, I used the free (and incredibly nifty) <a title="Handbrake Video Encoder" href="http://handbrake.fr/" target="_blank">Handbrake</a>, which is available for Windows, OS X, and Linux.</p>
<p class="bigger">You Down With Ogg?</p>
<p><a class="thickbox" href="http://andrewgormley.com/wp-content/uploads/2009/12/terminal.png"><img class="alignright size-medium wp-image-797" title="OS X Terminal" src="http://andrewgormley.com/wp-content/uploads/2009/12/terminal-300x187.png" alt="OS X Terminal" width="300" height="187" /></a>After installing ffmpeg2theora, you&#8217;ll have to open either your terminal (OS X/Linux) or command prompt (Windows). From there, you can type &#8220;ffmpeg2theora &#8211;help&#8221; to get your bearings or just base your settings off of mine. After playing with a few variations of settings, the ideal preset for my project came out to look like this:</p>
<p>ffmpeg2theora &#8211;videoquality 6 &#8211;audioquality 4 &#8211;max_size 416&#215;232 &#8211;optimize InputFile.mov</p>
<ul>
<li>videoquality X — where X can be any number from 0 to 10</li>
<li>audioquality X — where X can be any number from -2 to 10</li>
<li>max_size tells the encoder what the output size should be. If removed, input and output source size will be the same.</li>
<li>optimize adds some time to the encode process, but gives you the best possible balance of quality and file size</li>
<li>InputFile.mov can be almost any type of video container.  A shortcut to inputting it is to simply drag and drop the file into your Terminal/Command Prompt after writing out the above settings</li>
</ul>
<p>My uncompressed input file was 106MB at a resolution of 1280&#215;720.  Using these settings the file size came down to just a fraction above 16MB.  I easily could&#8217;ve gone lower than that, but didn&#8217;t want any visible video degradation and anything below 20MB seemed like a reasonable streaming video size.</p>
<p class="bigger">H.264 U</p>
<p><a class="thickbox" href="http://andrewgormley.com/wp-content/uploads/2009/12/handbrake.png"><img class="alignright size-medium wp-image-798" title="Handbrake GUI" src="http://andrewgormley.com/wp-content/uploads/2009/12/handbrake-300x252.png" alt="Handbrake GUI" width="300" height="252" /></a>Encoding with Handbrake should be much easier for the average person since there&#8217;s a nice, clean interface in which to work. After launching the program, select your input source and, from the Preset Drawer, select &#8220;iPhone and iPod Touch&#8221;. This setting isn&#8217;t specifically for these devices, but more a good starting point from a compatibility point of view. From the top down, choose these settings:</p>
<ul>
<li>Container: MP4</li>
<li>Make sure &#8220;Web Optimized&#8221; is checked</li>
<li>Video Codec: H.264</li>
<li>Framerate: Same as source</li>
<li>Constant Quality: This is (very loosely) akin to Theora&#8217;s 0-10 scale and can be tested by enabling live preview in Handbrake to view your settings live on the video before committing to a lengthy encode.  Power users could also simply specify a Target Size or Average Bitrate.</li>
<li>Under the &#8220;Audio&#8221; tab, make sure that the Samplerate is 44.1 as 48 is overkill for web video.</li>
<li>Click on the Picture Settings icon and then adjust the video to your desired size. You may also crop here if necessary.</li>
<li>Finally, before submitting the export, you can click on the Preview Window icon to get a live, 5-60 second preview of your video with the settings you&#8217;ve chosen applied.</li>
</ul>
<p>Going from the aforementioned uncompressed file I was able to get the MP4 down to 17Mb, which is a space savings of roughly 600% with relatively no visible pixel degradation or blurring.</p>
<p class="bigger">The Code To Get It Done</p>
<p>The HTML5 code to embed a video is super simple and very much akin to using the &lt;img&gt; tag:</p>
<p style="padding-left: 30px;">&lt;video src=&#8221;MyVideo.ogv&#8221;&gt;&lt;/video&gt;</p>
<p>You can take it a step further and add a width and a height, just like with images:</p>
<p style="padding-left: 30px;">&lt;video src=&#8221;MyVideo.ogv&#8221; width=&#8221;640&#8243; height=&#8221;480&#8243;&gt;&lt;/video&gt;</p>
<p>There are also a number of options you can add on to your video tag, they are: controls, autoplay, autobuffer. They&#8217;re all pretty self explanatory, and equally easy to implement. For example:</p>
<p style="padding-left: 30px;">&lt;video src=&#8221;MyVideo.ogv&#8221; width=&#8221;640&#8243; height=&#8221;480&#8243; controls autoplay&gt;&lt;/video&gt;</p>
<p>The above line tells the browser to use it&#8217;s native controls for video and autoplay as soon as the page is done loading. You could swap autoplay with autobuffer to have the video begin downloading right away and then have the user initiate playback using the native browser controls. The options aren&#8217;t endless, but they&#8217;re certainly nice to have.</p>
<p>The only thing remaining is specifying which video will work in which browser. Rather than wasting away precious bandwidth by loading two movies and letting the browser decide which one it can handle, all you have to do is use the &lt;source&gt; element of HTML5 to tell the browser which video to download.  The source element looks like this:</p>
<p>&lt;video width=&#8221;640&#8243; height=&#8221;480&#8243; controls&gt;</p>
<p><span style="padding-left: 30px;">&lt;source src=&#8221;MyVideo.ogv&#8221; type=&#8217;video/ogg; codecs=&#8221;theora, vorbis&#8221;&#8216;&gt;</span></p>
<p><span style="padding-left: 30px;">&lt;source src=&#8221;MyVideo.mp4&#8243; type=&#8217;video/mp4; codecs=&#8221;avc1.42E01E, mp4a.40.2&#8243;&#8216;&gt;</span></p>
<p>&lt;/video&gt;</p>
<p>So from that you can see that the video element no longer links to the file, but still contains the video attributes like width, height, autoplay, etc. Inside the video element we have two source elements that give us the path to the video as well as the video type, respectively.  Note that the type attribute is wrapped in single quotes, which is a little weird, but this is due to the fact that the codecs have to wrapped in quotation marks for this to work.</p>
<p class="bigger">Beware of the Mimes</p>
<p><img class="alignright size-medium wp-image-799" title="Sad Mime" src="http://andrewgormley.com/wp-content/uploads/2009/12/mime-240x300.jpg" alt="Sad Mime" width="240" height="300" />I ran into a hugely frustrating issue where my development server simply wasn&#8217;t playing the OGV video natively in Firefox or Chrome, yet when I tested my code locally everything worked perfectly. I tried different character encodings, files permissions, and much more before I figured out that it was a simple issue of the server not understanding what the hell an OGV file is in the first place.  There are two ways to remedy this issue:</p>
<ol>
<li>If you&#8217;re the server admin *and you know what you&#8217;re doing*, you can edit httpd.conf and add the following lines to cover all variations of OGG media (one per line, do no include commas): AddType video/ogg .ogm, AddType video/ogg .ogv, AddType video/ogg .ogg</li>
<li>If you&#8217;re not the server admin but have FTP access, create a file called &#8220;.htaccess&#8221; in your root directory and add the lines you see above in the same format.</li>
</ol>
<p>Note that the first method is a server-wide change whereas the second must be done on a domain-by-domain basis. Once I established my Mime types, it was smooth sailing.</p>
<p class="bigger">In Summary</p>
<p>HTML5 video is exactly what a lot of people have been waiting for and, beyond learning a little bit about video encoding, should be comfortable territory for any proficient HTML coder. The only obstacle at this point is Internet Explorer, which seems to have no intention of supporting either file type now or in future versions. Though it would be easy enough to write a Javascript workaround to fallback on YouTube in the event of IE, the native implementation and seamlessness are really what make the HTML5 video element shine. In the web development world, where working drafts take years to be approved and the inhabitants argue fruitlessly over the minutiae of doctypes or trailing slashes, HTML5 video feels like an evolutionary first step in the right direction: An open web that utilizes open source tech to solve usability conundrums.</p>
<p>You can view my finished page <a title="ARPRO Adventure 2009" href="http://www.arpro.com/adventure2009" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/html5-video-cooking-with-fire/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Working with MySQL Databases in MAMP</title>
		<link>http://andrewgormley.com/2009/working-with-mysql-databases-in-mamp/</link>
		<comments>http://andrewgormley.com/2009/working-with-mysql-databases-in-mamp/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 05:17:41 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=460</guid>
		<description><![CDATA[Here&#8217;s the second video in a series focusing on using your Mac as a development server to test your pages locally.
Working with MySQL Databases in MAMP
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the second video in a series focusing on using your Mac as a development server to test your pages locally.</p>
<p><object width="516" height="324" data="http://vimeo.com/moogaloop.swf?clip_id=3262144&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=33262144&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" />Working with MySQL Databases in MAMP</object></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/working-with-mysql-databases-in-mamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Mac Server with MAMP</title>
		<link>http://andrewgormley.com/2009/creating-a-mac-server-with-mamp/</link>
		<comments>http://andrewgormley.com/2009/creating-a-mac-server-with-mamp/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 19:01:21 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=442</guid>
		<description><![CDATA[Stay tuned for the second post in this series where I delve into the practical application of creating a MySQL database using PHPMyAdmin and linking it the Wordpress content management system.
Null
]]></description>
			<content:encoded><![CDATA[<p>Stay tuned for the second post in this series where I delve into the practical application of creating a MySQL database using PHPMyAdmin and linking it the Wordpress content management system.</p>
<p><object width="516" height="324" data="http://vimeo.com/moogaloop.swf?clip_id=3250038&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3250038&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" />Null</object></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/creating-a-mac-server-with-mamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recreating the Max Payne Effect</title>
		<link>http://andrewgormley.com/2009/recreating-the-max-payne-effect/</link>
		<comments>http://andrewgormley.com/2009/recreating-the-max-payne-effect/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 23:56:20 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=423</guid>
		<description><![CDATA[Here's a brief tutorial showing you how to create what I've dubbed the "Max Payne" effect using Photoshop.  Enjoy!]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a brief tutorial showing you how to create what I&#8217;ve dubbed the &#8220;Max Payne&#8221; effect using Photoshop.  Enjoy!</p>
<p><object width="516" height="324" data="http://www.vimeo.com/moogaloop.swf?clip_id=2899505&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.vimeo.com/moogaloop.swf?clip_id=2899505&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" />This video is a tutorial showing you how to recreate the Max Payne effect from the popular series of video games.</object></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/recreating-the-max-payne-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Windows 7 in VMware</title>
		<link>http://andrewgormley.com/2009/installing-windows-7-in-vmware/</link>
		<comments>http://andrewgormley.com/2009/installing-windows-7-in-vmware/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 16:07:23 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=266</guid>
		<description><![CDATA[Here&#8217;s a brief screencast demonstrating the install process of the new Windows 7 Beta inside VMware Fusion.


]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a brief screencast demonstrating the install process of the new Windows 7 Beta inside VMware Fusion.</p>
<p>
<object width="516" height="324" data="http://www.vimeo.com/moogaloop.swf?clip_id=2918520&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=2918520&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1"/></object></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/installing-windows-7-in-vmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Color Vortex</title>
		<link>http://andrewgormley.com/2009/creating-a-color-vortex/</link>
		<comments>http://andrewgormley.com/2009/creating-a-color-vortex/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 04:49:44 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://andrewgormley.com/?p=153</guid>
		<description><![CDATA[A quick and easy screencast showing you how to create a color vortex in Photoshop.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and easy screencast showing you how to create a color vortex in Photoshop.</p>
<p>
<object width="516" height="324" data="http://www.vimeo.com/moogaloop.swf?clip_id=2777987&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=2777987&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1"/></object></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewgormley.com/2009/creating-a-color-vortex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
