<?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>Sohail Riaz, Linux and Open Source Blog &#187; ffmpeg</title>
	<atom:link href="http://www.sohailriaz.com/category/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sohailriaz.com</link>
	<description>Sohail Riaz, Linux and Open Source Blog</description>
	<lastBuildDate>Sat, 14 Jan 2012 09:40:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To Create RPM Using Source RPM</title>
		<link>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/</link>
		<comments>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/#comments</comments>
		<pubDate>Sun, 24 May 2009 08:20:26 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WGET]]></category>
		<category><![CDATA[YUM]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[RPM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=99</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/"><img src=""  alt="" title="" /></a>
In this how to i will describe how to create binary rpm (installable) using source rpm i.e *.src.rpm. Source rpm is collection of source files in tar.gz, patches and spec file. Spec file defines how the source code will compile with current machine, defining depencies and generate rpm from source rpm. Usually we do this [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to create binary rpm (installable) using source rpm i.e *.src.rpm. Source rpm is collection of source files in tar.gz, patches and spec file. Spec file defines how the source code will compile with current machine, defining depencies and generate rpm from source rpm. Usually we do this when we need to have some custom changes to be made in required software.<span id="more-99"></span></p>
<h3>1) Pre-requisite</h3>
<p>First of all you should have install rpm-devel and rpm-build rpms from your distro repository. Confirm it using following command</p>
<blockquote><p>rpm -qa | grep rpm</p>
<p>rpm-4.3.3-26<br />
rpm-devel-4.3.3-26<br />
rpm-python-4.3.3-26<br />
redhat-rpm-config-8.0.32.1-4<br />
rpmdb-CentOS-4.7-0.20080805<br />
rpm-libs-4.3.3-26<br />
rpm-build-4.3.3-26</p></blockquote>
<p>If you see required rpms in the list then you are good to go with source rpm compilation, else you have to install required rpms.</p>
<blockquote><p>yum -y install rpm-build rpm-devel</p>
<p>or</p>
<p>rpm -ivh /path/rpm-build* /path/rpm-devel*</p></blockquote>
<p>The rpm-build and rpm-devel also build following directories for source rpm compilations.</p>
<p>/usr/src/redhat/{BUILD,RPMS,SOURCES,SPECS,SRPMS}</p>
<h3>2) Compiling the source</h3>
<p>Get your source rpm which you need to compile.  Here i will get the ffmpeg source rpm from http://dag.wieers.com/rpm/packages/ffmpeg/ because i need to add libamr-nb and libamr-wb support for converting 3gp clips.</p>
<blockquote><p>wget http://dag.wieers.com/rpm/packages/ffmpeg/ffmpeg-0.4.9-0.9.20070530.rf.src.rpm</p>
<p>rpm -ivh ffmpeg-0.4.9-0.9.20070530.rf.src.rpm</p></blockquote>
<p>It will install source files tar.gz, patch files in</p>
<p>/usr/src/redhat/SOURCES</p>
<p>and spec file in</p>
<p>/usr/src/redhat/SPECS</p>
<p>I have to add &#8211;with-libamrnb and &#8211;with-libamrwb in ./configure command specified in ffmpeg.spec and you can edit whatever you are going to change/edit.</p>
<p>After editing now compile the sources and generate rpm using spec file.</p>
<blockquote><p>cd /usr/src/redhat/SPECS</p>
<p>rpmbuild -bb ffmpeg.spec</p></blockquote>
<p>The above command will apply patches if any and compile the source and generate rpm under /usr/src/redhat/RPMS sub-directories regarding to your architecture i.e</p>
<p>/usr/src/redhat/RPMS/i386 for i386,i686</p>
<p>/usr/src/redhat/RPMS/x86_64 for x86_64 etc.</p>
<p>While compiling you will see the verbose output of compilation and you should see clean compilation with notifying of generating rpm at the end.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=99&amp;ts=1328437592" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-create-rpm-using-source-rpm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on CentOS 5.x</title>
		<link>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/</link>
		<comments>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:11:45 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ffmpeg]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=93</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/"><img src=""  alt="" title="" /></a>
In this how to i will describe how to install ffmpeg, mplayer, mencoder, flvtool2, ffmpeg-php with all supported codecs to convert / manipulate videos easily on CentOS 5.x. If you want to run sites like youtube e.g www.indianpad.in, www.danceindiadance.in this howto will help you to install the base for your software. There are many other [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to i will describe how to install ffmpeg, mplayer, mencoder, flvtool2, ffmpeg-php with all supported codecs to convert / manipulate videos easily on CentOS 5.x. If you want to run sites like youtube e.g www.indianpad.in, www.danceindiadance.in this howto will help you to install the base for your software. There are many other way to perform this but this works for me, so i want to share.<span id="more-93"></span></p>
<h3>1 Setting Up RPMForge Respository.</h3>
<p>RPMForge repository (http://dag.wieers.com) is the biggest rpm respository for RHEL, CentOS for all versions. To enable RPMForge respository run following command to install all necessary files for getting RPMForge repository. The following command directly install rpm from http://da.wieers.com site.</p>
<p>For i386/i686</p>
<blockquote><p>rpm -Uhv <a href="http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm">http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm</a></p></blockquote>
<p>For x86_64</p>
<blockquote><p>rpm -Uhv <a href="http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm">http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm</a></p></blockquote>
<p>This rpm will add necessary files in our repository configuration and can be viewed at <strong>/etc/yum.repos.d/rpmforge.repo</strong></p>
<h3>2 Install ffmpeg, mplayer, mencoder with all supported modules.</h3>
<p>Now we have rpmforge repository, so we will use yum to install ffmpeg, mplayer, mencoder as well as all dependent software.</p>
<blockquote><p>yum -y install ffmpeg ffmpeg-devel mplayer mencoder flvtool2</p></blockquote>
<p>This command will some time to download and install all packages depends on your internet speed.</p>
<h3>3 Install FFMPEG-PHP</h3>
<p>ffmpeg-php is an extension for <a href="http://www.php.net/">PHP</a> that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. ffmpeg-devel and php-devel is needed to compile ffmpeg-php from source code. Use following steps to install ffmpeg-php</p>
<blockquote><p>cd /usr/src<br />
wget http://garr.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2<br />
tar jxvf ffmpeg-php-0.6.0.tbz2<br />
cd ffmpeg-php-0.6.0<br />
phpize<br />
./configure<br />
make<br />
make install</p></blockquote>
<p>It will copy the ffmpeg.so module in php default module location. Now you have to edit php.ini file to enable ffmpeg-php support in it by using ffmpeg.so module.</p>
<blockquote><p>vi /etc/php.ini</p></blockquote>
<p>and append following line</p>
<blockquote><p>extension=ffmpeg.so</p></blockquote>
<p>Restart apache service to take effect of php.ini</p>
<blockquote><p>/etc/init.d/httpd restart</p></blockquote>
<p>Run following command to ffmpeg module listing in php.</p>
<blockquote><p>php -m | grep ffmpeg</p></blockquote>
<p>Have a nice streaming. <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=93&amp;ts=1328437592" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-install-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-5x/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
	</channel>
</rss>

