<?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; Video</title>
	<atom:link href="http://scott.yang.id.au/tag/video/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>Three Videos Every Church Website Should Have</title>
		<link>http://scott.yang.id.au/2006/12/three-videos-every-church-website-should-have/</link>
		<comments>http://scott.yang.id.au/2006/12/three-videos-every-church-website-should-have/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 13:12:20 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Church]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/12/three-videos-every-church-website-should-have/</guid>
		<description><![CDATA[Via Simon, three videos every church website should have. It just makes so much sense. Which one do you prefer, if you are trying to decide whether you want to visit a church, if you are new to the region? Pages after pages of text trying to explain who we are, theological brief, what we [...]]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://simon.job.id.au/elsewhere/493/three-videos-every-church-website-should-have">Simon</a>, <a href="http://blog.ourchurch.com/2006/12/12/three-videos-every-church-website-should-have/">three videos every church website should have</a>. It just makes so much sense. Which one do you prefer, if you are trying to decide whether you want to visit a church, if you are new to the region? Pages after pages of text trying to explain who we are, theological brief, what we usually do during the week, etc. Or 3 quick 1 minute video showing:</p>
<ol>
<li>Pastor briefly introduce who we are and invite you to join our meetings.</li>
<li>A glimpse inside a typical church service/bible study fellowship.</li>
<li>One or two interviews of existing members on how their lives have been changed.</li>
</ol>
<p>And have them hosted on either YouTube, Google Video, or any web host of your choice.</p>
<p>I know which one I would prefer.</p>
<p>But I think I need to fix up our church website first. Quite a ruin there.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/12/three-videos-every-church-website-should-have/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diet Coke and Mentos in The Domino Effect</title>
		<link>http://scott.yang.id.au/2006/10/diet-coke-and-mentos-in-the-domino-effect/</link>
		<comments>http://scott.yang.id.au/2006/10/diet-coke-and-mentos-in-the-domino-effect/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 21:17:32 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/10/diet-coke-and-mentos-in-the-domino-effect/</guid>
		<description><![CDATA[Via Google Blog, The Domino Effect with lots of Diet Coke, Mentos and way too much time. Awesome video. The only annoying bit is that two guys in lab coat walking around making sure everything is smooth running.]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://googleblog.blogspot.com/2006/10/domino-effect.html">Google Blog</a>, <a href="http://video.google.com/videoplay?docid=-274981837129821058">The Domino Effect with lots of Diet Coke, Mentos and way too much time</a>. Awesome video. The only annoying bit is that two guys in lab coat walking around making sure everything is smooth running. </p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/10/diet-coke-and-mentos-in-the-domino-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>White and Nerdy</title>
		<link>http://scott.yang.id.au/2006/09/white-and-nerdy/</link>
		<comments>http://scott.yang.id.au/2006/09/white-and-nerdy/#comments</comments>
		<pubDate>Fri, 22 Sep 2006 13:44:36 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/09/white-and-nerdy/</guid>
		<description><![CDATA[YouTube: White &#38; Nerdy (Weird Al) &#8212; this new video is just funny, and even got a Wikipedia entry for it. Here&#8217;s the lyrics. Well, I gotta say I am glad that I am not white nor nerdy :) My other favourite Weird Al MTV is Saga Begins. Saw it 6 years ago, and you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com/watch?v=E6Zc9NyYH-k">YouTube: White &amp; Nerdy (Weird Al)</a> &#8212; this new video is just funny, and even got a <a href="http://en.wikipedia.org/wiki/White_and_Nerdy">Wikipedia entry for it</a>. Here&#8217;s the <a href="http://www.ph-online.net/wanlyrics.txt">lyrics</a>. Well, I gotta say I am glad that I am not white nor nerdy :) My other favourite <a href="http://www.myspace.com/weirdal">Weird Al</a> MTV is <a href="http://www.youtube.com/watch?v=Q-gi4Nt_xxg">Saga Begins</a>. Saw it 6 years ago, and you have to be a Star Wars fan to love this one. And <a href="http://www.youtube.com/watch?v=MFvA9G5vW4A">this is Vivian&#8217;s favourite</a> (completely unrelated though :)</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/09/white-and-nerdy/feed/</wfw:commentRss>
		<slash:comments>0</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>Bird Watching in Sydney CBD</title>
		<link>http://scott.yang.id.au/2006/08/bird-watching-in-sydney-cbd/</link>
		<comments>http://scott.yang.id.au/2006/08/bird-watching-in-sydney-cbd/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 07:30:44 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/08/bird-watching-in-sydney-cbd/</guid>
		<description><![CDATA[Well. Not the kind of birds with two flipping wings. In fact it has a set of propellors, weight almost 5 tons, and made loud &#8220;woo woo woo&#8221; sound when they fly passed our office building at around 2:30pm in the afternoon. They were in fact UH-60 Black Hawk helicopters, and I was fortunately enough [...]]]></description>
			<content:encoded><![CDATA[<p>Well. Not the kind of birds with two flipping wings. In fact it has a set of propellors, weight almost 5 tons, and made loud <em>&#8220;woo woo woo&#8221;</em> sound when they fly passed our office building at around 2:30pm in the afternoon.</p>
<p>They were in fact <a href="http://en.wikipedia.org/wiki/UH-60_Black_Hawk">UH-60 Black Hawk helicopters</a>, and I was fortunately enough to have a camera with me to take these footages:</p>
<div style="text-align:center">
  <object type="application/x-shockwave-flash" data="http://media.ylsy.org/video/FlowPlayer.swf" width="480" height="343" id="FlowPlayer"><param name="allowScriptAccess" value="sameDomain"/><param name="movie" value="http://media.ylsy.org/video/FlowPlayer.swf"/><param name="quality" value="high"/><param name="scale" value="noScale"/><param name="wmode" value="transparent"/><param name="flashvars" value="videoFile=blackhawk-20060816.flv&amp;autoPlay=false&amp;loop=false&amp;autoBuffering=false&amp;bufferLength=5&amp;splashImageFile=blackhawk-20060816.jpg"/></object>
</div>
<p>Looks like <a href="http://www.theaustralian.news.com.au/story/0,20867,20117461-29277,00.html">the Australian Defense Force is doing training here</a> to respond to security-related incidents. Cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/08/bird-watching-in-sydney-cbd/feed/</wfw:commentRss>
		<slash:comments>3</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>Google Video Downloader Bookmarklet 0.1</title>
		<link>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/</link>
		<comments>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/#comments</comments>
		<pubDate>Mon, 07 Nov 2005 03:12:01 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/</guid>
		<description><![CDATA[I love Google Video Search &#8212; great way to waste your evening and plenty of bandwidth. However, I hate to watch video on a Flash player embeded inside a web browser window. I also hate to download the same video again and again every time I want to watch it. So yesterday evening I hacked [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://video.google.com/">Google Video Search</a> &#8212; great way to waste your evening and plenty of bandwidth. However, I hate to watch video on a Flash player embeded inside a web browser window. I also hate to download the same video again and again every time I want to watch it.</p>
<p>So yesterday evening I hacked this Javascript, <a href="http://scott.yang.id.au/code/google-video-bookmarklet/">Google Video Downloader Bookmarklet</a>, to automatically reveal the actual URL of the Flash Video, and provide one click download to save it on my hard disk, so I can recompress them with <a href="http://www.xvid.org/">Xvid</a> to watch on my Dell Axim v50.</p>
<p>Hopefully it will be useful for others as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/11/google-video-downloader-bookmarklet-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

