<?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>HOWTO :: VoIP: Whosesale :: Calling Card :: OpenSer :: Radius :: Asterisk :: FreeSwitch :: A2Billing :: IVR :: Colo :: Colocations :: GADGETS &#187; YouTube-Like Website</title>
	<atom:link href="http://callsolutions.org/category/linuxunix-tutorials/youtube-like-website/feed/" rel="self" type="application/rss+xml" />
	<link>http://callsolutions.org</link>
	<description>You can also find CCNA :: CCNAP :: Exam, Brandump, CheatSheet, Sample Exams</description>
	<lastBuildDate>Thu, 29 Apr 2010 14:23:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing FFmpeg &amp; Dependencies For FLV Conversion</title>
		<link>http://callsolutions.org/installing-ffmpeg-dependencies-for-flv-conversion/</link>
		<comments>http://callsolutions.org/installing-ffmpeg-dependencies-for-flv-conversion/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:55:59 +0000</pubDate>
		<dc:creator>nelson</dc:creator>
				<category><![CDATA[YouTube-Like Website]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[Installing FFmpeg & Dependencies For FLV Conversion]]></category>

		<guid isPermaLink="false">http://callsolutions.org/?p=47</guid>
		<description><![CDATA[
This guide should teach you how to install all the needed dependencies for ClipShare or other flash video conversion scripts. It’s primarily focused on RHEL or CentOS installs for the dependencies of these packages. The links in this guide are fresh as of 08/04/2008. Here is what this guide will help you install:

 FFmpeg (http://ffmpeg.mplayerhq.hu)
 [...]]]></description>
			<content:encoded><![CDATA[<div class="entry">
<div id="post-8" class="post"><abbr title="2008-06-29T23:57:09-0500" /><!-- by admin -->This guide should teach you how to install all the needed dependencies for ClipShare or other flash video conversion scripts. It’s primarily focused on RHEL or CentOS installs for the dependencies of these packages. The links in this guide are fresh as of 08/04/2008. Here is what this guide will help you install:</p>
<ul>
<li> FFmpeg (<a class="external free" title="http://ffmpeg.mplayerhq.hu" rel="nofollow" href="http://ffmpeg.mplayerhq.hu/">http://ffmpeg.mplayerhq.hu</a>)</li>
<li> FFmpeg-PHP (<a class="external free" title="http://ffmpeg-php.sourceforge.net" rel="nofollow" href="http://ffmpeg-php.sourceforge.net/">http://ffmpeg-php.sourceforge.net</a>)</li>
<li> MPlayer + Mencoder (<a class="external free" title="http://www.mplayerhq.hu/design7/dload.html" rel="nofollow" href="http://www.mplayerhq.hu/design7/dload.html">http://www.mplayerhq.hu/design7/dload.html</a>)</li>
<li> FLV2Tool (<a class="external free" title="http://inlet-media.de/flvtool2" rel="nofollow" href="http://inlet-media.de/flvtool2">http://inlet-media.de/flvtool2</a>)</li>
<li> Libogg (<a class="external free" title="http://www.xiph.org/downloads" rel="nofollow" href="http://www.xiph.org/downloads">http://www.xiph.org/downloads</a>)</li>
<li> Libvorbis (<a class="external free" title="http://www.xiph.org/downloads" rel="nofollow" href="http://www.xiph.org/downloads">http://www.xiph.org/downloads</a>)</li>
<li> LAME MP3 Encoder (<a class="external free" title="http://lame.sourceforge.net" rel="nofollow" href="http://lame.sourceforge.net/">http://lame.sourceforge.net</a>)</li>
</ul>
<p>It assumes you already have Apache and PHP5 installed as those are required dependencies as well. There will also be a guide up for installing PHP5.2.6 from source on CentOS/RHEL soon.</p>
<p>First install subversion and ruby via yum or up2date:</p>
<blockquote><p>yum -y install subversion ruby</p></blockquote>
<p>Now we need to install MPlayer &amp; FFmpeg sources from SVN:</p>
<blockquote><p>cd ~<br />
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg<br />
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer</p></blockquote>
<p>Now we need some codecs:</p>
<blockquote><p>wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2<br />
tar xvjpf essential-20071007.tar.bz2<br />
cd essential-20071007<br />
mkdir /usr/local/lib/codecs<br />
mv * /usr/local/lib/codecs/<br />
chmod -R 755 /usr/local/lib/codecs/<br />
cd ~</p></blockquote>
<p>Next we will install LAME MP3 encoder:</p>
<blockquote><p>wget http://internap.dl.sourceforge.net/sourceforge/lame/lame-398.tar.gz<br />
tar xvzpf lame-398.tar.gz<br />
cd lame-398<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>Now we install Libogg:</p>
<blockquote><p>wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz<br />
tar xvzpf libogg-1.1.3.tar.gz<br />
cd libogg-1.1.3<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>We need to make sure the correct lib directories are setup in ldconfig. Edit the <strong>/etc/ld.so.conf</strong> file and add the following lines:</p>
<blockquote><p>/usr/lib<br />
/usr/local/lib</p></blockquote>
<p>Now save and run the following command:</p>
<blockquote><p>ldconfig</p></blockquote>
<p>To install libvorbis we will run:</p>
<blockquote><p>wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz<br />
tar xvzpf libvorbis-1.2.0.tar.gz<br />
cd libvorbis-1.2.0<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>Now we will install FLVTool2:</p>
<blockquote><p>wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz<br />
tar xvzpf flvtool2-1.0.6.tgz<br />
cd flvtool2-1.0.6<br />
ruby setup.rb config<br />
ruby setup.rb setup<br />
ruby setup.rb install<br />
cd ~</p></blockquote>
<p>Next we should build MPlayer &amp; MEncoder and it will take a while unless you have a nice dual or quad core machine. Note that I’ve seen the SVN version of these packages break before, so you can always download the source code from their site (a stable copy) if it fails on make:</p>
<blockquote><p>cd mplayer<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>We will now build FFmpeg:</p>
<blockquote><p>mkdir /usr/local/src/tmp<br />
chmod 777 /usr/local/src/tmp<br />
export TMPDIR=/usr/local/src/tmp<br />
cd ffmpeg<br />
./configure &#8211;prefix=/usr &#8211;enable-libmp3lame &#8211;enable-libvorbis &#8211;disable-mmx &#8211;enable-shared<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>Symlink some libraries if needed (ignore file exists errors):</p>
<blockquote><p>ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50<br />
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51<br />
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49<br />
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0<br />
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51</p></blockquote>
<p>Now build FFmpeg-PHP:</p>
<blockquote><p>wget http://voxel.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2<br />
tar xvjpf ffmpeg-php-0.5.3.1.tbz2<br />
cd ffmpeg-php-0.5.3.1<br />
phpize<br />
./configure &#8211;prefix=/usr<br />
make<br />
make install<br />
cd ~</p></blockquote>
<p>Now you need to copy the ffmpeg.so file that was created from it’s location (from the build) to /usr/local/lib/php/extensions/, it should look something like:</p>
<blockquote><p>cp /usr/local/lib/php/extensions/no-debug-non-zts-????????????/ffmpeg.so /usr/local/lib/php/extensions/</p></blockquote>
<p>Modify your php.ini. Try <strong>/etc/php.ini</strong> or <strong>/usr/lib/php.ini</strong> or <strong>/usr/local/Zend/etc/php.ini</strong> as they are common locations, you can do <strong>php -i | grep -i</strong> ini to find the proper location. Change the extension_dir value as seen below and add the extension as seen below:</p>
<blockquote><p>extension_dir = “/usr/local/lib/php/extensions/”<br />
extension=ffmpeg.so</p></blockquote>
<p>Now save and restart apache and test php for ffmpeg on both apache via phpinfo() and from shell:</p>
<blockquote><p>service httpd stop<br />
killall -9 httpd<br />
service httpd start<br />
php -i | grep -i ffmpeg</p></blockquote>
<p>Let me know via comments if you find some bugs or better ways to do things!</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://callsolutions.org/installing-ffmpeg-dependencies-for-flv-conversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
