<?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>Night Blue Fruit Development Blog &#187; Widgets</title>
	<atom:link href="http://www.nightbluefruit.com/blog/category/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nightbluefruit.com/blog</link>
	<description>Sharing what we learn</description>
	<lastBuildDate>Thu, 17 Jun 2010 15:58:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building a Video Library with FFMPEG</title>
		<link>http://www.nightbluefruit.com/blog/2010/01/building-a-video-library-with-ffmpeg-and-jwplayer/</link>
		<comments>http://www.nightbluefruit.com/blog/2010/01/building-a-video-library-with-ffmpeg-and-jwplayer/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:39:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.nightbluefruit.com/blog/?p=61</guid>
		<description><![CDATA[
The video above is imported from http://www.centerforclinicalexcellence.com, for whom I&#8217;ve recently constructed a Buddypress Video Library using FFMPEG and the JW Player.
The owners of the site had originally wanted to use a third party like Vimeo or Twistage for this solution, but I persuaded them that they&#8217;d achieve a lot more flexibility and functionality if [...]]]></description>
			<content:encoded><![CDATA[<p><embed src="http://centerforclinicalexcellence.com/mplayer/player-viral.swf" width="320" height="264" allowscriptaccess="always" allowfullscreen="true" flashvars="file=http://centerforclinicalexcellence.com/video/1/pre-1-1u69o.flv&#038;backcolor=0xFFFFFF&#038;frontcolor=0xF7740A&#038;screencolor=0x000000&#038;image=http://centerforclinicalexcellence.com/video/1/1-1u69o-thumb.png&#038;autostart=false&#038;logo=http://centerforclinicalexcellence.com/images/pre-playermark.png&#038;logo.hide=false&#038;logo.link=http://centerforclinicalexcellence.com&#038;plugins=fbit-1,tweetit-1&#038;dock=true"/></p>
<p style="text-align: left;">The video above is imported from http://www.centerforclinicalexcellence.com, for whom I&#8217;ve recently constructed a Buddypress Video Library using <a href="http://ffmpeg.org/" target="_blank">FFMPEG</a> and the <a href="https://www.longtailvideo.com/" target="_blank">JW Player</a>.</p>
<p style="text-align: left;">The owners of the site had originally wanted to use a third party like <a href="http://www.vimeo.com" target="_blank">Vimeo</a> or <a href="http://www.twistage.com" target="_blank">Twistage</a> for this solution, but I persuaded them that they&#8217;d achieve a lot more flexibility and functionality if they went with a bespoke solution.</p>
<p style="text-align: left;">This would allow them to integrate seamlessly with their Buddypress User Database, which was not something that was going to happen very easily with a third party API.</p>
<p style="text-align: left;">I&#8217;m pretty happy with the finished product. Users can upload video, rate videos, comment on videos, embed videos in other sites, and linkback to videos through <a href="http://www.facebook.com" target="_blank">Facebook</a> and <a href="http://www.twitter.com" target="_blank">Twitter</a>.</p>
<p style="text-align: left;">FFMPEG isn&#8217;t for the faint hearted, however. It generally doesn&#8217;t come installed on hosting platforms, and has a long list of dependencies about which it is very particular when installing.</p>
<p style="text-align: left;">Normally, you can overcome this by installing through a package manager like <a href="http://sial.org/howto/yum/" target="_blank">yum</a> on CentOS, which I have used before, but the current version of FFMPEG uses a version of libmp3lame (3.98.2, which is used for encoding audio) that contains a nasty little bug that prevents the duration of a clip being embeded in Flash encoded videos.</p>
<p style="text-align: left;">This in turn plays havoc with Flash players, who don&#8217;t know who long the video they are playing will run.</p>
<p style="text-align: left;">Unfortunately, there is no easy way in yum to specify the version of dependencies you want to use, so you have to go through all of FFMPEG&#8217;s dependencies and install them manually, just so you can install a downgraded version of libmp3lame (3.97) which doesn&#8217;t contain the bug.</p>
<p style="text-align: left;">You then need to comile FFMPEG from source.</p>
<p style="text-align: left;">This is a tricky process, but thankfully I found <a href="http://www.ezlinuxadmin.com/2009/12/install-ffmpeg-from-source/" target="_blank">this article</a> which gives a pretty good summary of what you have to do (there are one or two typos in it, but you&#8217;ll catch them as you proceed; and install lame 3.97, not 3.982 as listed). You also need to pay close attention re. the linking of libraries as described, and be sure to run ldconfig.</p>
<p style="text-align: left;">You can also leave 1 or 2 of the slightly less common codecs if they are giving your errors. The ones you really need are lame, faad, faac and vorbis.</p>
<p style="text-align: left;">JW Player by comparison is a breeze to install. The license and FB and Twitter plugins were purchased for the very reasonable sum of €77. Its a great player, and I&#8217;d recommend it to anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nightbluefruit.com/blog/2010/01/building-a-video-library-with-ffmpeg-and-jwplayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
