<?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>Denie&#039;s Tech Blog &#187; RPM</title>
	<atom:link href="http://blog.nataprawira.com/tech/category/rpm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nataprawira.com/tech</link>
	<description>Information Technology for Life!</description>
	<lastBuildDate>Mon, 19 Jul 2010 09:20:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install FFmpeg in Linux (RPM Version)</title>
		<link>http://blog.nataprawira.com/tech/2009/02/27/install-ffmpeg-in-linux-rpm-version/</link>
		<comments>http://blog.nataprawira.com/tech/2009/02/27/install-ffmpeg-in-linux-rpm-version/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 10:57:06 +0000</pubDate>
		<dc:creator>Denie</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DAG]]></category>
		<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[FFMPEG-PHP]]></category>
		<category><![CDATA[FlvTool2]]></category>
		<category><![CDATA[GLIBC]]></category>
		<category><![CDATA[Mencoder]]></category>
		<category><![CDATA[Mplayer]]></category>
		<category><![CDATA[Repo]]></category>
		<category><![CDATA[RPM Installation]]></category>
		<category><![CDATA[RPMFORGE]]></category>
		<category><![CDATA[RUBY]]></category>
		<category><![CDATA[Yum]]></category>

		<guid isPermaLink="false">http://blog.nataprawira.com/tech/?p=42</guid>
		<description><![CDATA[

How to Install FFmpeg in Linux ~The Easy Way~
Original Post
FFmpeg is so important    if you are planning to run a video website with streaming with conversion of    video files to different video formats. This tutorial is intended for Centos/Redhat    versions of Linux where any novice user [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.nataprawira.com%2Ftech%2F2009%2F02%2F27%2Finstall-ffmpeg-in-linux-rpm-version%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.nataprawira.com%2Ftech%2F2009%2F02%2F27%2Finstall-ffmpeg-in-linux-rpm-version%2F" height="61" width="51" /></a></div>
<!-- ALL ADSENSE ADS DISABLED -->
<h1>How to Install FFmpeg in Linux ~The Easy Way~</h1>
<p><strong><a title="http://www.mysql-apache-php.com/ffmpeg-install.htm" href="http://www.mysql-apache-php.com/ffmpeg-install.htm" target="_blank"><em>Original Post</em></a></strong></p>
<p><a href="http://ffmpeg.mplayerhq.hu/" target="_blank">FFmpeg</a> is so important    if you are planning to run a video website with streaming with conversion of    video files to different video formats. This tutorial is intended for Centos/Redhat    versions of Linux where any novice user can install ffmpeg without compiling    the source which is a more traditional way of installing the FFmpeg software    on linux servers. In this tutorial i will show you the easy way to install ffmpeg    and ffmpeg-php (php extension) with just yum rather than compiling ffmpeg from    source files.</p>
<blockquote><p>FFmpeg (<a href="http://ffmpeg.mplayerhq.hu/" target="_blank">http://ffmpeg.mplayerhq.hu</a>)<br />
Mplayer + Mencoder (<a href="http://www.mplayerhq.hu/design7/dload.html" target="_blank">http://www.mplayerhq.hu/design7/dload.html</a>)<br />
Flv2tool (<a href="http://inlet-media.de/flvtool2" target="_blank">http://inlet-media.de/flvtool2</a>)<br />
Libogg + Libvorbis (<a href="http://www.xiph.org/downloads" target="_blank">http://www.xiph.org/downloads</a>)<br />
LAME MP3 Encoder (<a href="http://lame.sourceforge.net/" target="_blank">http://lame.sourceforge.net</a>)<br />
FlowPlayer &#8211; A Free Flash Video Player &#8211; <a href="http://flowplayer.org/" target="_blank">http://flowplayer.org/</a></p></blockquote>
<h1>Installing FFMpeg</h1>
<p><span id="more-42"></span></p>
<blockquote><p><strong>yum install ffmpeg ffmpeg-devel</strong></p></blockquote>
<p>If you get <strong>package not found, </strong>then you will need to add few    lines in the yum repository for dag packages installation. Create a file named    <strong>dag.repo</strong> in <strong>/etc/yum.repos.d</strong> with the following    contents on it</p>
<blockquote><p><strong>[dag]<br />
name=Dag RPM Repository for Red Hat Enterprise Linux<br />
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag<br />
gpgcheck=1<br />
enabled=1</strong></p></blockquote>
<p>then</p>
<blockquote><p><strong>yum install ffmpeg ffmpeg-devel</strong></p></blockquote>
<p>If everything is fine, then the installation should proceed smoothly. If not    you will get something like warning GPG public key missing .</p>
<h2>Common Errors</h2>
<p><strong>To fix rpmforge GPG key warning: </strong></p>
<blockquote><p><strong>rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</strong></p></blockquote>
<p>For more information refer to <a href="http://dag.wieers.com/rpm/FAQ.php#B4" target="_blank"><strong>this    faq </strong></a>depending on Centos version</p>
<p><strong>Missing Dependency Error:</strong></p>
<p>If you get missing dependency error like shown below, in the middle of ffmpeg    installation</p>
<blockquote><p><strong><span class="box">Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed    by package ffmpeg<br />
Error: Missing Dependency: libtheora.so.0(libtheora.so.1.0) is needed by package    ffmpeg<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package ffmpeg<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package a52dec<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package gsm<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package x264<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package xvidcore<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package lame<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package a52dec<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package faad2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package x264<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package lame<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package xvidcore<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package faac<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package faad2<br />
Error: Missing Dependency: libgif.so.4 is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package faac<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package gsm<br />
Error: Missing Dependency: libpng12.so.0(PNG12_0) is needed by package imlib2<br />
Error: Missing Dependency: rtld(GNU_HASH) is needed by package libmp4v2<br />
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package libmp4v2</span></strong></p></blockquote>
<p>then most commonly you have GLIB 2.3 installed instead of GLIB 2.4 version.    To check the current GLIB version installed on your server. just use:</p>
<blockquote><p><strong>yum list glib*</strong></p></blockquote>
<p>and it should list the latest GLIB package version.</p>
<p>The reason i was getting this error was my rpmforge packages was pointed to    centos 5 versions instead of centos 4.6.</p>
<p><strong>To fix dependency error:</strong></p>
<p>To fix this error, you might need to check your rpmforge packages compatible    to the release of your existing CentOS version.<br />
Check the file <strong>/etc/yum.repos.d/rpmforge.repo </strong>and it should    look like for Centos 4.6(Final). If you have lines like <strong>http://apt.sw.be/redhat/<span style="color: #0000ff">el5</span>/en/mirrors-rpmforge </strong> you might need to make changes to the <strong>rpmforge.repos</strong> like shown below</p>
<blockquote><p><strong>Note:</strong> Backup the original<strong> rpmforge.repo</strong> file    before you edit its content.</p></blockquote>
<blockquote><p><strong><span class="box">[rpmforge]<br />
name = Red Hat Enterprise $releasever &#8211; RPMforge.net &#8211; dag<br />
#baseurl = http://apt.sw.be/redhat/<span style="color: #0000ff">el4</span>/en/$basearch/dag<br />
mirrorlist = http://apt.sw.be/redhat/<span style="color: #0000ff">el4</span>/en/mirrors-rpmforge<br />
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge<br />
enabled = 1<br />
protect = 0<br />
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag<br />
gpgcheck = 1</span></strong></p></blockquote>
<p><strong>To know what linux type and version you are running </strong></p>
<blockquote><p><strong>cat /etc/redhat-release</strong></p></blockquote>
<p>Once this is done, do again:  <strong>yum install ffmpeg. </strong></p>
<p>This trick resolved the problem in my linux box running Centos 4.6 and this    is the <em>only way</em> i found to install ffmpeg using yum.</p>
<h2>To check the FFmpeg working:</h2>
<p>Finally, check the ffmpeg whether it is working or not.</p>
<blockquote><p><strong>&gt; ffmpeg<br />
&gt; ffmpeg -formats<br />
&gt; ffmpeg &#8211;help<br />
</strong>// This lists path of mpeg, its modules and other path information</p></blockquote>
<blockquote><p><strong> ffmpeg -i Input.file Output.file</strong></p></blockquote>
<h2>To check what audi/video formats are supported</h2>
<blockquote><p><strong>ffmpeg -formats &gt; ffmpeg-format.txt</strong></p></blockquote>
<p>Open the <strong>ffmpeg-formats.txt</strong> to see the ooutput</p>
<blockquote><p><strong>D means decode<br />
E means encode<br />
V means video<br />
A means audio<br />
T = Truncated</strong></p></blockquote>
<h1>Install FFMPEG-PHP Extension</h1>
<p><a href="http://ffmpeg-php.sourceforge.net/" target="_blank">FFmpeg-php</a> is a very good extension and wrapper for PHP which can pull useful information    about video through API interface. Inorder to install it you will need to download    the source file and then compile and install extension in your server. You can    download the source tarball : <a href="http://ffmpeg-php.sourceforge.net/" target="_blank">http://ffmpeg-php.sourceforge.net/</a></p>
<blockquote><p><strong>wget /path/to/this/file/ffmpeg-php-0.5.2.1.tbz2</strong></p>
<p><strong>tar -xjf ffmpeg-0.5.2.1.tbz2</strong></p>
<p><strong>phpize</strong></p>
<p><strong>./configure<br />
make<br />
make install</strong></p></blockquote>
<p><strong>Common Errors</strong></p>
<p><strong>1.</strong> If you get <strong>command not found error</strong> for    phpize, then you will need to do <strong>yum install php-devel</strong></p>
<p><strong>2.</strong> If you get error like <strong>&#8220;ffmpeg headers not    found&#8221;</strong> while configuring the source.</p>
<blockquote><p><strong>configure: error: ffmpeg headers not found. Make sure ffmpeg is    compiled as shared libraries using the &#8211;enable-shared option</strong></p></blockquote>
<p>then it means you have not installed<strong> ffmpeg-devel</strong> packages.</p>
<p><strong>To Fix:</strong> Just install <strong>ffmpeg-devel</strong> using</p>
<blockquote><p><strong>yum install ffmpeg-devel</strong></p></blockquote>
<p><strong>3. </strong>If you get an error like shared libraries not found problem    and the program halts in the middle, then you must specify the ffmpeg installed    path explicitly to the ./configure.</p>
<blockquote><p><strong>configure: error: ffmpeg shared libraries not found. Make sure    ffmpeg is compiled as shared libraries using the &#8211;enable-shared option</strong></p></blockquote>
<p><strong>To Fix:</strong></p>
<p>1. First find out the ffmpeg path with <strong>ffmpeg &#8211;help</strong> command.    The prefix default path should be like <strong>/usr/local/cpffmpeg</strong><br />
2. Configure the FFmpeg-php with &#8211;with-ffmpeg option</p>
<blockquote><p><strong>./configure &#8211;with-ffmpeg=/usr/local/cpffmpeg</strong></p></blockquote>
<p>That should resolve the problem!</p>
<h2>Editing PHP.INI</h2>
<p>Once you have done that without any problems then you will see the php extension    file <strong>/usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so</strong> and you will need mention that extension in php.ini file</p>
<blockquote><p><strong>nano /usr/local/lib/php.ini</strong></p></blockquote>
<p>Put the below two lines at the end of the <strong>php.ini</strong> file</p>
<blockquote><p><strong>[ffmpeg]<br />
extension=ffmpeg.so</strong></p></blockquote>
<p>Then restart the server <strong>service httpd restart</strong></p>
<p>To check whether <strong>ffmpeg enabled with php</strong>, point your browser    to <strong>test.php</strong> file. It should show the confirmation of installed    ffmpeg php extension</p>
<blockquote><p><strong>// #test.php</strong></p>
<p><strong> &lt;?php</strong></p>
<p><strong>phpinfo()</strong></p>
<p><strong>?&gt;</strong></p></blockquote>
<p>If any case the ffmpeg does not show in the phpinfo() test make sure that php.ini    path to ffmpeg.so is correct. Still the problem occurs, the reason could be    you might be using older versions of ffmpeg-php which is buggy. Just download    the latest version of ffmpeg-php source then compile it.</p>
<h1>Installing Mplayer + Mencoder</h1>
<p>Just issue the following yum commands to install the rest of the packages.</p>
<blockquote><p><strong>yum install mplayer mencoder</strong></p></blockquote>
<h1>Installing FlvTool2</h1>
<p>Flvtool2 is a flash video file manipulation tool. It can calculate metadata    and can cut and edit cue points for flv files.</p>
<p>If you are on Centos 5 try <strong>yum install flvtool2</strong> with dag    repository and if you get package not found you will need to manually download    and compile the flvtool2. You can download latest version of flvtool2 here:    <a href="http://rubyforge.org/projects/flvtool2/" target="_blank">http://rubyforge.org/projects/flvtool2/</a></p>
<blockquote><p><strong>wget &lt;url-link&gt;</strong></p>
<p><strong>ruby setup.rb config<br />
ruby setup.rb setup<br />
sudo ruby setup.rb install</strong></p></blockquote>
<p>If you get <strong>command not found</strong> error, it probably means that    you dont have ruby installed.</p>
<blockquote><p><strong>yum install ruby</strong></p></blockquote>
<p>Thats it! Once ffmpeg works fine with php extension, download a sample video,    convert to .flv format in the command line and plug it to <strong><a href="http://flowplayer.org/" target="_blank">flowplayer</a></strong> to see it work on your web browser. Try also to download the video file offline    and see whether the converted flv file works well with both audio and video.</p>
<h2>Useful Links</h2>
<ul>
<li>FFmpeg (<a href="http://ffmpeg.mplayerhq.hu/" target="_blank">http://ffmpeg.mplayerhq.hu</a>)</li>
<li>Mplayer + Mencoder (<a href="http://www.mplayerhq.hu/design7/dload.html" target="_blank">http://www.mplayerhq.hu/design7/dload.html</a>)</li>
<li>Flv2tool (<a href="http://inlet-media.de/flvtool2" target="_blank">http://inlet-media.de/flvtool2</a>)</li>
<li>Libogg + Libvorbis (<a href="http://www.xiph.org/downloads" target="_blank">http://www.xiph.org/downloads</a>)</li>
<li>LAME MP3 Encoder (<a href="http://lame.sourceforge.net/" target="_blank">http://lame.sourceforge.net</a>)</li>
<li>FlowPlayer &#8211; A Free Flash Video Player &#8211; <a href="http://flowplayer.org/" target="_blank">http://flowplayer.org/</a></li>
<li>Install FFmpeg from Compiling Source (<a href="http://rshagrawal.blogspot.com/2007/12/howt-o-for-installing-ffmpeg.html" target="_blank">Tutorial    Link</a>)</li>
<li>Nice FFmpeg Installation Tutorial (<a href="http://forums.theplanet.com/index.php?showtopic=64541" target="_blank">click    here</a>)</li>
<li>Important Audio Codecs (<a href="http://www.mplayerhq.hu/DOCS/HTML/en/audio-codecs.html" target="_blank">http://www.mplayerhq.hu/DOCS/HTML/en/audio-codecs.html</a>)</li>
<li>Common Errors &amp; Fixes while Installing FFmpeg (<a href="http://www.webmasterpals.com/forumdisplay.php?f=6" target="_blank">click    here</a>)</li>
</ul>
<p><!-- Kontera ContentLink(TM);--></p>
<p><!-- Kontera ContentLink(TM) --></p>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.nataprawira.com/tech/2009/02/27/install-ffmpeg-in-linux-rpm-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RPM failed to start</title>
		<link>http://blog.nataprawira.com/tech/2009/02/20/rpm-failed-to-start/</link>
		<comments>http://blog.nataprawira.com/tech/2009/02/20/rpm-failed-to-start/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 08:49:34 +0000</pubDate>
		<dc:creator>Denie</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Failed]]></category>

		<guid isPermaLink="false">http://blog.nataprawira.com/tech/?p=37</guid>
		<description><![CDATA[

When you&#8217;re running REDHAT/CENTOS platform for your server, sometimes the RPM wont run normally or become stuck. This caused by the RPM database not properly builded or been corrupted.
Errors would be like : 
rpmdb: Program version 4.3 doesn&#8217;t match environment version
error: db4 error(-30974) from dbenv-&#62;open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.nataprawira.com%2Ftech%2F2009%2F02%2F20%2Frpm-failed-to-start%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.nataprawira.com%2Ftech%2F2009%2F02%2F20%2Frpm-failed-to-start%2F" height="61" width="51" /></a></div>
<!-- ALL ADSENSE ADS DISABLED -->
<p>When you&#8217;re running REDHAT/CENTOS platform for your server, sometimes the RPM wont run normally or become stuck. This caused by the RPM database not properly builded or been corrupted.</p>
<p>Errors would be like :<strong> </strong></p>
<blockquote><p><strong>rpmdb: Program version 4.3 doesn&#8217;t match environment version<br />
error: db4 error(-30974) from dbenv-&gt;open: DB_VERSION_MISMATCH: Database environment version mismatch<br />
error: cannot open Packages index using db3 &#8211; (-30974)<br />
error: cannot open Packages database in /var/lib/rpm</strong></p>
<p><strong>rpmdb: Program version 4.3 doesn&#8217;t match environment version<br />
error: db4 error(-30974) from dbenv-&gt;open: DB_VERSION_MISMATCH: Database environment version mismatch<br />
error: cannot open Packages database in /var/lib/rpm</strong></p></blockquote>
<p>So, to solve those issues,<br />
you can run these commands from <strong>ROOT </strong>access:</p>
<blockquote><p><strong>rm -f /var/lib/rpm/__db*<br />
rpm -vv &#8211;rebuilddb</strong></p></blockquote>
<p><em>The &#8216;-vv&#8217; parameter on rpm, will STDOUT.</em></p>
<p>To run it as background process, do:</p>
<blockquote><p><strong>rpm &#8211;rebuilddb &amp;</strong></p></blockquote>
<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.nataprawira.com/tech/2009/02/20/rpm-failed-to-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
