<?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>René Samselnig&#039;s Weblog &#187; movies</title>
	<atom:link href="http://sdm-net.org/tag/movies/feed/" rel="self" type="application/rss+xml" />
	<link>http://sdm-net.org</link>
	<description>Personal Entertainment and Knowledge Management</description>
	<lastBuildDate>Fri, 18 May 2012 10:09:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Using mencoder to encode movies</title>
		<link>http://sdm-net.org/2008/10/using-mencoder-to-encode-movies/</link>
		<comments>http://sdm-net.org/2008/10/using-mencoder-to-encode-movies/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 19:55:31 +0000</pubDate>
		<dc:creator>René Samselnig</dc:creator>
				<category><![CDATA[About]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[movies]]></category>

		<guid isPermaLink="false">http://sdm-net.org/?p=158</guid>
		<description><![CDATA[<p>This article wants to cover some basic and advanced encoding using mencoder as the encoding engine. Basically all media MPlayer can read is suitable for this howto. Source MPlayer knows of those sources (use these in substitution for SOURCE in below examples): file: uses a file as input URL: uses an URL as input (useful [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>This article wants to cover some basic and advanced encoding using <em>mencoder</em> as the encoding engine. Basically all media <a href="http://www.mplayerhq.hu/">MPlayer</a> can read is suitable for this howto.<span id="more-158"></span></p>

<h4>Source</h4>

<p>MPlayer knows of those sources (use these in substitution for SOURCE in below examples):</p>

<ul>
<li>file: uses a file as input</li>
<li>URL: uses an URL as input (useful for streams)</li>
<li>playlist: uses the given playlist as input</li>
<li>-: uses stdin as input</li>
<li>[dvd|dvdnav]://[title|[start<em>title]-end</em>title]: uses a DVD as input</li>
<li>vcd://track[/device]: uses a VCD as input</li>
<li>tv://[channel][/input_id]: uses some TV channel</li>
<li>radio://[channel|frequency][/capture]: uses some radio channel</li>
<li>pvr://: uses video-in of your TV card</li>
<li>dvb://[card_number@]channel: uses DVB channel</li>
<li>mf://[filemask|@listfile]: uses a list of jpg/png files</li>
<li>[cdda|cddb]://track[-endtrack][:speed][/device]: uses audio CD</li>
</ul>

<p>If you are unsure which source you want to use consult the man page:</p>

<pre><code>man mplayer</code></pre>

<h4>Copying</h4>

<p>If you just want to copy some SOURCE without changing its coding then this is what you need:</p>

<pre><code>mencoder SOURCE -oac copy -ovc copy /tmp/MOVIE.avi</code></pre>

<h4>Encoding</h4>

<p>Here is an example of encoding some SOURCE to DivX with Mp3 sound.</p>

<pre><code>mencoder SOURCE -oac lavc -ovc lavc -lavcopts ↵
vcodec=divx:acodec=mp3:vbitrate=1800:abitrate=128 ↵
/tmp/MOVIE.avi</code></pre>

<h4>Languages</h4>

<p>To select a specific language you need these parameters:</p>

<pre><code>mencoder SOURCE OPTIONS -alang en -slang de /tmp/MOVIE.avi</code></pre>

<h4>Crop and Scale</h4>

<p>Cropping cuts off parts of the visible movie screen. Scaling uses the input resolution and scales it to the given resolution. Scaling uses a lot of CPU and negatively effects not only encoding time but also quality.</p>

<pre><code>mencoder SOURCE OPTIONS -vf crop=720:544:0:16,scale=720:576</code></pre>

<p>MPlayer has a neat method to extract those values from the movie. Just run</p>

<pre><code>mplayer SOURCE -vf cropdetect</code></pre>

<p>and MPlayer will generate a lot of output. Let the movie play until these parameters don&#8217;t change anymore.</p>

<h4>Errors on Encoding</h4>

<p>From time to time you encounter a DVD you cannot encode. <em>mencoder</em> stops encoding and your DVD-drive makes a suspicious noice. This happens almost always at the beginning of the encoding process. Then you have two options to choose from:</p>

<ul>
<li>leave alone that DVD and don&#8217;t copy/rip it</li>
<li>crop some seconds/minutes from the beginning</li>
</ul>

<p>If your choise was number two &#8211; congratulations and welcome in my world. The first few seconds, eventually minutes, of every movie are the opening credits. If you&#8217;re not that much interested in this information then continue as follows.</p>

<pre><code>mencoder -ss 40 SOURCE -ovc copy -oac copy -o /tmp/MOVIE.avi</code></pre>

<p>The switch <strong>-ss</strong> tells mencoder to seek forward 40 seconds and start encoding at this position.</p>

<h4>See also</h4>

<ul>
<li><a href="http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide">HOWTO Mencoder Introduction Guide &#8211; Gentoo Linux Wiki</a></li>
<li><a href="http://sdm-net.org/download/">mkmvsh</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sdm-net.org/2008/10/using-mencoder-to-encode-movies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

