<?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>atppp&#039;s Blog &#187; ipod</title>
	<atom:link href="http://blog.wuxinan.net/archives/tag/ipod/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.wuxinan.net</link>
	<description></description>
	<lastBuildDate>Tue, 08 Dec 2009 08:20:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Convert video to iPod format</title>
		<link>http://blog.wuxinan.net/archives/422</link>
		<comments>http://blog.wuxinan.net/archives/422#comments</comments>
		<pubDate>Fri, 08 Aug 2008 03:21:11 +0000</pubDate>
		<dc:creator>atppp</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[aac]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[lang:en]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.wuxinan.net/?p=422</guid>
		<description><![CDATA[Basic command: ffmpeg -i input.avi -f mp4 -vcodec mpeg4 -b 1000kb \ -acodec aac -ab 192kb [-ac 2] output.mp4 &#8220;-ac 2&#8221; may not work if the input file is in mkv format with 5.1 aac audio (if you don&#8217;t convert 5.1 to 2.0, playing the file crashes your iPod/iPhone). Here&#8217;s a possible way to convert: [...]]]></description>
			<content:encoded><![CDATA[<p>Basic command:</p>
<pre>ffmpeg -i input.avi -f mp4 -vcodec mpeg4 -b 1000kb \
-acodec aac -ab 192kb [-ac 2] output.mp4</pre>
<p>&#8220;<code>-ac 2</code>&#8221; may not work if the input file is in mkv format with 5.1 aac audio (if you don&#8217;t convert 5.1 to 2.0, playing the file crashes your iPod/iPhone). Here&#8217;s a possible way to convert:</p>
<ul>
<li>Extract aac audio from the mkv file:
<pre>ffmpeg -i input.mkv -vn -acodec copy audio.aac</pre>
</li>
<li>Downmix 5.1 to 2.0:
<pre>faad -d audio.aac -o audio-2ch.wav</pre>
</li>
<li>Merge and convert to iPod format:
<pre>ffmpeg -i input.mkv -i audio-2ch.wav -map 0.0:0 -map 1.0:1 -f mp4 \
-vcodec mpeg4 -s 470x320 -b 1000kb -acodec aac -ab 192kb output.mp4</pre>
</li>
<li>The output of the last command gives a little more info of what I am doing here:
<pre>Input #0, matroska, from 'input.mkv':
Duration: 01:24:42.5, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 704x480, 24.39 fps(r)
Stream #0.1: Audio: aac, 48000 Hz, 5:1
Input #1, wav, from 'audio-2ch.wav':
Duration: 01:24:42.5, start: 0.000000, bitrate: 1536 kb/s
Stream #1.0: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 470x320, q=2-31, 1000 kb/s, 24.39 fps(c)
Stream #0.1: Audio: aac, 48000 Hz, stereo, 192 kb/s
Stream mapping:
Stream #0.0 -&gt; #0.0
Stream #1.0 -&gt; #0.1</pre>
</li>
</ul>
<p>Video conversion can certainly be way fancier than what I am doing here, and <code>faad</code> is obviously not the best way to downmix audio from 5.1 to 2.0. You can also find quite a few iPod converters but personally I like command line. Anyway, happy converting! (ffmpeg <a href="http://ffmpeg.mplayerhq.hu/faq.html#SEC25">ref</a>)</p>
<p>[Also note that on MacOS, you may have to change "<code>-acodec aac</code>" to "<code>-acodec libfaac</code>".]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wuxinan.net/archives/422/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

