<?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>Computer Graphics, Linux and Everything... &#187; Everything</title>
	<atom:link href="http://francoislord.com/blog/category/everything/feed" rel="self" type="application/rss+xml" />
	<link>http://francoislord.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 25 Nov 2011 18:44:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Encoding H.264/AVC videos for PS3 using ffmpeg</title>
		<link>http://francoislord.com/blog/everything/encoding-h-264avc-videos-for-ps3-using-ffmpeg_144</link>
		<comments>http://francoislord.com/blog/everything/encoding-h-264avc-videos-for-ps3-using-ffmpeg_144#comments</comments>
		<pubDate>Mon, 26 Oct 2009 21:12:29 +0000</pubDate>
		<dc:creator>flord</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[PS3]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://francoislord.com/blog/?p=144</guid>
		<description><![CDATA[OK, I&#8217;m tired of loading up my script just to see what&#8217;s the command line to encode AVC videos for the PS3 so I&#8217;m posting it here. This way It&#8217;ll be quicker for me to come see it here.
The PS3 doesn&#8217;t play Quicktime files. It much prefers mp4, which is an open standard (not to [...]]]></description>
			<content:encoded><![CDATA[<br />
<b>Warning</b>:  in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument in <b>/home/content/f/r/a/francoislord/html/blog/wp-content/plugins/flattr/flattr5.php</b> on line <b>425</b><br />
<p>OK, I&#8217;m tired of loading up my script just to see what&#8217;s the command line to encode AVC videos for the PS3 so I&#8217;m posting it here. This way It&#8217;ll be quicker for me to come see it here.</p>
<p>The PS3 doesn&#8217;t play Quicktime files. It much prefers mp4, which is an open standard (not to be confused with open source). The best and fastest way I&#8217;ve found to encode mp4 files is with ffmpeg. Yes, it&#8217;s command line but it&#8217;s easy enough to remember the basic syntax rapidly.</p>
<p>The syntax has several blocks, depending on what you need, all blocks may not be required.</p>
<pre>ffmpeg
-r 23.98
-i FrameSequence.%04d.jpg
-i Sound.wav
-vcodec libx264 -acodec libfaac
-b 35M -ab 224k
-mbd rd -flags 4mv,trell,aic,qprd,mv0,loop -cmp 2 -subcmp 2 -flags2 dct8x8+skiprd -level 41 -bf 3 -qmin 10
-threads 0
OutputFile.mp4</pre>
<p>Let&#8217;s look at this in details.<br />
It begins with the executable (duh)<br />
<code>ffmpeg</code></p>
<p>Then you must set the frame rate only if you&#8217;re loading a sequence of frames. BTW, it only reads jpeg and png files, and it must begin at 0 or 1.<br />
<code>-r 23.98</code></p>
<p>The input files, several if your audio is separated from the video.<br />
<code>-i FrameSequence.%04d.jpg<br />
-i Sound.wav</code></p>
<p>The formats, determined by the codecs. AVC for Video and AAC for audio.<br />
<code>-vcodec libx264 -acodec libfaac</code></p>
<p>The bit rates. I use 35Mbit/s for 1080p, 15 for 720p and 5 for SD.<br />
<code>-b 35M -ab 224k</code></p>
<p>This line must be entered as is. It set the encoding parameters the PS3 requires.<br />
<code>-mbd rd -flags 4mv,trell,aic,qprd,mv0,loop -cmp 2 -subcmp 2 -flags2 dct8x8+skiprd -level 41 -bf 3 -qmin 10</code></p>
<p>This will force ffmpeg to use all the cores on your machines, potentially speeding up the conversion considerably.<br />
<code>-threads 0</code></p>
<p>And the output file, with the mp4 extention.<br />
<code>OutputFile.mp4</code></p>
<p>This command works for ffmpeg 0.5 and probably later. You can find ffmpeg for Windows <a href="http://ffmpeg.zeranoe.com/builds/" target="_blank">here</a>.<br />
Thanks to <a href="http://ps3wiki.qj.net/index.php/Using_ffmpeg_to_transcode_video_for_the_PS3">this site</a> for providing the original syntax. I added the -qmin 10 part because libx264 was acting weird without it.</p>
<p>It is important to know that if you&#8217;re encoding a video you have made using computer softwares, your video might look a bit too contrasted. Blacks might be too black and whites too white. This is because pixel values on your computer range from 0 to 255, and on your TV they range from 16 to 235. Any pixel that has a value below 16 in your movie will appear as black on your TV. To correct this, you must compress the colors of all the frames in your movie to make sure the darkest thing is set above 16 and the brightest thing is below 235. Then it will show up correctly on your TV when played with the PS3. There is a setting in the PS3 to avoid this, but your TV must be compatible, and not all TVs are compatible, far from it.</p>
<p>EDIT: with recent linux distribution (Mandriva 2010.1 in my case) comes a new version of ffmpeg. This new version requires some changes to the command line. First, you have to add the argument <em>-vpre slow</em> somewhere. Also, the <em>libfaac </em>codec has been replaced by <em>aac</em>. The command would then looks like this:</p>
<pre>ffmpeg
-r 23.98
-i FrameSequence.%04d.jpg
-i Sound.wav
-vcodec libx264 -acodec aac -b 35M -ab 224k
-vpre slow -mbd rd -flags 4mv,trell,aic,qprd,mv0,loop -cmp 2 -subcmp 2 -flags2 dct8x8+skiprd -level 41 -bf 3 -qmin 10
-threads 0
OutputFile.mp4</pre>
]]></content:encoded>
			<wfw:commentRss>http://francoislord.com/blog/everything/encoding-h-264avc-videos-for-ps3-using-ffmpeg_144/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perfect bag for EeePC 901</title>
		<link>http://francoislord.com/blog/everything/perfect-bag-for-eeepc-901_6</link>
		<comments>http://francoislord.com/blog/everything/perfect-bag-for-eeepc-901_6#comments</comments>
		<pubDate>Sun, 04 Jan 2009 04:23:16 +0000</pubDate>
		<dc:creator>flord</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[eeepc]]></category>

		<guid isPermaLink="false">http://francoislord.com/blog/?p=6</guid>
		<description><![CDATA[Canadians, your search is over. MEC has the perfect travel bag for your EeePC 901.
The EeePC fits perfectly with its soft sleeve and the bag can hold the power adaptor in the front pocket. It really looks like MEC had designed the bag to carry an Eee PC.
]]></description>
			<content:encoded><![CDATA[<p>Canadians, your search is over. MEC has the <a href="http://www.mec.ca/Products/product_detail.jsp?PRODUCT%3C%3Eprd_id=845524441774985">perfect travel bag</a> for your EeePC 901.<br />
The EeePC fits perfectly with its soft sleeve and the bag can hold the power adaptor in the front pocket. It really looks like MEC had designed the bag to carry an Eee PC.</p>
]]></content:encoded>
			<wfw:commentRss>http://francoislord.com/blog/everything/perfect-bag-for-eeepc-901_6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

