<?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>Silveira Neto &#187; 2n800</title>
	<atom:link href="http://silveiraneto.net/tag/2n800/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description>the world is a pixel</description>
	<lastBuildDate>Mon, 19 Jul 2010 21:59:29 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Converting videos to n800</title>
		<link>http://silveiraneto.net/2009/11/30/converting-videos-to-n800/</link>
		<comments>http://silveiraneto.net/2009/11/30/converting-videos-to-n800/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 21:44:57 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[2n800]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[n800]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2976</guid>
		<description><![CDATA[I found this useful tip about how to convert videos to watch on Nokia n800 using Mencoder. mencoder input.ogg -vf scale=400:240 -oac mp3lame -ovc lavc -o output.avi It&#8217;s converts a filed called input.ogg to a avi file output.avi with height 240 and width 400 (the device resolution is 800×480) , mp3lame audio codec and libavcodec [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-2978" title="southpark running on Nokia n800" src="http://silveiraneto.net/wp-content/uploads/2009/11/southpark_running_on_nokia_n800.jpg" alt="southpark running on Nokia n800" width="400" height="300" /></p>
<p>I found <a href="http://www.itcamefromtheinternet.com/tech/archives/26-Converting-OGG-to-AVI-Video-for-Nokia-N800-using-Mencoder.html">this useful tip</a> about how to convert videos to watch on <a href="http://en.wikipedia.org/wiki/Nokia_N800">Nokia n800</a> using <a href="http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html">Mencoder</a>.</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash bash" style="font-family:monospace;">mencoder input.ogg <span style="color: #660033;">-vf</span> <span style="color: #007800;">scale</span>=<span style="color: #000000;">400</span>:<span style="color: #000000;">240</span> <span style="color: #660033;">-oac</span> mp3lame <span style="color: #660033;">-ovc</span> lavc <span style="color: #660033;">-o</span> output.avi</pre>
</div>
</div>
<p>It&#8217;s converts a filed called input.ogg to a avi file output.avi with height 240 and width 400 (the device resolution is 800×480) , mp3lame audio codec and libavcodec video.</p>
<p>As this has become a daily operation to me, I create this simple script called <strong>2n800</strong>:</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-ge</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
<span style="color: #000000; font-weight: bold;">then</span>
        mencoder $<span style="color: #000000;">1</span> <span style="color: #660033;">-vf</span> <span style="color: #007800;">scale</span>=<span style="color: #000000;">400</span>:<span style="color: #000000;">240</span> <span style="color: #660033;">-oac</span> mp3lame <span style="color: #660033;">-ovc</span> lavc <span style="color: #660033;">-o</span> <span style="color: #800000;">${1%\.*}</span>.avi
<span style="color: #000000; font-weight: bold;">else</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> Usage:
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>$0 FILE&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre>
</div>
</div>
<p>It transforms the first parameter like something.flv to something.avi. Putting this script as executable on your path like on /usr/bin/ you can easily call the command 2n800 followed with tha name of your video you want to convert. If is readable by Mplayer, it will be converted.</p>
<p>After you converted you video and sent to your n800, you can watch on <a href="http://mplayer.garage.maemo.org/">Mplayer to Maemo</a>. The result is perfect.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/11/30/converting-videos-to-n800/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
