<?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>Karl von Moller &#187; Compression Settings</title>
	<atom:link href="http://www.karlvonmoller.com/blog/tag/compression-settings/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlvonmoller.com/blog</link>
	<description>Director</description>
	<lastBuildDate>Tue, 31 Jan 2012 00:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Encoding Video For Devices</title>
		<link>http://www.karlvonmoller.com/blog/2010/06/04/encoding-video-for-devices/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.karlvonmoller.com/blog/2010/06/04/encoding-video-for-devices/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:12:15 +0000</pubDate>
		<dc:creator>Karl von Moller</dc:creator>
				<category><![CDATA[Australia]]></category>
		<category><![CDATA[Compression Settings]]></category>
		<category><![CDATA[File Sizes]]></category>
		<category><![CDATA[File Types]]></category>
		<category><![CDATA[How to Export to]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Media Encoding]]></category>
		<category><![CDATA[Mpeg Streamclip]]></category>
		<category><![CDATA[Video Encoding]]></category>

		<guid isPermaLink="false">http://www.karlvonmoller.com/blog/?p=3217</guid>
		<description><![CDATA[OK I need to start with &#8211; This article has had a few revisions since it was first published. I have had several useful conversations with people on Twitter &#38; via email on the accuracy of this article and have made several adjustments in order to get it right. This article is definitely written with [...]]]></description>
			<content:encoded><![CDATA[<p>OK I need to start with &#8211; This article has had a few revisions since it was first published. I have had several useful conversations with people on Twitter &amp; via email on the accuracy of this article and have made several adjustments in order to get it right. This article is definitely written with a Mac user in mind and I apologise to our PC/Linux friends for this, I just don&#8217;t have enough experience on those platforms but feel free to write your own article or email me and I will include other work flows into this article.</p>
<p>I don&#8217;t normally like to blog about technical stuff but on this occasion I felt I needed to record some of my findings, where I could get at them quickly and easily in the future. It might be useful to you also?! I recently bought an iPad and wanted to encode some of my own videos to the platform. Dragging a stack of material from iTunes onto my iPad, I realised I got several warnings from iTunes about video files it couldn&#8217;t upload to the iPad because they could not be played by the device! Frustrated I had a look at the files that wouldn&#8217;t play and surprisingly some had the same file sizes, frame size and encoding type as files that could be played on the iPad?! So I started to investigate further. This is what I found.</p>
<p>The iPad reports to support video formats up to 720P which in layman&#8217;s terms means 1280 x 720 pixels in dimension using a frame rate that is Progressive. However I wasn&#8217;t able to successfully get video encoded to this size to play properly on the iPad. The actual frame size of the iPad is 1024 x 768 and while 720P content is supported, the iPad has to down scale the video to 1024&#215;576 to present it to the screen. So what&#8217;s going on? Frustrated, I used iTunes to convert a video to an AppleTV profile, which I then openned in QuickTime and &#8220;got info on&#8221; (press Command I). I discovered that iTunes uses a default setting of 960 x 540 pixels and not 1280 x 720! Now I was even more confused?! Jumping on the net, I found a large number of similarly confused people discussing the right size and data rate for best quality video on the iPad. However a link to an Apple Tech Note is very useful and can be found <a href="http://developer.apple.com/iphone/library/technotes/tn2010/tn2224.html" target="_blank">here</a>. Basically it&#8217;s more concerned with streaming video to the iPad, iPod &amp; iPhone and not playing back of files from disc as I am. However I used this as a guide to Encode my video using Mpeg Streamclip by <a href="http://www.squared5.com/" target="_blank">Squared 5</a>. You could use other Encoders such as Apples Compressor and simply translate my settings here.</p>
<p>Below is a Video of my family having some fun at a Go Kart track.</p>
<p style="text-align: center;"><a title="1280 x 720 version" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_1280x720.mov" target="_blank"><img class="aligncenter size-full wp-image-3218" title="Exported from FCP at 1280 x 720 at 5MB/s" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p>The video is action packed and shot with a Canon 5DMKII and a Go Pro HD Hero in 16&#215;9 aspect ratio. Because the Go Pro has some fairly significant rolling shutter issues, I thought this video might be quite challenging for any encoder to get right and might reveal nasty jagged edges and other encoding artefacts in an obvious way. So firstly, I exported my 1920 x 1080 25FPS video from Final Cut Pro as a Vimeo friendly 1280 x 720 H.264 movie. I tried that in iTunes and it failed to upload to the iPad. So I then took this same video and threw it into Mpreg Streamclip and played with the settings as follows. All were encode using the H.264 format with the audio set to AAC 256kbps.</p>
<p>1) Firstly below is the version created by iTunes that works no problems on the iPad. If you click on this file it will probably download it to your computer as it is a .m4v file. It&#8217;s video size is 960 x 540 and used the H.264 encoder with a bit rate of around 5 MBS. The total file size is 56.5MB</p>
<p style="text-align: center;"><a title="iTunes version at 960 x 540" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_5Mpbs_640x360.m4v" target="_blank"><img class="aligncenter size-full wp-image-3218" title="iTunes version exported at 960 x 540 at 5MB/s" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p>2) In Mpeg Streamclip I simply wanted to recreate the same settings so I could create a Preset for it, and that was totally successful. However reading the Apple Tech note indicated that this size may not be the ultimate setting for the video if a lower files size was needed. What&#8217;s probably more important then frame size is the data rate considerations. So I began to encode the same video, using many different data rate amounts. Below is a video encoded at 960 x 540 with a cap at 4MB/sec</p>
<p style="text-align: center;"><a title="960 x 540 at 4MB/sec" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_960x540.mov" target="_blank"><img class="aligncenter size-full wp-image-3218" title="960 x 540 capped at 4MB/s" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p>3) This video below is encoded to 1024 x 576 which is the resolution that the iPad uses to display your video on it&#8217;s screen. My thinking here is if the iPad doesn&#8217;t need to &#8220;on the fly down scale your video&#8221; then surely this would play better and look nicer. It plays well and looks great but the file size remained quite large at a hefty 73MB. Admittedly the data rate is capped quite high as well being set at about 6MB/sec but I was trying to get very good quality video. At 5MB/sec this video is about 56.7MB and still looks fantastic.</p>
<p style="text-align: center;"><a title="1024 x 576" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_1024x576.mov" target="_blank"><img class="aligncenter size-full wp-image-3218" title="1024 x 576 capped at 6MB/s" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p>4)  From the Apple Tech notes again, I learned that the iPad has very good upscaling abilities. So I tried to encode the same video at 640 x 360, again using the H.264 encoder, stereo AAC Audio compression set at 256kbps. Here I tried with a capped data rate of around 4MB/sec. This video uploaded to the iPad no Problem and plays very nicely. In fact, I was quite surprised that although the video is much smaller in size the iPad rendered it to the screen in a perfectly acceptable manner. If you look closely you may be able to spot some aliasing and compression artefacts but overall it looked great. The file is 47.9MB!</p>
<p style="text-align: center;"><a title="640 x 360 at 4MB/s" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_640x360_4Mbs.mov" target="_blank"><img class="aligncenter size-full wp-image-3218" title="640 x 360 capped at 4MB/sec" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p>5) Dropping the data rate even more but keeping the same size settings (640 x 360, again using the H.264 encoder, stereo AAC Audio compression set at 256kbps) again I was surprised that it looked great on the iPad. The data rate on this video is set to cap at around 2MB/sec and has a file size of 25.7MB! Yes if you compare this video with the version set at 4MB/sec, there is some degradation but it&#8217;s not horrendous. Certainly if you need to keep file sizes down, I think this setting is quite acceptable.</p>
<p style="text-align: center;"><a title="640 x 360 at 2MB/s" href="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_2MBS_640x360.mov" target="_blank"><img class="aligncenter size-full wp-image-3218" title="640 x 360 capped at 2MB/sec" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/Preview_Compression.jpg" alt="" width="397" height="227" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><strong>Conclusion:</strong></p>
<p style="text-align: left;">I should quickly say that viewing these samples on a Computer Monitor will lead you to different opinions on acceptability. For my purposes I was more interested in comparing these settings on the iPad and I highly recommend that you do the same. Because the iPad does some magic during the upscaling, the final out come of how your video looks is different to that of a computer display. So for my recommendations on compression settings, I would suggest you need to keep in mind what devices need to see your video. For best possible display quality on both a Computer and the iPad then these are my suggested settings (although this is way higher then the iPad really needs):</p>
<p style="text-align: center;"><a href="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/1024x576_settings.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="size-full wp-image-3229  aligncenter" title="1024x576_settings" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/1024x576_settings.png" alt="" width="551" height="573" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">The above compression settings will not play on most other devices. Lowering the data rate, like the example below, might be better for longer video programs and will allow other devices to play this video:</p>
<p style="text-align: center;"><a href="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/640x360_settings.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="aligncenter size-full wp-image-3228" title="640x360_settings" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/640x360_settings.png" alt="" width="553" height="574" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">However, for iPhone&#8217;s and iPod&#8217;s as well as other manufacturers devices, the following profile might be better, while still playing on the iPad. So my ultimate suggestion for compression settings that works on a range of devices including iPad, iPod, iPhone and as a small file for download to a Computer, try this:</p>
<p style="text-align: center;"><a href="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/640x360_iPad_iPhone_iPod_version.png#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="aligncenter size-full wp-image-3240" title="640x360_iPad_iPhone_iPod_version" src="http://www.karlvonmoller.com/blog/wp-content/uploads/2010/06/640x360_iPad_iPhone_iPod_version.png" alt="" width="549" height="570" /></a></p>
<p style="text-align: left;">Importantly the video needs to be set to a data rate no greater then 1500kbps or 1.5MB/sec to be safe. Apple supports H.264 data rates of up to 2.5MB/sec and this probably explains why my iPhone was able to play a file at 640&#215;360 2MB/sec no problem while on the iPod, a file of 640&#215;360 4MB/Sec played perfectly also!? The important part about iPod and iPhone is keep them with a size of 640 x 360 for 16&#215;9 content and 640 x 480 for a 4&#215;3 aspect and a reasonably low data rate of around 1500kbps if you are using the Baseline encoding profile. Using a different encoding profile like MP4 or H.264 the iPod and iPhone support a data rate of up to 2.5MB/sec.</p>
<p style="text-align: left;">Hope this helps. Please don&#8217;t hesitate to comment if you feel I have made an error. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlvonmoller.com/blog/2010/06/04/encoding-video-for-devices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_1280x720.mov" length="61972813" type="video/quicktime" />
<enclosure url="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_960x540.mov" length="48288813" type="video/quicktime" />
<enclosure url="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_1024x576.mov" length="73002164" type="video/quicktime" />
<enclosure url="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_640x360_4Mbs.mov" length="47910733" type="video/quicktime" />
<enclosure url="http://karlvonmoller.com/clips/other/Angelo_goes_Go_Karting_2MBS_640x360.mov" length="25690604" type="video/quicktime" />
		</item>
	</channel>
</rss>

