<?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>SimplyOddBlog &#187; mencoder</title>
	<atom:link href="http://simplyodd.com/blog/tag/mencoder/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplyodd.com/blog</link>
	<description>Nobody reads this.</description>
	<lastBuildDate>Sat, 07 Nov 2009 23:40:28 +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>Converting my cellphone videos</title>
		<link>http://simplyodd.com/blog/2009/07/02/converting-my-cellhone-videos/</link>
		<comments>http://simplyodd.com/blog/2009/07/02/converting-my-cellhone-videos/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 23:02:31 +0000</pubDate>
		<dc:creator>chuck</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[cellphone]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://simplyodd.com/blog/?p=1009</guid>
		<description><![CDATA[I&#8217;ve got an LG ENV2 cell phone and it takes pretty decent videos (for a cell phone). The problem is that I&#8217;m stuck watching the finished videos on a tiny screen. If I play the videos I copy off the SD card onto my computer I don&#8217;t get any audio. One solution is to upload [...]]]></description>
			<content:encoded><![CDATA[<!-- AdSense Now! V1.63 -->
<!-- Post[count: 2] -->
<div class="adsense adsense-leadin" style="float:right;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "pub-7261575811228959";
/* 120x240, created 7/21/09 */
google_ad_slot = "9881695254";
google_ad_width = 120;
google_ad_height = 240;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>I&#8217;ve got an LG ENV2 cell phone and it takes pretty decent videos (for a cell phone).  The problem is that I&#8217;m stuck watching the finished videos on a tiny screen.  If I play the videos I copy off the SD card onto my computer I don&#8217;t get any audio.</p>
<p>One solution is to upload the videos directly to YouTube:<br />
<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/1hmyLLL22fo&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x5d1719&#038;color2=0xcd311b"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/1hmyLLL22fo&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x5d1719&#038;color2=0xcd311b" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object><br />
YouTube does the conversion and maintains the audio in the resulting video.</p>
<hr />
<p>But what if I don&#8217;t want to go through the trouble of uploading and waiting for the video to be converted?  Linux to the rescue!</p>
<p>First of all, install ffmpeg and mencoder:<br />
(actually, I&#8217;m not sure if you need ffmpeg or not.  In my case it didn&#8217;t hurt anything.)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mencoder <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span></pre></div></div>

<p>Then copy the video(s) to your computer, open a terminal window and change to the directory in which you&#8217;ve copied the files.</p>
<p>Then run mencoder:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mencoder input_filename.3g2 <span style="color: #660033;">-o</span> output_filename.avi <span style="color: #660033;">-oac</span> mp3lame <span style="color: #660033;">-ovc</span> lavc</pre></div></div>

<ul>
<li>mp3lame is the used audio-codec (here mp3)</li>
<li>lavc is the used video-codec (here libavcodec)</li>
</ul>
<p>After the conversion is complete you should have a playable (audio included!) .avi file in the same folder!  Easy.</p>
<p>Here&#8217;s a video I just pulled off my phone and converted &#8211;<br />
<a href='http://simplyodd.com/blog/wp-content/uploads/2009/07/hbdaymax.avi'>Happy Birthday Max!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://simplyodd.com/blog/2009/07/02/converting-my-cellhone-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://simplyodd.com/blog/wp-content/uploads/2009/07/hbdaymax.avi" length="2483634" type="video/x-msvideo" />
		</item>
		<item>
		<title>Rip a DVD into a DivX with Mencoder on MisterHowto.com</title>
		<link>http://simplyodd.com/blog/2009/06/07/rip-a-dvd-into-a-divx-with-mencoder-on-misterhowtocom/</link>
		<comments>http://simplyodd.com/blog/2009/06/07/rip-a-dvd-into-a-divx-with-mencoder-on-misterhowtocom/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 15:31:51 +0000</pubDate>
		<dc:creator>chuck</dc:creator>
				<category><![CDATA[WebSnip]]></category>
		<category><![CDATA[dvdrip]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mencoder]]></category>

		<guid isPermaLink="false">http://crazyhouse.homelinux.com:8080/wordpress/?p=87</guid>
		<description><![CDATA[Rip a DVD into a DivX with Mencoder We&#8217;re going to use Mencoder and Mplayer to backup a DVD you own into a DivX file. Find out which part and language we want mplayer dvd://2 A DVD can have several &#8220;titles&#8221; (parts), and the actual movie is not always the first one. Replace &#8220;2&#8243; in [...]]]></description>
			<content:encoded><![CDATA[<p>Rip a DVD into a DivX with Mencoder</p>
<p>We&#8217;re going to use Mencoder and Mplayer to backup a DVD you own into a DivX file.</p>
<p>Find out which part and language we want</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mplayer</span> dvd:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">2</span></pre></div></div>

<p>A DVD can have several &#8220;titles&#8221; (parts), and the actual movie is not always the first one. Replace &#8220;2&#8243; in the command above with any number, beginning from 1, until you find the part you want. Keep that number in mind.</p>
<p>The language you want is not necessarily the default one either. Run this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mplayer</span> <span style="color: #660033;">-alang</span> en dvd:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">2</span></pre></div></div>

<p>Replace &#8220;2&#8243; with the number you found earlier, and &#8220;en&#8221; (English) with a two-letter code for the language you want (fr for French, etc.).</p>
<p>Make the right crop</p>
<p>The DVD will probably have black borders at the top and bottom of the movie, and we don&#8217;t want them in our DivX (they would make the file pointlessly larger), so we need to crop them out. Run this command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mplayer</span> <span style="color: #660033;">-ss</span> <span style="color: #000000;">60</span> <span style="color: #660033;">-vf</span> cropdetect dvd:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">2</span></pre></div></div>

<p>This will make Mplayer start playing the movie 60 seconds after the beginning (replace &#8220;2&#8243; with the right title number). Navigate in the movie (Right and Left arrows) until you reach a sequence that is bright enough to let you clearly see the movie&#8217;s borders. Close the movie and look at what Mplayer has been outputting in the terminal: lots of lines like this one:</p>
<p>crop area: X: 0..719 Y: 72..503 (-vf crop=720:432:0:72)30.0% 33 0</p>
<p>The part between brackets is exactly what you&#8217;ll need to use in a few moments to get the right crop.</p>
<p>Encode!</p>
<p>We&#8217;re all set, let&#8217;s encode the movie. We&#8217;re going to do it in two passes (better quality).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mencoder <span style="color: #660033;">-alang</span> en dvd:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #000000;">2</span> <span style="color: #660033;">-ovc</span> xvid <span style="color: #660033;">-xvidencopts</span> <span style="color: #007800;">pass</span>=<span style="color: #000000;">2</span>:<span style="color: #007800;">bitrate</span>=-<span style="color: #000000;">700000</span> <span style="color: #660033;">-oac</span> mp3lame <span style="color: #660033;">-vf</span> <span style="color: #007800;">crop</span>=<span style="color: #000000;">720</span>:<span style="color: #000000;">432</span>:<span style="color: #000000;">0</span>:<span style="color: #000000;">72</span> <span style="color: #660033;">-o</span> Movie.avi</pre></div></div>

<p>Of course, replace &#8220;en&#8221;, &#8220;2&#8243; and the crop options with what you need. The &#8220;bitrate&#8221; value is usually set to how much disk space (in Kb) the video will use for each second. However, by using a negative value (here -700000) you can just ask for a (very) approximate file size (here about 700 M) and Mencoder will calculate the bitrate for you.</p>
<p>via <a href="http://www.misterhowto.com/index.php?category=Computers&amp;subcategory=Video&amp;article=rip_dvd_into_divx">Rip a DVD into a DivX with Mencoder on MisterHowto.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplyodd.com/blog/2009/06/07/rip-a-dvd-into-a-divx-with-mencoder-on-misterhowtocom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
