<?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>SemanticMetadata.net &#187; conversion</title>
	<atom:link href="http://www.semanticmetadata.net/tag/conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.semanticmetadata.net</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 16:35:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Converting video for flash video players to H.264/AAC</title>
		<link>http://www.semanticmetadata.net/2009/07/10/converting-video-for-flash-video-players-to-h-264aac/</link>
		<comments>http://www.semanticmetadata.net/2009/07/10/converting-video-for-flash-video-players-to-h-264aac/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 13:58:14 +0000</pubDate>
		<dc:creator>Mathias Lux</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[h.264]]></category>
		<category><![CDATA[Transcoding]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.semanticmetadata.net/?p=534</guid>
		<description><![CDATA[Have you ever tried to put a video online? Well actually it is quite easy if you user YouTube. No matter what codec you use you have a good chance to get a decent result. If you want to host the video yourself you basically need a flash video player (assuming that flash is the [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to put a video online? Well actually it is quite easy if you user <a href="http://www.youtube.com/user/dermotte">YouTube</a>. No matter what codec you use you have a good chance to get a decent result. If you want to host the video yourself you basically need a flash video player (assuming that flash is the most widely spread tool on multiple platforms) like the <a href="http://www.longtailvideo.com/players/jw-flv-player/">JW FLVPlayer</a>. Finally you&#8217;ll need to get your video file to a format flash can play using progressive download (which means you can watch it while downloading, just like on YouTube).</p>
<p>Since Adobe Flash Player 9 Update 3Flash can play back MP4 files with H.264 video and AAC audio streams [see <a href="http://en.wikipedia.org/wiki/Adobe_Flash_Player">here</a>], so we can just focus on this one. First step is to get a ffmpeg version compiled with libx264 and libfaac. You might check this on the command line, just execute ffmpeg without parameters:</p>
<blockquote><p>FFmpeg version SVN-r16573, Copyright (c) 2000-2009 Fabrice Bellard, et al.<br />
configuration: <em>[...]</em> <strong>&#8211;enable-libfaac</strong> &#8211;enable-libgsm <strong>&#8211;enable-libx264</strong> <em>[...]</em></p></blockquote>
<p>The bold ones should be there to support the needed codecs. I used FFmpeg Revision 16537 from <a href="http://ffmpeg.arrozcru.org/builds/">this page</a>, which works fine.</p>
<p>If the libraries are there you can proceed to the next step:</p>
<blockquote><p>ffmpeg -i &lt;inputfile&gt; -b 1024k -vcodec libx264 \\<br />
-acodec libfaac -ab 160k &lt;output.mp4&gt;</p></blockquote>
<p>This converts your input file to the needed mp4 file. You can also change the size of the file with the switch &#8220;-s&#8221;, like for instance &#8220;-s 320&#215;240&#8243;. Take a close look on the switches &#8220;-b&#8221; and &#8220;-ab&#8221; which define video and audio bitrate. If the sum of both bitrates is too high for the network the user will not be able to watch the video smoothly.</p>
<p>One might think s/he&#8217;s finished, but no &#8230; unfortunately progressive download doesn&#8217;t work with too many mp4 files. The file index (an atom == &#8220;mp4 metadata unit&#8221;) containing the file index (== the description where the video and the audio stream are located in the file and how they are stored) is at the end of the MP4 file. So the flash player has to download the whole file before starting the playback, ka-ching!</p>
<p>Fortunately there is an ffmpeg tool called <em>qt-faststart</em> (linux users will find it in the tools folder of ffmpeg) moving the index from end to start. For windows user a precompiled binary can be found <a href="http://www.jameshay.net/blog/?p=4">here</a>. Use this to move the metadata:</p>
<blockquote><p>qt-faststart &lt;infile.mp4&gt; &lt;outfile.mp4&gt;</p></blockquote>
<p>Now you are done with the file. Use for instance the <a href="http://www.longtailvideo.com/support/jw-player-setup-wizard">JW FLVPlayer setup wizard</a> to create an HTML snippet. Note that in height you have to add 19 pixels to your video dimensions, as this is the height of the control bar of the player <img src='http://www.semanticmetadata.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.semanticmetadata.net/2009/07/10/converting-video-for-flash-video-players-to-h-264aac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

