<?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>MIH SWAT &#187; media</title>
	<atom:link href="http://www.mihswat.com/tag/media/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mihswat.com</link>
	<description>MIH SWAT - the official blog of MIH's Strategic Worldwide Applications and Technology Team.</description>
	<lastBuildDate>Mon, 06 Sep 2010 10:24:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Media encoding with ffmpeg</title>
		<link>http://www.mihswat.com/2009/10/14/media-encoding-with-ffmpeg/</link>
		<comments>http://www.mihswat.com/2009/10/14/media-encoding-with-ffmpeg/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 14:50:50 +0000</pubDate>
		<dc:creator>Guilherme Blanco</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=884</guid>
		<description><![CDATA[Ffmpeg is a very fast video and audio converter, and even supports live streaming. Here at SWAT we use ffmpeg as an adapter for a multimedia component. This article explains how to compile ffmpeg, which includes the libavcodec library, as well as other known and fast libraries to use together with this powerful tool. At [...]]]></description>
			<content:encoded><![CDATA[<p>Ffmpeg is a very fast video and audio converter, and even supports live streaming. Here at SWAT we use ffmpeg as an adapter for a multimedia component. This article explains how to compile ffmpeg, which includes the libavcodec library, as well as other known and fast libraries to use together with this powerful tool.<span id="more-884"></span><br />
At the end, I will provide some examples of how to play with ffmpeg to generate files for multiple purposes, including files to play on car DVD player and even on your iPod/iPhone.<br />
Let’s start by installing everything.</p>
<h2>Installation</h2>
<p>This installation guide is very close to being Operating System agnostic.<br />
I applied the same commands on a Mac OS X, Ubuntu, Debian and SuSE installation. Of course there are a little tweaks that were necessary, like updating wget and yasm libraries to a newer version on Mac OS X (if you are interested &#8211;  I fixed them by installing packages through MacPorts), but that is out of scope of this article.<br />
Before we install ffmpeg, we need to install the related libraries first. There’s a bunch of libraries that includes support to AAC, XVid, FLV files, for example.<br />
I want to keep things available for all users, but I still need to keep them organized. So, I’ll place all sources on my ~/src folder</p>
<p><code>cd ~<br />
mkdir src<br />
cd src</code></p>
<p>The first one that we’ll install is libfaac and libfaad, which includes support to MPEG-4 and MPEG-2. The package libfaac is responsible for supporting encoding; libfaad is responsible for decoding.</p>
<p><code>wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz<br />
tar -xvf faad2-2.7.tar.gz faad2-2.7<br />
cd faad2-2.7<br />
autoreconf -vif<br />
echo ‘./configure --prefix=/usr --enable-shared’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<p>Ffmpeg can take advantage of shared libraries, so it’s way better to use shared libraries. I created a ./myconfigure.sh script, so you can easily remember what was your configure command and enable/disable options later if needed.<br />
Now it’s time for faac:</p>
<p><code>wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz<br />
tar -xvf faac-1.28.tar.gz faac-1.28<br />
cd faac-1.28<br />
autoreconf -vif<br />
echo ‘./configure --prefix=/usr --enable-shared’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<p>Many people would love to have MP3 support, enabling them to extract audio files from video, for example. Others would love to see converted videos on their own DVD player. To support both, we need to install liblame and libxvid.<br />
The lame library actually has an undocumented buffer size, which prohibits ffmpeg from working with it on recent versions. This issue has been reported a thousand times, but until now there’s no patch to fix it. In order to get it working with ffmpeg, you have to pick an old version of lame.</p>
<p><code>wget http://downloads.sourceforge.net/project/lame/lame/3.97/lame-3.97.tar.gz<br />
tar -xvf lame-3.97.tar.gz lame-3.97<br />
cd lame-3.97<br />
echo ‘./configure --prefix=/usr --enable-shared’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<p>And libxvid:</p>
<p><code>wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz<br />
tar -xvf xvidcore-1.2.2.tar.gz xvidcore-1.2.2<br />
cd xvidcore-1.2.2<br />
echo ‘./configure --prefix=/usr --enable-shared’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<p>Before compiling ffmpeg, I’d suggest as a must-have the x264 library. Why? Basically x264 is a free library to encode video streams into the H.264/MPEG-4 AVC format. What does it mean? It means you want encoding support for the standard video compression, published in May 2003. It’s mostly popular with Blu-ray Disc, HD DVD and videos from iTunes.<br />
To compile x264 with full speed, it is required to have yasm library in version &gt;= 0.6.0.</p>
<p><code>git clone git://git.videolan.org/x264.git<br />
cd x264<br />
echo ‘./configure --prefix=/usr --enable-shared’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<p>Finally… after 30 minutes., we’ll install ffmpeg!</p>
<p><code>svn co svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg<br />
cd ffmpeg<br />
echo ‘./configure --prefix=/usr --enable-shared --enable-pthreads --enable-gpl --enable-nonfree --enable-postproc --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libxvid’ &gt;&gt; ./myconfigure.sh<br />
./myconfigure.sh &amp;&amp; make &amp;&amp; sudo make install</code></p>
<h2>Usage</h2>
<p>Now it’s time to play with your videos.<br />
To construct a ffmpeg command, you need to know the basic format:</p>
<p><code>ffmpeg [input options] –i [input file] [output options] [output file]</code></p>
<p>As our first example, I’ll explain how to pick video files from Youtube and convert them to play on your car DVD player!</p>
<p><strong>Grabbing videos from Youtube</strong></p>
<p>Natively ffmpeg cannot grab Youtube files. However, there’s a Firefox extension that does that very well. <a href="https://addons.mozilla.org/en-US/firefox/addon/10137">Easy Youtube Video Downloader</a> does this task for you. Install the addon, restart Firefox, enter the video, click on download and pick the flv file. Then, just proceed to convert the FLV to XVID file.</p>
<p><strong>Converting video into XVID video</strong></p>
<p>To be able to play on your car DVD player, the video must be XVID compatible.<br />
Since we installed the libxvid, which is responsible to encode/decode XVID files, we’re in heaven. All we need to do is execute in command line:</p>
<p><code>ffmpeg -i /path/to/downloaded_file.flv -vcodec libxvid -sameq -acodec copy -aspect 16:9 /path/to/encoded_file.avi</code></p>
<p>Please notice that the –aspect option can heavily influence the resulting encoded video. Options are 4:3 and 16:9. Now, copy the encoded file to your pen-drive and go to listen in your car</p>
<p><strong>Converting video to iPod video</strong></p>
<p>Ffmpeg + x264 integration is awesome. X264 has what we call &#8220;presets&#8221;, which contains optimized configuration of x264 to some output. One of the presets is ipod320. So, considering we’re converting the video to an iPod 320&#215;240, I’ll use this size as video size.</p>
<p><code>ffmpeg -i /path/to/downloaded_file.flv -acodec libfaac -ab 128k -s 320x240 -vcodec libx264 -vpre hq -vpre ipod320 -b 768k -bt 768k -aspect 4:3 -threads 0 -f ipod /path/to/encoded_file.mp4</code></p>
<p>For iPhone, I’d suggest to pick 640&#215;480 and change the preset to ipod640.<br />
Take a look at the final command:</p>
<p><code>ffmpeg -i /path/to/downloaded_file.flv -acodec libfaac -ab 128k -s 640x480 -vcodec libx264 -vpre hq -vpre ipod640 -b 768k -bt 768k -aspect 4:3 -threads 0 -f ipod /path/to/encoded_file.mp4</code></p>
<p>Finally, move the video to your library and happy watching!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2009/10/14/media-encoding-with-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Towards a Unified Theory of Filters</title>
		<link>http://www.mihswat.com/2008/11/25/towards-a-unified-theory-of-filters/</link>
		<comments>http://www.mihswat.com/2008/11/25/towards-a-unified-theory-of-filters/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 10:18:40 +0000</pubDate>
		<dc:creator>Peter Hart-Davis</dc:creator>
				<category><![CDATA[Knowledge Management]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Semantic web]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[filtering]]></category>
		<category><![CDATA[filters]]></category>
		<category><![CDATA[media]]></category>

		<guid isPermaLink="false">http://www.mihswat.com/?p=375</guid>
		<description><![CDATA['It's Not Information Overload. Its Filter Failure']]></description>
			<content:encoded><![CDATA[<p><em>It&#8217;s Not Information Overload. Its Filter Failure.</em> This is very much a discussion piece, starting with some puzzle pieces which I am playing with. I still do not have the whole picture, but it is becoming clearer.<span id="more-375"></span></p>
<p>In one of the pieces, <a>Clay Shirky</a> recently gave a talk titled &#8216;It&#8217;s Not Information Overload.  Its Filter Failure&#8217; (<a href="http://web2expo.blip.tv/file/1277460/">Web 2.0 Expo NY September 2008</a>) which really struck a chord with me.   There are a lot of other interesting ideas in the talk which I am sure I will return to, but for now I would like to focus on what I believe to be the core premise contained in the title &#8211; that of filter failure. <em>Filter failure</em> postulates that it is not a dramatic increase in information that leads to the feeling of information overload, but the failure of ones filters. The necessity to retool our filters really resonated with me.   His conclusion includes the comment &#8220;we are to information overload as fish are to water its just what we swim in&#8221;.</p>
<p>This leads me to another piece.  At a recent Commencement Address (a US institution that is similar to a graduation ceremony) the author David Foster Wallace ( <a href="http://www.marginalia.org/dfw_kenyon_commencement.html">Transcription of the 2005 Kenyon Commencement Address &#8211; May 21, 2005</a>) told the following story:</p>
<blockquote>
<p style="padding-left: 30px;">&#8220;There are these two young fish swimming along and they happen to meet an older fish swimming the other way, who nods at them and says &#8220;Morning, boys. How&#8217;s the water?&#8221; And the two young fish swim on for a bit, and then eventually one of them looks over at the other and goes &#8220;What the hell is water?&#8221;  the point of the story &#8220;is merely that the most obvious, important realities are often the ones that are hardest to see and talk about&#8221; and correctly that &#8220;we have to keep reminding ourselves over and over:</p>
<p style="padding-left: 30px;">&#8220;This is water.&#8221;</p>
<p style="padding-left: 30px;">&#8220;This is water.&#8221;"</p>
</blockquote>
<p>Closer to home (for me anyway) another piece is from Arthur Goldstuck writing on <a href="http://news.24.com">News 24</a> where he <a href="http://www.news24.com/News24/News24turns10/0,,2-2456_2405916,00.html">writes:</a></p>
<blockquote>
<p style="padding-left: 30px;">&#8220;One unforeseen (by most) consequence of all this bandwidth is that available content will mushroom even more dramatically than it has in the past decade. The information glut will become an information slum, and it will seem impossible for individuals to find their way to the best or most useful content, or at least to find their way through the useless content that will litter the internet, and possibly even TV. &#8221; (Arthur Goldstuck <span class="secondarystorycopy">08/10/2008 09:16  - (SA) )<br />
</span></p></blockquote>
<p>And then some pieces even closer to home, right here in the  SWAT Blog: <a href="http://www.mihswat.com/2008/10/13/i-want-sandy-and-more-girls-like-her/">I Want Sandy (and others like her)</a> (Chester do Nascimento 10/13/08) and <a href="http://www.mihswat.com/2008/10/10/the-web-is-a-knowledge-repositorynot/"><br />
The web is a knowledge repository…not!</a> (Jacques van Niekerk 10/10/08) and the response to that written by by G-J.</p>
<p>All of the above discuss the idea that there is too much information, an overload or a glut, and that this overload is too unwieldy or erratic.  That all this information is not necessarily relevant to the context at hand.  The premise being that we need tools or filters to deal with it and here is where it gets interesting for me.  I am a self-confessed media addict and I do believe it forms a natural environment for me to the extent that I am not even aware of it, unless something impinges or changes  &#8211; and this is why Clay Shirky&#8217;s talk struck the chord it did with me. Something in the media environment has indeed changed and I/we need to retool.  I had stopped seeing the water but something is muddying it.  Even while remaining a media addict one does not need to be the frog on slow boil!</p>
<p>For years now there has been talk of autonomous agents but nobody seems yet to have developed the killer app.  Micro-formats and the Semantic Web are technologies with similar promise which also have not delivered on their potential &#8211; yet.</p>
<p>So lets us consider a unified theory of filters.  These filters must apply across a wide variety of activities from business to pleasure, across a wide variety of applications from email to web feeds and across a wide variety of media from text to video to music.  Filters must be usable in or on a wide variety of media from the normal web to the mobile web, to the in-car GPS system to the Wifi connected camera.</p>
<p>In the same way people are discussing an internet of things, are we moving to an internet of filters?</p>
<p>Lets us consider some variables.  On one hand we want this filtering done for us and on the other we are the only people who can do it for ourselves.  The act of filtering must not be intrusive and it must not be complex.  The filters must be scalable and adaptable to new applications.  How can we enlist the help of others as Wikipedia has done? We cannot own it all because we cannot do it all.  Room for plugins is essential, an API mandatory.</p>
<p>What price privacy? Do we require filters in <em>and</em> filters out?</p>
<p>There are already some very big fish in the water but they do not seem to be providing quite the thing.  The biggest fish at the moment is Google and they are certainly not resting on their laurels. There are others such as <a href="http://www.cuil.com/">Cuil</a>, new kids on the block  <a href="http://www.twine.com">Twine</a>,<a href="http://www.deepdyve.com"> DeepDyve</a> and many other variations on the basic theme. How significant the management of filters can be is highlighted by <a href="http://dev.europeana.eu/">Europeana</a>, the EU response to European concerns over Google.</p>
<p>As Arthur Goldstuck goes on to propose,</p>
<blockquote>
<p style="padding-left: 30px;">&#8220;The solution to this will be information mapping at a level, on a scale and with built-in intelligence such as we have never seen before. An entire industry sector will emerge around the concept of mapping information, with the likes of Google and Wikipedia eventually being seen as the forerunners, but not the owners, of that space.&#8221;</p>
</blockquote>
<p>We must not blind ourselves to the fact that we are talking about more than search -what we have here is a very exciting opportunity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihswat.com/2008/11/25/towards-a-unified-theory-of-filters/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
