<?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; mencoder</title>
	<atom:link href="http://silveiraneto.net/tag/mencoder/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 04:13:27 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.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[<a href="http://silveiraneto.net/2009/11/30/converting-videos-to-n800/" title="Converting videos to n800"></a>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 &#8230;<p class="read-more"><a href="http://silveiraneto.net/2009/11/30/converting-videos-to-n800/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2009/11/30/converting-videos-to-n800/" title="Converting videos to n800"></a><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" 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" 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: #007800;">$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>
		<item>
		<title>Camera nova e fazendo ela trabalhar bem com o Cinelerra</title>
		<link>http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/</link>
		<comments>http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 03:17:13 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[português]]></category>
		<category><![CDATA[áudio]]></category>
		<category><![CDATA[Casa Brasil]]></category>
		<category><![CDATA[câmera]]></category>
		<category><![CDATA[Cinelerra]]></category>
		<category><![CDATA[extrair]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[Oregon Scientific]]></category>
		<category><![CDATA[software livre]]></category>
		<category><![CDATA[sox]]></category>
		<category><![CDATA[telecentro]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=2286</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/" title="Camera nova e fazendo ela trabalhar bem com o Cinelerra"></a>A um tempo atrás eu comprei uma câmera nova pra mim. Como eu não quero posso comprar uma câmera boa mesmo agora eu preferi comprar uma bem barata que fizesse o básico. Uma câmera de preço médio iria ter poucas &#8230;<p class="read-more"><a href="http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/" title="Camera nova e fazendo ela trabalhar bem com o Cinelerra"></a><p>A um tempo atrás eu comprei uma câmera nova pra mim.</p>
<p>Como eu não <span style="text-decoration: line-through;">quero</span> posso comprar uma câmera boa mesmo agora eu preferi comprar uma bem barata que fizesse o básico. Uma câmera de preço médio iria ter poucas funções e eu iria ficar pensando —  se eu tivesse comprado aquela outra. Além disso uma câmera custa um pouco mais trás também um maior zelo e o meu zelo é muito limitado e eu já gasto com outras coisas. Ou seja, cheguei a conclusão que pra mim o ideal seria uma câmera barata que pudesse estar absolutamente sempre comigo, esteja eu a pé, de ônibus ou de carro. Assim eu posso tirar muitas, muitas fotos, já que o meu fim principal pra ela é a documentação de eventos e atividades e não um trabalho artístico.</p>
<p style="text-align: center;"><img class="size-full wp-image-2285" title="oregon scientific" src="http://silveiraneto.net/wp-content/uploads/2009/02/oregon_scientific.jpeg" alt="oregon scientific" width="190" height="190" /></p>
<p>Dentro disso e uma certa urgência em voltar a tirar fotos (<a title="Cparty 2009" href="http://www.flickr.com/photos/silveiraneto/sets/72157612770124641/">Campus Party de 2009</a> chegando) eu comprei nas Americanas (a loja mesmo, não a ponto-com) uma <a href="http://www.oregonscientific.com.br/">Oregon Scientific</a> (nome estranho) de 5.0 Megapixels com um cartão de 1Gb, por R$ 200.  Ela é bem básica pra fotos já que não tem zoom optico e não se dá bem com movimentos mas a qualidade da gravação dos vídeos, inclusive com aúdio me surpreendeu.</p>
<p style="text-align: center;"><a title="laboratório de metareciclagem by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/3254622376/"><img class="aligncenter" src="http://farm4.static.flickr.com/3410/3254622376_e65ca56dbd.jpg" alt="laboratório de metareciclagem" width="500" height="375" /></a><br />
<small>Uma típica foto com ela. Essa em um telecentro da Casa Brasil.</small></p>
<p style="text-align: center;"><a title="#cparty by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/3219227639/"><img class="aligncenter" src="http://farm4.static.flickr.com/3375/3219227639_dd8c2c8e30.jpg" alt="#cparty" width="500" height="375" /></a><br />
<small>Um macro de um robô do ITA durante o Campus Party</small></p>
<p>Erámos felizes até eu <a title="Cromakey no Cinelerra" href="http://silveiraneto.net/2009/01/17/cromakey-no-cinelerra/">começar a fazer meus primeiros experimentos</a> com os vídeos dela com o <a title="Cinelerra" href="http://cinelerra.org/">Cinelerra</a> (software que eu ainda engatinho).</p>
<p>O vídeo tudo bem mas o aúdio dos vídeos dela (uns arquivos AVI com vídeo codificado e áudio cru) ficavam bichados no Cinelerra mas tocavam bem no <a title="Mplayer" href="http://www.mplayerhq.hu/">Mplayer</a> ou outros tocadores. Como o vídeo estava legal eu só precisava extrair os audios por fora que aí eu podia colocar eles como uma trilha de aúdio do Cinelerra e problema resolvido. O problema é que sempre que eu ia extrair esse aúdio dava algum problema. A solução veio em uma thread da <a title="mplayer list" href="http://lists.mplayerhq.hu/pipermail/mencoder-users/2005-December/002333.html">lista de usuários do Mencoder</a> usando a dupla Mplayer e <a href="http://www.linux.org/lessons/short/sox/index.html">Sox</a>:</p>
<blockquote><p>mplayer -vc null -vo null -ao pcm video_da_camera.AVI<br />
sox audiodump.wav -i -b -r 48000 -c 2 audio_do_video.wav</p></blockquote>
<p>No caso eu estou usando a taxa de amostragem em 48kHz e dois canais de áudio (stereo) para ficar compatível com outros formatos que eu estou usando no Cinelerra.</p>
<p>Pronto, voltamos a ser felizes juntos, eu, a câmera e o Cinelerra.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2009/02/21/camera-nova-e-fazendo-ela-trabalhar-bem-com-o-cinelerra/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

