<?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>Scott Yang's Playground &#187; Linux</title>
	<atom:link href="http://scott.yang.id.au/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.yang.id.au</link>
	<description>Faith, Technology and Randomness in Life, According to Scott</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:01:12 +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>Debian 6.0 &#8220;Squeeze&#8221; released</title>
		<link>http://scott.yang.id.au/2011/02/debian-6-0-squeeze-released/</link>
		<comments>http://scott.yang.id.au/2011/02/debian-6-0-squeeze-released/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 05:51:40 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2011/02/debian-6-0-squeeze-released/</guid>
		<description><![CDATA[Debian 6.0 Squeeze released. My server platform of choice for the next year and half (until the next Debian or Ubuntu LTS are released)]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/debian-logo.png" alt="Debian" class="floaty"/> <a href="http://www.debian.org/News/2011/20110205a ">Debian 6.0 Squeeze released</a>. My server platform of choice for the next year and half (until the next Debian or Ubuntu LTS are released)</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2011/02/debian-6-0-squeeze-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Ubuntu USB Key Install with UNetbootin</title>
		<link>http://scott.yang.id.au/2008/05/easy-ubuntu-usb-key-install-with-unetbootin/</link>
		<comments>http://scott.yang.id.au/2008/05/easy-ubuntu-usb-key-install-with-unetbootin/#comments</comments>
		<pubDate>Thu, 29 May 2008 13:21:39 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1747</guid>
		<description><![CDATA[Recently when I tried to upgrade my ASUS Eee PC from Ubuntu 7.10 to 8.04, it made a complete mess &#8212; 4GB internal drive is just not enough to hold all the applications, data + new packages for upgrade. So instead of trying to fix a borked Ubuntu installation, I tried to install Hardy Heron [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/unetbootin.jpg" width="225" height="165" alt="UNetbootin" class="floaty" style="border:#ccc solid 1px;padding:3px;"/> Recently when I tried to upgrade my <a href="http://scott.yang.id.au/2008/01/neeew-toy/">ASUS Eee PC</a> from <a href="http://www.ubuntu.com/">Ubuntu</a> 7.10 to 8.04, it made a complete mess &#8212; 4GB internal drive is just not enough to hold all the applications, data + new packages for upgrade. So instead of trying to fix a borked Ubuntu installation, I tried to install Hardy Heron from scratch again.</p>
<p>EeeUser Wiki has a <a href="http://wiki.eeeuser.com/installing_ubuntu_8.04">complete instruction</a> on how to get Xubuntu 8.04 onto a USB key so Eee PC can bootstrap from it. The only problem is &#8212; it is too complicated and it does not work (for me at least). Downloading the Xubuntu ISO is the easy bit, but making a bootable USB key is PITA. I was booting the Xubuntu live CD from VMWare, follow the instruction to dump the content onto a mounted USB key &#8212; doesn&#8217;t work. Download the utilities from Pendrivelinux.com to prepare the USB key &#8212; doesn&#8217;t work.</p>
<p>I guess what I should have read is the <a href="https://help.ubuntu.com/community/Installation/FromUSBStick">this document</a> instead, which points me to <a href="http://unetbootin.sourceforge.net/">UNetbootin</a>, the Universal Netboot Installer. Download a 3MB Windows executable. Run it. Point it to the downloaded Xubuntu ISO and the drive letter for the USB. Click Ok &#8212; and it&#8217;s <b>done</b>! Booted my Eee PC with it and half an hour later it is now running Hardy Heron. <b>Too easy</b>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2008/05/easy-ubuntu-usb-key-install-with-unetbootin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.04 LTS Hardy Heron Released</title>
		<link>http://scott.yang.id.au/2008/04/ubuntu-804-lts-hardy-heron-released/</link>
		<comments>http://scott.yang.id.au/2008/04/ubuntu-804-lts-hardy-heron-released/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 13:31:12 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1742</guid>
		<description><![CDATA[Ubuntu 8.04 LTS &#8220;Hardy Heron&#8221; has just been released, with server edition getting extended support until 2013. It was &#8220;Coming Soon&#8221; half an hour ago, and it is now here! I am probably going to install that on most of my production servers as I am really growing tired of Gentoo.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ubuntu.com/products/whatisubuntu/804features/">Ubuntu 8.04 LTS &#8220;Hardy Heron&#8221; has just been released</a>, with server edition getting extended support until 2013. It was &#8220;Coming Soon&#8221; half an hour ago, and it is now here! I am probably going to install that on most of my production servers as I am really <a href="http://hostingfu.com/article/switched-gentoo-ubuntu">growing tired of Gentoo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2008/04/ubuntu-804-lts-hardy-heron-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>History Meme</title>
		<link>http://scott.yang.id.au/2008/04/history-meme/</link>
		<comments>http://scott.yang.id.au/2008/04/history-meme/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 01:41:37 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[meme]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2008/04/history-meme/</guid>
		<description><![CDATA[No one tagged me but saw history meme and wanted to test it out on my main &#8220;workstation&#8221; &#8212; a Gentoo Linux running inside VMWare Server on a Dell notebook running Windows XP. $ uname -a Linux vmgentoo 2.6.22-gentoo-r2 #1 SMP Fri Aug 17 16:56:49 EST 2007 i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz [...]]]></description>
			<content:encoded><![CDATA[<p>No one tagged me but saw <a href="http://diveintomark.org/archives/2008/04/15/history-meme">history meme</a> and wanted to test it out on my main &#8220;workstation&#8221; &#8212; a Gentoo Linux running inside VMWare Server on a Dell notebook running Windows XP.</p>
<pre class="code">
$ uname -a
Linux vmgentoo 2.6.22-gentoo-r2 #1 SMP Fri Aug 17 16:56:49 EST 2007 i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux
</pre>
<pre class="code">
$ history | awk '{print $2}' | sort | uniq -c | sort -rn | head
    132 ls
     91 cd
     25 svn
     25 ssh
     18 vim
     18 eix
     15 screen
     12 make
     11 unison
     10 hfc
</pre>
<p>As root</p>
<pre class="code">
# history | awk '{print $2}' | sort | uniq -c | sort -rn | head
    107 ls
     82 emerge
     40 lsof
     37 cd
     20 vim
     20 ps
     19 dispatch-conf
     18 route
     11 kill
     10 svn
</pre>
<p>Interesting notes:</p>
<ol>
<li><code>ls</code> came top in both user and root &#8212; probably because I can never remember what do I have in the current directory.</li>
<li><code>hfc</code> is a devel script at work that compile a Python script into byte-code, <code>marshal.dump()</code> and then GPG-sign the result so I can &#8220;hotfix&#8221; a running instance of a product we develop.</li>
</li>
<li>I probably have used way too much Subversion. Should have start looking at alternatives.</li>
<li>Participating in geeky meme is just another way to procrastinate without doing any real work&#8230;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2008/04/history-meme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Private Servers under 7 Bucks</title>
		<link>http://scott.yang.id.au/2008/03/virtual-private-servers-under-7-bucks/</link>
		<comments>http://scott.yang.id.au/2008/03/virtual-private-servers-under-7-bucks/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 01:44:32 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2008/03/virtual-private-servers-under-7-bucks/</guid>
		<description><![CDATA[LowEndBox.com: Virtual Private Servers Comparison Matrix for VPS plans and providers under $7 USD a month. I am talking about a complete Linux server with root account and a dedicated IP address (not some dodgy oversold shared hosting plans), although most low-end plans have no more than 64MB of memory. Well, my first web application [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lowendbox.com/virtual-server-comparison/">LowEndBox.com: Virtual Private Servers Comparison Matrix</a> for VPS plans and providers under $7 USD a month. I am talking about a complete Linux server with root account and a dedicated IP address (not some dodgy oversold shared hosting plans), although most low-end plans have no more than 64MB of memory. Well, my first web application runs on 8MB of RAM 11 years ago, and that includes Apache + Perl CGI + X11 + Netscape, so I guess 64MB ought to be enough for everyone :)</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2008/03/virtual-private-servers-under-7-bucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>People Change OS More Frequent Than Their [fill in the blank]</title>
		<link>http://scott.yang.id.au/2006/11/people-change-os/</link>
		<comments>http://scott.yang.id.au/2006/11/people-change-os/#comments</comments>
		<pubDate>Sat, 04 Nov 2006 04:26:35 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/11/people-change-os/</guid>
		<description><![CDATA[Apple has long been running their switch Get a Mac campaign, luring the PC users to abandon Windows to come to the paradise. Then we have geeks migrating from Mac to Ubuntu out of frustration from the built-in apps. Now, we have David Young, theJoyent CEO, is talking about his switch from Ubuntu to Windows [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.apple.com/">Apple</a> has long been running their <del>switch</del> <a href="http://www.apple.com/getamac/">Get a Mac</a> campaign, luring the PC users to abandon Windows to come to the paradise. Then we have geeks <a href="http://scott.yang.id.au/2006/06/mac-switchers-to-linux/">migrating from Mac to Ubuntu</a> out of frustration from the built-in apps. Now, we have David Young, the<a href="http://www.joyent.com/">Joyent</a> CEO, is <a href="http://joyeur.com/2006/11/03/official-i-am-leaving-ubuntu-for-windows-vista">talking about his switch from Ubuntu to Windows Vista</a>.</p>
<blockquote><p>Why? Simple. I just want a browser. Wireless works out of the box. I didn’t have to screw around with configuring my network.</p></blockquote>
<p>Great. Now I am not sure which OS should I switch to next.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/11/people-change-os/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Batch encode video for iPod under Linux</title>
		<link>http://scott.yang.id.au/2006/08/batch-encode-video-for-ipod-under-linux/</link>
		<comments>http://scott.yang.id.au/2006/08/batch-encode-video-for-ipod-under-linux/#comments</comments>
		<pubDate>Thu, 31 Aug 2006 01:29:23 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/08/batch-encode-video-for-ipod-under-linux/</guid>
		<description><![CDATA[Mark Pilgrim wrote a bash script to batch-encode videosto H264/AAC for iPod under Linux, utilising other open source applications like ffmpeg and mplayer. One thing I liked about the article is, after listing the prerequisites, Mark wrote &#8220;Please don.t ask me for help installing these prerequisites. Consider it a character-building exercise.&#8221; Maybe I&#8217;ll quote that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://diveintomark.org/archives/2006/08/30/ipod-video-howto">Mark Pilgrim wrote a bash script to batch-encode videosto H264/AAC for iPod under Linux</a>, utilising other open source applications like ffmpeg and mplayer. One thing I liked about the article is, after listing the prerequisites, Mark wrote &#8220;Please don.t ask me for help installing these prerequisites. <em>Consider it a character-building exercise.</em>&#8221; Maybe I&#8217;ll quote that when <a href="http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/#comment-37311">people ask the same questions</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/08/batch-encode-video-for-ipod-under-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Christian, Linux and Microsoft</title>
		<link>http://scott.yang.id.au/2006/08/christian-linux-and-microsoft/</link>
		<comments>http://scott.yang.id.au/2006/08/christian-linux-and-microsoft/#comments</comments>
		<pubDate>Wed, 30 Aug 2006 12:22:05 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Christianity]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/08/christian-linux-and-microsoft/</guid>
		<description><![CDATA[Dan Warne of APC talked about Ubuntu Christian Edition in a sort-of mocking way. I actually took a look at this Ubuntu Christian Edition (UBE) thingy, and it is nothing more than one bash script (convert_me) that installs both GnomeSword + a few modules (an open-source Bible study software) and DansGuardian (a web content filter), [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/ubuntu-christian-edition.png" alt="ubuntu Christian Edition" width="250" height="49" class="floaty" style="border:1px solid #888"/> <a href="http://www.apcstart.com/site/dwarne/2006/08/1227/what-kernel-would-jesus-compile">Dan Warne of APC talked about Ubuntu Christian Edition</a> in a sort-of mocking way. I actually took a look at this <a href="http://www.christianubuntu.com/">Ubuntu Christian Edition</a> (UBE) thingy, and it is nothing more than one bash script (<code>convert_me</code>) that installs both <a href="http://gnomesword.sourceforge.net/">GnomeSword</a> + a few modules (an open-source Bible study software) and <a href="http://dansguardian.org/">DansGuardian</a> (a web content filter), copies in some default configuration, and a few images with &#8220;Christian Edition&#8221; appearing at the right spot. You can install all these packages with <code>apt-get</code>.</p>
<p>Conclusion? UCE is nothing more than a gimmick that attracts Christians to <a href="http://www.ubuntu.com/">Ubuntu Linux</a>. People will say, &#8220;hey I will use it because it labels Christian!&#8221; However, as UCE <strong>requires</strong> Ubuntu pre-installed &#8212; by the time you can start installing UCE you are already 99% there.</p>
<p>However Dan&#8217;s article raised another discussion &#8212; how should Christians relate to Microsoft, open source and Linux? Some people think Christians should avoid Microsoft at all cost as Bill Gates has <strong>666</strong> all over his forehead. And this <a href="https://launchpad.net/products/ichthux/+bug/56927">linked bug item</a> reckons <em>&#8220;This (Microsoft Windows) is a waste of money for Christian communities, as well as a clash with Christian values&#8221;</em>.</p>
<p>Is that the case?</p>
<p>My opinion is, if you, a committed Christian, can stand open source software, then <strong>use it</strong>! It saves you money, and gives you freedom to play around with the source code, if that&#8217;s your thing. Otherwise, do your duty and &#8220;render to Gates (or Jobs) the things that are Gates&#8217;&#8221;, pay for that copy of Windows (or Mac OS X) and use it with clean conscience. It just paid for the family meal of a hard working middle-class Windows developer in Redmond. Using Ubuntu obviously does not make you holier, and using Windows is not an unforgivable sin.</p>
<p>In last Sunday&#8217;s Bible study we looked at 2 Corinthians 5, and one of the challenge questions at the end was along the line of <em>&#8220;as a new creation, what area of your life needs to be changed?&#8221;</em> One thing I asked was, as Christians we should put off downloading pirated software, MP3 and movies. I thought it was obviously, but surprisingly it generated quite a bit of discussion on &#8220;who&#8217;s at fault&#8221; (yeah, the search engine gives me all these results).</p>
<p>At the end, I&#8217;ll say the software you obtained legally are &#8220;Christian Editions&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/08/christian-linux-and-microsoft/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Posting Flash Videos with FFmpeg and FlowPlayer</title>
		<link>http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/</link>
		<comments>http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 13:28:51 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Webmastery]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/</guid>
		<description><![CDATA[Last night I have posted my very first flash video on the web &#8212; and it was Anna sitting there watching, her own video for 2 minutes (which probably would only interest the parents and grand-parents). Anna&#8217;s video aside, I was also having fun figuring out getting that video online. There are many ways putting [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/flowplayer-anna.jpg" alt="Anna showing on FlowPlayer" width="280" height="232" class="floaty"/> Last night I have <a href="http://anna.yang.id.au/2006/07/anna-video/">posted my very first flash video on the web</a> &#8212; and it was <a href="http://anna.yang.id.au/">Anna</a> sitting there watching, her own video for 2 minutes (which probably would only interest the parents and grand-parents). Anna&#8217;s video aside, I was also having fun figuring out getting that video online.</p>
<p>There are many ways putting videos online. You can either:</p>
<ol>
<li>Upload your AVI/QuickTime/WMV files onto a folder somewhere inside your hosting account.</li>
<li>Use a third party video hosting service like <a href="http://video.google.com/">Google Video</a> or <a href="http://www.youtube.com/">YouTube</a>.</li>
</ol>
<p>Personally I don&#8217;t like (2). You need to upload your videos to that 3<sup>rd</sup> party, and you have little control over how the final outcome will be encoded (bit rate, frame rate, quality, etc). Moreover, there are terms and conditions that you need to read through, let along agreeing to. At the end, who owns the rights to uploaded video?</p>
<p>Being a control freak (well, only over the systems that I need to manage), I have always preferred option (1) by hosting video files inside <em>my own</em> accounts, which has some crazy amount of space and data transfer anyway. Except you don&#8217;t get that nice Flash applet which you can embed into your own pages, so visitors can &lt;click&gt; and watch the video without leaving the page. They don&#8217;t need to worry about saving onto the desktop, which media player to use, whether codec has been installed, etc. They Just Works<sup>TM</sup> &#8212; perfect for the grand-parents :)</p>
<p>With a bit of time wasted on research and mocking around, it turns out that you can easily achieve the effect of embedded flash video, and yet host the video files on your own server. And there&#8217;s <strong>zero</strong> penny you need to spend &#8212; all can be done via these open source software, <a href="http://ffmpeg.mplayerhq.hu/">FFmpeg</a> and <a href="http://flowplayer.sourceforge.net/">FlowPlayer</a>.</p>
<h3 id="toc-the-basis">The Basis</h3>
<p>Here&#8217;s a summary of what needs to be done.</p>
<ol>
<li>Convert the video file into a suitable format for Flash players.</li>
<li>Upload the converted file onto hosted account.</li>
<li>Upload the Flash player if hasn&#8217;t been done.</li>
<li>Paste HTML code snippet into the web page.</li>
</ol>
<p>Flash players can <em>only</em> play video files encoded into the <a href="http://en.wikipedia.org/wiki/FLV">FLV</a> (Flash Video) format, which is also the format used by Google Video and YouTube. To do so the open source way is use the universal encoder, <a href="http://ffmpeg.mplayerhq.hu/">FFmpeg</a>.</p>
<h3 id="toc-ffmpeg">FFmpeg</h3>
<p>Installing FFmpeg is trivial &#8212; at least on my <a href="http://www.gentoo.org/">Gentoo</a> boxes :) Make sure appropriate <code>USE</code> flags are used during emerge. For example I have:</p>
<pre class="code">
  USE="aac amr encode ogg vorbis x264 xvid zlib" emerge ffmpeg
</pre>
<p>Other Linux distribution? Not using Linux? Err. Good luck.</p>
<p>To convert a movie using FFmpeg, do the following:</p>
<pre class="code">
$ ffmpeg -i movie.avi movie.flv
</pre>
<p>It will then convert the AVI file into FLV Flash Video. FFmpeg can also handle many different container types, for example QuickTime, WMV1 (not WMV3 at the moment), MPEG4, etc, so just throw the video at it and see whether it handles it.</p>
<p>There are many command line options that you can use to alter the encoding behaviour. For example if I wish to rescale the movie to 320&#215;240, with 15 frame/sec, at video at 250kbps and audio down-sampling to 22,050Hz at 48kbps, I just tell FFmpeg to do it on the command line:</p>
<pre class="code">
$ ffmpeg -i movie.avi -s 320x240 -r 15 -b 250 -ar 22050 -ab 48 movie.flv
</pre>
<p>There are many more options so do check out their manual if you are interested.</p>
<p>There is another thing that we need to do &#8212; create a JPEG thumbnail for previewing. This will be displayed in the otherwise empty canvas of the flash player, before [Play] is pressed. For convenience sake, we&#8217;ll take the very first frame of the video.</p>
<pre class="code">
$ ffmpeg -i movie.avi -f mjpeg -t 0.001 movie.jpg
</pre>
<h3 id="toc-flvtool2">FLVTool2</h3>
<p><a href="http://rubyforge.org/projects/flvtool2/">FLVTool2</a> is needed to calculate and update meta data in the FLV file. Well, you don&#8217;t <em>really</em> need it as you can already play the FLV file spill out from FFmpeg, but because of the missing info, Flash player cannot show the buffering status and current playing position, etc.</p>
<p>I was hesitated to install FLVTool2 because (1) it depends on Ruby which I need to emerge (2) it does not have an <code>ebuild</code> for it. But anyway, having it running is still trivial.</p>
<ol>
<li>Make sure you already have <a href="http://www.ruby-lang.org/">Ruby</a> installed.</li>
<li>Download the latest <a href="http://rubyforge.org/frs/?group_id=1096">FLVTool2</a></li>
<li>Unpack the tarball, change into its directory, and run <code>ruby setup.rb all</code> as root.</li>
</ol>
<p>Now just run</p>
<pre class="code">
$ flvtool2 -U movie.flv
</pre>
<p>Well, installation is actually optional. You can pretty much run FLVTool2 from inside its unpacked directory, for example.</p>
<pre class="code">
$ RUBYLIB=lib ruby bin/flvtool2 -U &lt;path to&gt;/movie.flv
</pre>
<p>Your FLV is ready to go! Upload both FLV and generated JPEG thumbnail onto your web hosting account. Make sure they are in the same folder.</p>
<h3 id="toc-flowplayer">FlowPlayer</h3>
<p><a href="http://flowplayer.sourceforge.net/">FlowPlayer</a> is an open source Flash video player that is light-weight (at around 22kb), and pretty easy to configure. <a href="http://sourceforge.net/project/showfiles.php?group_id=133868">Download</a> the latest version from SourceForge.</p>
<p>Unpack the ZIP will give you the player file <code>FlowPlayer.swf</code>. Upload it somewhere on your website.</p>
<p>Now you need to cut and paste this HTML code snippet onto the web page you wish to show the video:</p>
<pre class="code">
&lt;object type="application/x-shockwave-flash" data="[your site]/FlowPlayer.swf" width="320" height="263" id="FlowPlayer"&gt;
  &lt;param name="allowScriptAccess" value="sameDomain"/&gt;
  &lt;param name="movie" value="[your site]/FlowPlayer.swf"/&gt;
  &lt;param name="quality" value="high"/&gt;
  &lt;param name="scale" value="noScale"/&gt;
  &lt;param name="wmode" value="transparent"/&gt;
  &lt;param name="flashvars" value="baseURL=[base URL]&amp;amp;videoFile=movie.flv
    &amp;amp;autoPlay=false&amp;amp;loop=false&amp;amp;autoBuffering=false
    &amp;amp;splashImageFile=movie.jpg"/&gt;
&lt;/object&gt;
</pre>
<p><code>[your site]</code> is the URL to where you keep the <code>FlowPlayer.swf</code>. <code>[base URL]</code> is the directory where you keep the FLV and JPEG files. For example, the final URL to FLV file will be <code>[base URL]/movie.flv</code>.</p>
<p>Paste that onto your website, or into your blog post, and check whether it works!</p>
<p>Please check <a href="http://flowplayer.sourceforge.net/howto.html">FlowPlayer documentation</a> on the options going to <code>flashvars</code>.</p>
<h3 id="toc-conclusion">Conclusion</h3>
<p>In fact those steps can be easily automated with a bit of scripting. I shall be posting more movies on Anna&#8217;s website.</p>
<p>If your hosting companies are not very generous quota (i.e. small timers who can&#8217;t really oversell), or if you think your video will get digged and slashdotted and become overnight hit, then maybe having Google Video or YouTube to host for you is a wiser idea, just in case a huge hosting bill landing on your credit card statement.</p>
<p>Otherwise, you might choose to host those videos on your own account, and regain a bit of control.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/07/flash-video-ffmpeg-flowplayer/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Mac Users Switch to Linux for Desktop</title>
		<link>http://scott.yang.id.au/2006/06/mac-switchers-to-linux/</link>
		<comments>http://scott.yang.id.au/2006/06/mac-switchers-to-linux/#comments</comments>
		<pubDate>Fri, 30 Jun 2006 01:39:53 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/06/mac-switchers-to-linux/</guid>
		<description><![CDATA[Cory Doctorow of Boing Boing, a long time Mac user, is talking about switching to Ubuntu Linux for desktop, following the steps of Mark Pilgrim, who has also recently migrated to Ubuntu and suggested Linux equivalents to Mac essentials. And as Jason Kottke has said, &#8220;If I were Apple, I&#8217;d be worried about this&#8230; Nerds [...]]]></description>
			<content:encoded><![CDATA[<p>Cory Doctorow of <a href="http://www.boingboing.net/">Boing Boing</a>, a long time Mac user, is <a href="http://www.boingboing.net/2006/06/29/mark_pilgrims_list_o.html">talking about switching to Ubuntu Linux for desktop</a>, following the steps of <a href="http://www.diveintomark.org/">Mark Pilgrim</a>, who has also recently <a href="http://diveintomark.org/archives/2006/05/30/bye-apple">migrated to Ubuntu</a> and suggested <a href="http://diveintomark.org/archives/2006/06/26/essentials-2006">Linux equivalents to Mac essentials</a>.</p>
<p>And as Jason Kottke has <a href="http://www.kottke.org/remainder/06/06/11361.html">said</a>, &#8220;<em>If I were Apple, I&#8217;d be worried about this&#8230; Nerds are a small demographic, but they can also be the canary in the coal mine with stuff like this.</em>&#8220;</p>
<p>Indeed, there&#8217;s a lot of &#8220;nerd-factor&#8221; in there when Job resurrected the rotten Apple with Mac OS X, which has an open source Darwin kernel inside plus many BSD userland applications. Many have switched because their geek friends said it is &#8220;cool&#8221; &#8212; and indeed it was, way ahead of its time, much better than Windows and Linux desktop can offer back then.</p>
<p>I have actually not had much experience with desktop on Linux for the last 5 years. A colleague of mine is using the latest KDE 3.x here on a Solaris box, but somehow it just does not feel as smooth as Mac OS X with all its Aqua glory. In some sense even the classic Windows desktop feels more consistent and usable. Maybe I just need to spend sometime re-evaluate the current offerings.</p>
<p>But would Mark and Cory&#8217;s switches impact Apple and its Mac sales? Possible, but you are probably only going to see the impact in a few years time, when its hardcore evangelists die out and switch camps. To an average computer user, my wife Vivian for example, even she is frustrated with Mac OS X sometimes. And I cannot see how she can cope with working on a Linux desktop. Usability and accessibility aside (which Mac OS X might be much superior but I might be very wrong), at least when spinning beach-ball appears she knows to use &#8220;Force Kill&#8221; to get her out of the way. What do you do on a Linux &#8220;desktop&#8221;, and without littering your home directories with core files?</p>
<p>Again I might be wrong. Do educate me with the latest happenings around Linux desktops.</p>
<p>When more geeks, or should I say &#8220;open source minded&#8221; people, moved over to Linux, we&#8217;ll hopefully see it picking up what Apple/Mac cannot deliver. Not sure whether it is a good analogy, but can I say Movable Type verses WordPress? Sure, Movable Type is &#8220;open enough&#8221; for some people (sure, you can see the source code), and the code quality of WordPress wasn&#8217;t really up to scratch 2 years ago. But then we see a big migration from MT to WP &#8212; I won&#8217;t say WP 1.2 back then was functionally superior, but at least it is free, and light enough to hack on. That migration eventually hastened WP&#8217;s development, making it a better product, and those who switched became the evangelists themselves (year, power of geeks), which bringing in more users &#8212; many &#8220;average Joe Bloggs&#8221; who know nothing about programming.</p>
<p>Operating system might be something else &#8212; it is a platform people work on, and you&#8217;ll get much more resistance for people to switch OS than blogging platforms. But one thing does not change &#8212; geeks are pioneers and others follow. That happened when they switched from Windows to Linux. Now with Mark and Cory, two former Mac evangelists leading the way, we&#8217;ll see whether it happens this time.</p>
<p><b>Update</b>: <a href="http://radar.oreilly.com/archives/2006/06/ubuntu_linux_a_threat_to_mac_o.html">O&#8217;Reilly Radar is also reporting nerds switching from Mac to Ubuntu</a>. Looks like Ubuntu is really on some kind of back burner, and the search engine stats show that some people might make Ubuntu inter-exchangable to Linux, like Red Hat once was 5 years ago (remember people saying that they have Linux 5.1 installed?)</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/06/mac-switchers-to-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>No Linux on Lenovo</title>
		<link>http://scott.yang.id.au/2006/06/no-linux-on-lenovo/</link>
		<comments>http://scott.yang.id.au/2006/06/no-linux-on-lenovo/#comments</comments>
		<pubDate>Sun, 04 Jun 2006 11:38:01 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/06/no-linux-on-lenovo/</guid>
		<description><![CDATA[Via /., Lenovo desktops and notebooks are now Windows-only. What?! Linux loves to run on IBM ThinkPads because the Big Blue is actively advocating it, and I know a few sysadmin-type geeks swear by their ThinkPads. At least they can now buy Macbooks and run a decent x86 unix system.]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://hardware.slashdot.org/article.pl?sid=06/06/04/0415221">/.</a>, <a href="http://www.crn.com/sections/infrastructure/infrastructure.jhtml?articleId=188701277">Lenovo desktops and notebooks are now Windows-only</a>. What?! Linux <strong>loves</strong> to run on IBM ThinkPads because the Big Blue is actively advocating it, and I know a few sysadmin-type geeks swear by their ThinkPads. At least they can now buy Macbooks and run a decent x86 unix system.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/06/no-linux-on-lenovo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux Crashed on an Airbus 330</title>
		<link>http://scott.yang.id.au/2006/03/linux-crashed-on-an-airbus-330/</link>
		<comments>http://scott.yang.id.au/2006/03/linux-crashed-on-an-airbus-330/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 10:23:30 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Humour]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/03/linux-crashed-on-an-airbus-330/</guid>
		<description><![CDATA[Photo of crashed application running on Linux on an Airbus 330 in the mid air. Yeah, that was the cute Tux in the photo. However I think I will freak out if I see Linux bootstrapping inside my in-flight entertainment centre.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/milliped/116393699/">Photo of crashed application running on Linux on an Airbus 330 in the mid air</a>. Yeah, that was the cute Tux in the photo. However I think I will freak out if I see Linux bootstrapping inside my in-flight entertainment centre.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/03/linux-crashed-on-an-airbus-330/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open source web servers are still buggy</title>
		<link>http://scott.yang.id.au/2006/02/open-source-web-servers-are-still-buggy/</link>
		<comments>http://scott.yang.id.au/2006/02/open-source-web-servers-are-still-buggy/#comments</comments>
		<pubDate>Fri, 17 Feb 2006 05:07:58 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/open-source-web-servers-are-still-buggy/</guid>
		<description><![CDATA[Last night Upgraded my test box&#8217;s lighty to the latest 1.4.10 via Gentoo portage (I have lighttpd keyword masked). And then suddenly none of my CGI works. It just kept on complaining: 2006-02-16 23:24:18: (mod_cgi.c.1186) cgi died ? 2006-02-16 23:27:07: (mod_cgi.c.1186) cgi died ? 2006-02-16 23:27:14: (mod_cgi.c.1186) cgi died ? 2006-02-16 23:32:19: (mod_cgi.c.1186) cgi died [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Last night</strong></p>
<p>Upgraded my test box&#8217;s <a href="http://www.lighttpd.net/">lighty</a> to the latest <a href="http://trac.lighttpd.net/trac/wiki/Release-1.4.10">1.4.10</a> via Gentoo portage (I have lighttpd keyword masked). And then suddenly none of my CGI works. It just kept on complaining:</p>
<pre class="code">
2006-02-16 23:24:18: (mod_cgi.c.1186) cgi died ?
2006-02-16 23:27:07: (mod_cgi.c.1186) cgi died ?
2006-02-16 23:27:14: (mod_cgi.c.1186) cgi died ?
2006-02-16 23:32:19: (mod_cgi.c.1186) cgi died ?
</pre>
<p><img src="http://scott.yang.id.au/file/images/lighttpd.png" alt="Lighttpd" class="floatyl"/> I couldn&#8217;t work out why &#8212; 1.4.10 was supposed to have CGI working again (after it is broken in 1.4.9), and I don&#8217;t even have SCGI module loaded. So instead of doing some coding, I played around with various configuration for an hour, gave up, and re-emerged 1.4.8 which was my last known-working version. CGI is happy again.</p>
<p>(<b>Update</b>: Another way to get 1.4.10 working is by starting mod_fastcgi <em>before</em> mod_cgi.)</p>
<p>What a waste of time&#8230;</p>
<p><strong>This morning</strong></p>
<p>Upgraded our work&#8217;s public webserver this morning (something that I should have done yonks ago) from <a href="http://httpd.apache.org/">Apache</a> 2.0.54 to 2.0.55 and because Gentoo changed the Apache configuration path somewhere in the middle, I ended up having to upgrade other things like PHP (which then triggers other upgrades). Lucky with Gentoo you can compile the upgrade into binary packages first without emerging, so that you can do a quick incompatible upgrade. Our public site came back up in under a minute. Not bad.</p>
<p>But that&#8217;s the end of my good luck.</p>
<p><img src="http://scott.yang.id.au/file/images/apache.png" alt="Apache" class="floaty"/> Suddenly none of our CGIs are working! All there is in the error_log is &#8220;Premature end of script headers&#8221; with nothing else written to stderr! Putting debugging statements into our CGI shows that they have never been executed, and then I found out that suexec wrapper is spilling dummies.</p>
<p>It appears that suexec compiled by Gentoo has minimum UID set to 1000, but our server was set up in the good old Mandrake days when UID starts from 500 &#8212; no wonder it kept on complaining. Commenting out loading the suexec_module doesn&#8217;t seem to work so I ended up having to re-emerge Apache again with minimum UID adjusted. Aargh!</p>
<p>Then there are reports saying upload files via Apache reverse proxy to our application server has stopped working. Putting in tcpdump shows that HTTP header got all jumbled up with the actual content, and I couldn&#8217;t figure out what&#8217;s going on. Search on Google reveals this <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37145">mod_proxy + mod_ssl</a> bug. That basically means:</p>
<p><strong>You cannot use Apache 2.0.55 as reverse proxy + SSL handler for your application server!</strong></p>
<p>I thought this usage pattern would be very common but apparently it wasn&#8217;t discovered when 2.0.55 was released. So again I re-emerged 2.0.54 and everyone is happy again.</p>
<p>What a waste of time&#8230; Actually it took me whole morning getting this issue resolved, where initially I thought I could upgrade the web server in 5 minutes.</p>
<p><strong>Verdict</strong></p>
<p>Open source web servers &#8212; more eyeballs looking through the code doesn&#8217;t mean that it is bug free. Upgrading without testing can mean disaster and waste of time &#8212; don&#8217;t assume that everything is well tested when a new version is released.</p>
<p>But I&#8217;ll still pick apache or lighty if I need to choose between them and IIS and ISA.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/02/open-source-web-servers-are-still-buggy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuning Apache&#8217;s Keep Alive</title>
		<link>http://scott.yang.id.au/2006/02/apache-keep-alive/</link>
		<comments>http://scott.yang.id.au/2006/02/apache-keep-alive/#comments</comments>
		<pubDate>Thu, 16 Feb 2006 06:08:18 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/turning-apaches-keep-alive/</guid>
		<description><![CDATA[Discussion on how Apache prefork MPM handles HTTP keep alive can kill a site under Slashdot effect. That&#8217;s the price to pay when each httpd process is stuck handling one pending connection, and that&#8217;s why I am keen to migrate my server to lighty + PHP on FastCGI.]]></description>
			<content:encoded><![CDATA[<p><a href="http://virtualthreads.blogspot.com/2006/01/tuning-apache-part-1.html">Discussion on how Apache prefork MPM handles HTTP keep alive can kill a site under Slashdot effect</a>. That&#8217;s the price to pay when each httpd process is stuck handling one pending connection, and that&#8217;s why I am keen to migrate my server to <a href="http://www.lighttpd.net/">lighty</a> + PHP on FastCGI.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/02/apache-keep-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Threatened by Linux</title>
		<link>http://scott.yang.id.au/2005/12/apple-threatened-by-linux/</link>
		<comments>http://scott.yang.id.au/2005/12/apple-threatened-by-linux/#comments</comments>
		<pubDate>Sun, 04 Dec 2005 10:24:54 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/12/apple-threatened-by-linux/</guid>
		<description><![CDATA[Via MacSlash, Apple&#8217;s recent SEC filing stated that they felt being challenge by Linux and pirates. Not that the Penguins are pirates, of course, but it suggests that without Linux, Apple would be in a better position today. So what will happen next? Mac moved onto x86 platform? Almost done. Apple teams up with Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://macslash.org/article.pl?sid=05/12/02/1443239">MacSlash</a>, <a href="http://networks.silicon.com/mobile/0,39024665,39154778,00.htm">Apple&#8217;s recent SEC filing stated that they felt being challenge by Linux and pirates</a>. Not that the Penguins are pirates, of course, but it suggests that without Linux, Apple would be in a better position today. So what will happen next? Mac moved onto x86 platform? Almost done. Apple teams up with Microsoft battling evil Penguins? Possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/12/apple-threatened-by-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

