<?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>» DoYourself.org &#187; FFMPEG</title>
	<atom:link href="http://www.doyourself.org/category/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doyourself.org</link>
	<description>Did you know ?</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:00:02 +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>Encoding flash video for embedded web playback</title>
		<link>http://www.doyourself.org/ffmpeg/617-encoding-flash-video-for-embedded-web-playback/</link>
		<comments>http://www.doyourself.org/ffmpeg/617-encoding-flash-video-for-embedded-web-playback/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:55:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=617</guid>
		<description><![CDATA[Update: Use H.264 and AAC in mp4. It’s more portable (the file can be played in more places) and the quality is much better. See my FFmpeg x264 encoding guide. This page details how to encode flash video for embedded flash playback. You may want to resize the video but considering the inputs I was [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Update: Use H.264 and AAC in mp4. It’s more portable (the file can be  played in more places) and the quality is much better. See <a href="http://www.doyourself.org/ffmpeg/588-ffmpeg-x264-encoding-guide/">my FFmpeg x264 encoding guide</a>.</p>
<p>This page details how to encode flash video for embedded flash  playback. You may want to resize the video but considering the inputs I  was using, I didn’t.</p>
<p>Input: 320×240 15fps MJPEG + unsigned 8-bit 11024Hz mono PCM in AVI [Canon PowerShot A60]<br />
Input: 320×240 15fps MJPEG + unsigned 8-bit 7875Hz mono PCM in mov [Nikon Coolpix L3]</p>
<h1>FFmpeg</h1>
<p><code>ffmpeg -i input -ar 22050 -acodec libmp3lame -ab 96k -vcodec  flv -b 300k -g 150 -cmp 2 -subcmp 2 -mbd 2 -flags +aic+cbp+mv0+mv4+trell  outfile.flv</code></p>
<p>Thankfully there will soon be a GPL VP6 encoder available which  should allow for greatly improved open source flash video quality. And  some even better news – Adobe have added H.264 and AAC in MP4 playback  support to their Flash Player in current betas available from <a href="http://labs.adobe.com/">the Adobe labs website</a>!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/617-encoding-flash-video-for-embedded-web-playback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS.</title>
		<link>http://www.doyourself.org/ffmpeg/608-install-ffmpeg-and-x264-on-ubuntu-dapper-drake-6-06-lts/</link>
		<comments>http://www.doyourself.org/ffmpeg/608-install-ffmpeg-and-x264-on-ubuntu-dapper-drake-6-06-lts/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:47:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=608</guid>
		<description><![CDATA[Note: This guide isn&#8217;t supported anymore, but it will probably still work. 1. Make sure the Ubuntu universe and multiverse repositories are enabled. For help doing this, refer to Adding the Universe and Multiverse Repositories on the Ubuntu Wiki. 2. Uninstall x264-bin, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run [...]]]></description>
			<content:encoded><![CDATA[<p></p><blockquote><p><strong>Note:</strong> <span style="color: #ff6600;">This guide isn&#8217;t supported anymore, but it will probably still work.</span></p></blockquote>
<p><span style="font-size: medium;">1.</span> Make sure the Ubuntu universe and multiverse repositories are enabled.  For help doing this, refer to <a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096" target="_blank">Adding the Universe and Multiverse Repositories</a> on the Ubuntu Wiki.</p>
<p><span style="font-size: medium;">2.</span> Uninstall x264-bin, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264-bin libx264-dev</pre>
</div>
<p><span style="font-size: medium;">3.</span> Next, get all of the packages you will need to install ffmpeg and x264:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall texi2html libfaac-dev liblame-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev</pre>
</div>
<p><span style="font-size: medium;">4.</span> Install yasm:</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
wget http://www.tortall.net/projects/yasm/releases/yasm-1.0.1.tar.gz
tar xzvf yasm-1.0.1.tar.gz
cd yasm-1.0.1
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion "1.0.1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;">5.</span> Install x264:</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://git.videolan.org/x264.git
cd ~/x264
./configure
make
sudo checkinstall --pkgversion "1:0.cvs`date +%Y%m%d`-0.0ubuntu1" --default</pre>
</div>
<p><span style="font-size: medium;">6.</span> Install libopencore-amr.  This will allow you to decode and encode AMR audio:</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
tar xvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure -disable-shared
make
sudo checkinstall --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;">7.</span> Install libtheora to encode to Theora,  the video type usually found in OGG files. The repository libtheora is  too old, so it must be compiled. Alternatively, you could skip this step  and omit <em>&#8211;enable-libtheora</em> in step 8 if you don&#8217;t plan on encoding to Theora video:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;">8.</span> Install ffmpeg:</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ~/ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgversion "3:0.cvs`date +%Y%m%d`-5ubuntu1.2" --default
hash x264 ffmpeg</pre>
</div>
<p>That&#8217;s it!  Now head back to the <a id="__mce" href="http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/" target="_blank">FFmpeg guide</a> for usage instructions and more.</p>
<p><strong>To Revert Changes Made by This Guide</strong></p>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove build-essential subversion git-core checkinstall texi2html libfaac-dev liblam</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/608-install-ffmpeg-and-x264-on-ubuntu-dapper-drake-6-06-lts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 &amp; Ubuntu Intrepid Ibex 8.10</title>
		<link>http://www.doyourself.org/ffmpeg/604-install-ffmpeg-and-x264-on-ubuntu-jaunty-jackalope-9-04-ubuntu-intrepid-ibex-8-10/</link>
		<comments>http://www.doyourself.org/ffmpeg/604-install-ffmpeg-and-x264-on-ubuntu-jaunty-jackalope-9-04-ubuntu-intrepid-ibex-8-10/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:45:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=604</guid>
		<description><![CDATA[Get the Dependencies 1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following: Code: sudo apt-get remove ffmpeg x264 libx264-dev 2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories): Code: sudo [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><span style="font-size: medium;"><span style="color: #663300;">Get the Dependencies</span></span><br />
<span style="font-size: medium;">1.</span> Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264 libx264-dev</pre>
</div>
<p><span style="font-size: medium;">2.</span> Next, get all of the packages you will need to install FFmpeg and x264 (you may need to <a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096" target="_blank">enable the universe and multiverse repositories</a>):</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install x264</span></span><br />
<span style="font-size: medium;">3.</span> Get the most current source files from the  official x264 git repository, compile, and install. You can run  &#8220;./configure &#8211;help&#8221; to see what features you can enable/disable. If you  are behind a firewall or unable to use git, then <a href="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/" target="_blank">daily source tarballs</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libopencore-amr</span> (optional)</span><br />
<span style="font-size: medium;">4.</span> This will allow you to decode and encode AMR audio.  I recommend skipping this step and omitting <em>&#8211;enable-libopencore-amrnb &#8211;enable-libopencore-amrwb</em> from step 5 if you are not going to decode or encode AMR audio.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
tar xvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure --disable-shared
make
sudo checkinstall --fstrans=no --install=yes --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libtheora</span> (optional)</span><br />
<span style="font-size: medium;">5.</span> This is used to encode to Theora, the video  type usually found in OGG files. The repository libtheora is too old, so  it must be compiled. I recommend skipping this step and omitting <em>&#8211;enable-libtheora</em> in step 5 if you don&#8217;t plan on encoding to Theora video:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --fstrans=no --install=yes --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install FFmpeg</span></span><br />
<span style="font-size: medium;">6.</span> Get the most current source files from the  official FFmpeg svn, compile, and install. Run &#8220;./configure &#8211;help&#8221; to  see what features you can enable/disable. If you are behind a firewall  or unable to use subversion, then <a href="http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2" target="_blank">nightly FFmpeg snapshots</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --backup=no --default
hash x264 ffmpeg ffplay</pre>
</div>
<p>That&#8217;s it for installation.  You can keep the <em>~/x264</em> and <em>~/ffmpeg</em> directories if you later want to update the source files to a new  revision.  See &#8220;Updating Your Installation&#8221; on the first page of this  guide for more details.</p>
<p>That&#8217;s it! Now head back to the <a href="http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/" target="_blank">FFmpeg guide</a> for usage instructions and more.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Reverting Changes Made by This Tutorial</span></span><br />
To remove FFmpeg/x264 and any changes made from this tutorial:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove x264 ffmpeg build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libopencore-amr libtheora libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev</pre>
</div>
<p>Lastly, delete the <em>ffmpeg</em> and <em>x264</em> directories in your home folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/604-install-ffmpeg-and-x264-on-ubuntu-jaunty-jackalope-9-04-ubuntu-intrepid-ibex-8-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04</title>
		<link>http://www.doyourself.org/ffmpeg/600-howto-install-and-use-the-latest-ffmpeg-and-x264-2/</link>
		<comments>http://www.doyourself.org/ffmpeg/600-howto-install-and-use-the-latest-ffmpeg-and-x264-2/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:42:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=600</guid>
		<description><![CDATA[Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 &#38; Ubuntu Intrepid Ibex 8.10 Get the Dependencies 1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following: Code: sudo apt-get remove ffmpeg x264 libx264-dev 2. Next, get all of the packages you will need to install FFmpeg [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><span style="font-size: medium;">Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 &amp; Ubuntu Intrepid Ibex 8.10</span></p>
<p><span style="font-size: medium;"><span style="color: #663300;">Get the Dependencies</span></span><br />
<span style="font-size: medium;">1.</span> Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264 libx264-dev</pre>
</div>
<p><span style="font-size: medium;">2.</span> Next, get all of the packages you will need to install FFmpeg and x264 (you may need to <a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096" target="_blank">enable the universe and multiverse repositories</a>):</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install x264</span></span><br />
<span style="font-size: medium;">3.</span> Get the most current source files from the  official x264 git repository, compile, and install. You can run  &#8220;./configure &#8211;help&#8221; to see what features you can enable/disable. If you  are behind a firewall or unable to use git, then <a href="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/" target="_blank">daily source tarballs</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libopencore-amr</span> (optional)</span><br />
<span style="font-size: medium;">4.</span> This will allow you to decode and encode AMR audio.  I recommend skipping this step and omitting <em>&#8211;enable-libopencore-amrnb &#8211;enable-libopencore-amrwb</em> from step 5 if you are not going to decode or encode AMR audio.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
tar xvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure --disable-shared
make
sudo checkinstall --fstrans=no --install=yes --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libtheora</span> (optional)</span><br />
<span style="font-size: medium;">5.</span> This is used to encode to Theora, the video  type usually found in OGG files. The repository libtheora is too old, so  it must be compiled. I recommend skipping this step and omitting <em>&#8211;enable-libtheora</em> in step 5 if you don&#8217;t plan on encoding to Theora video:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --fstrans=no --install=yes --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install FFmpeg</span></span><br />
<span style="font-size: medium;">6.</span> Get the most current source files from the  official FFmpeg svn, compile, and install. Run &#8220;./configure &#8211;help&#8221; to  see what features you can enable/disable. If you are behind a firewall  or unable to use subversion, then <a href="http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2" target="_blank">nightly FFmpeg snapshots</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --backup=no --default
hash x264 ffmpeg ffplay</pre>
</div>
<p>That&#8217;s it for installation.  You can keep the <em>~/x264</em> and <em>~/ffmpeg</em> directories if you later want to update the source files to a new  revision.  See &#8220;Updating Your Installation&#8221; on the first page of this  guide for more details.</p>
<p>That&#8217;s it! Now head back to the <a href="http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/" target="_blank">FFmpeg guide</a> for usage instructions and more.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Reverting Changes Made by This Tutorial</span></span><br />
To remove FFmpeg/x264 and any changes made from this tutorial:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove x264 ffmpeg build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libopencore-amr libtheora libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev</pre>
</div>
<p>Lastly, delete the <em>ffmpeg</em> and <em>x264</em> directories in your home folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/600-howto-install-and-use-the-latest-ffmpeg-and-x264-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10</title>
		<link>http://www.doyourself.org/ffmpeg/598-install-ffmpeg-and-x264-on-ubuntu-karmic-koala-9-10/</link>
		<comments>http://www.doyourself.org/ffmpeg/598-install-ffmpeg-and-x264-on-ubuntu-karmic-koala-9-10/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:39:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=598</guid>
		<description><![CDATA[Get the Dependencies 1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following: Code: sudo apt-get remove ffmpeg x264 libx264-dev 2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories): Code: sudo [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><span style="font-size: medium;"><span style="color: #663300;">Get the Dependencies</span></span><br />
<span style="font-size: medium;">1.</span> Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264 libx264-dev</pre>
</div>
<p><span style="font-size: medium;">2.</span> Next, get all of the packages you will need to install FFmpeg and x264 (you may need to <a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096" target="_blank">enable the universe and multiverse repositories</a>):</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install x264</span></span><br />
<span style="font-size: medium;">3.</span> Get the most current source files from the  official x264 git repository, compile, and install. You can run  &#8220;./configure &#8211;help&#8221; to see what features you can enable/disable. <a href="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/" target="_blank">Daily source tarballs</a> are also available, and forum member Bachstelze provides <a href="http://ftp.itsuki.fkraiem.org/pub/x264/" target="_blank">x264 Ubuntu packages</a> for anyone who doesn&#8217;t want to compile.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libvpx</span> (optional)</span><br />
<span style="font-size: medium;">4.</span> This is used to encode and decode VP8 video. If you skip this, remove <em>&#8211;enable-libvpx</em> from step 6.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://review.webmproject.org/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libtheora</span> (optional)</span><br />
<span style="font-size: medium;">5.</span> This is used to encode to Theora, the video type usually found in OGG/OGV files.  The repository <em>libtheora</em> is too old, so it must be compiled. I recommend skipping this step and omitting <em>&#8211;enable-libtheora</em> in step 6 if you don&#8217;t plan on encoding Theora video:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install FFmpeg</span></span><br />
<span style="font-size: medium;">6.</span> Get the most current source files from the  official FFmpeg SVN, compile, and install. Run &#8220;./configure &#8211;help&#8221; to  see what features you can enable/disable. <a href="http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2" target="_blank">Nightly FFmpeg snapshots</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
hash x264 ffmpeg ffplay</pre>
</div>
<p>That&#8217;s it for installation.  You can keep the <em>~/x264</em> and <em>~/ffmpeg</em> directories if you later want to update the source files to a new  revision.  See &#8220;Updating Your Installation&#8221; on the first page of this  guide for more details.</p>
<p>Now head back to the <a href="http://ubuntuforums.org/showthread.php?t=786095" target="_blank">FFmpeg guide</a> for usage instructions and more.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Reverting Changes Made by This Guide</span></span><br />
To remove FFmpeg/x264 and other packages added for this guide:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove x264 ffmpeg build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libogg-dev libsdl1.2-dev libtheora libvpx libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre>
</div>
<p>Lastly, delete the <em>ffmpeg</em>, <em>libtheora</em>, <em>libvpx</em>, and <em>x264</em> directories in your home folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/598-install-ffmpeg-and-x264-on-ubuntu-karmic-koala-9-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HOWTO: Install and use the latest FFmpeg and x264</title>
		<link>http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/</link>
		<comments>http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:36:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=592</guid>
		<description><![CDATA[FFmpeg is a versatile tool to encode and decode a multitude of video and audio formats. x264 encodes high-quality video superior to other popular encoders. Although FFmpeg and x264 are available in the Ubuntu repositories, you may need to compile from source. For example, the ffmpeg-user mailing list requires that you use the latest FFmpeg [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>FFmpeg is a versatile tool to encode and decode a multitude of video and  audio formats.  x264 encodes high-quality video superior to other  popular encoders.</p>
<p>Although FFmpeg and x264 are available in the Ubuntu repositories, you may need to compile from source.  For example, the <a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/" target="_blank">ffmpeg-user mailing list</a> requires that you use the latest FFmpeg before asking for help.  You  may also like to have the bleeding-edge for encoding videos.  Also,  FFmpeg in the Ubuntu repository may not support necessary encoders,  decoders, and formats.</p>
<p><span style="font-size: xx-small;">Note: Those who are uncomfortable compiling can still enable restricted encoders in the repository FFmpeg:<br />
<a href="http://www.doyourself.org/ubuntu/587-howto-easily-enable-mp3-mpeg4-aac-and-other-restricted-encoders-in-ffmpeg/" target="_blank">HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg</a></span></p>
<p><span style="font-size: medium;"><span style="color: #663300;">Choose your Ubuntu</span></span><br />
<span style="font-size: medium;">0.</span>The instructions on the page are for <span style="font-size: x-small;"><strong><span style="color: #3333ff;">Ubuntu Lucid Lynx 10.04</span></strong></span>. Separate instructions are also available for older releases:</p>
<ul>
<li><a href="http://www.doyourself.org/ffmpeg/598-install-ffmpeg-and-x264-on-ubuntu-karmic-koala-9-10/" target="_blank">Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10</a></li>
<li><a href="http://www.doyourself.org/ffmpeg/604-install-ffmpeg-and-x264-on-ubuntu-jaunty-jackalope-9-04-ubuntu-intrepid-ibex-8-10/" target="_blank">Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04</a></li>
<li><a href="http://www.doyourself.org/ffmpeg/604-install-ffmpeg-and-x264-on-ubuntu-jaunty-jackalope-9-04-ubuntu-intrepid-ibex-8-10/" target="_blank">Install FFmpeg and x264 on Ubuntu Intrepid Ibex 8.10</a></li>
<li><a href="http://www.doyourself.org/uncategorized/606-install-ffmpeg-and-x264-on-ubuntu-hardy-heron-8-04-lts/" target="_blank">Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS</a></li>
<li><a href="http://www.doyourself.org/ffmpeg/608-install-ffmpeg-and-x264-on-ubuntu-dapper-drake-6-06-lts/" target="_blank">Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS</a> <em><span style="color: #c0c0c0;">(unsupported)</span></em></li>
</ul>
<p><span style="font-size: medium;"><span style="color: #663300;">Install the Dependencies</span></span><br />
<span style="font-size: medium;">1.</span> Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264 libx264-dev</pre>
</div>
<p><span style="font-size: medium;">2.</span> Next, get all of the packages you will need to install FFmpeg and x264 (you may need to <a href="https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096" target="_blank">enable the universe and multiverse repositories</a>):</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install x264</span></span><br />
<span style="font-size: medium;">3.</span> Get the most current source files, compile,  and install. You can run &#8220;./configure &#8211;help&#8221; to see what additional  features you can enable/disable. <a href="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/" target="_blank">Daily source tarballs</a> are also available, and forum member <a href="http://ubuntuforums.org/member.php?u=51114" target="_blank">Bachstelze</a> provides <a href="ftp://iori.fkraiem.org/pub/x264/" target="_blank">x264 Ubuntu packages</a> for anyone who doesn&#8217;t want to compile.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default</pre>
</div>
<p><span style="font-size: xx-small;"><strong>Note:</strong> Ubuntu Maverick Meerkat 10.10 users may have to add <em>&#8211;fstrans=no</em> to the above checkinstall line.</span></p>
<p><span style="font-size: medium;"><span style="color: #663300;">Install libvpx</span> (optional)</span><br />
<span style="font-size: medium;">5.</span> This is used to encode and decode VP8 video. If you skip this, remove <em>&#8211;enable-libvpx</em> from step 6.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
git clone git://review.webmproject.org/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --default</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install FFmpeg</span></span><br />
<span style="font-size: medium;">6.</span> Get the most current source files from the  official FFmpeg SVN, compile, and install. Run &#8220;./configure &#8211;help&#8221; to  see what features you can enable/disable. <a href="http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2" target="_blank">Nightly FFmpeg snapshots</a> are also available.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default
hash x264 ffmpeg ffplay</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Install qt-faststart</span> (optional)</span><br />
<span style="font-size: medium;">7.</span> This is a useful tool included with FFmpeg that rearranges a file with H.264 video, &#8220;such that the <em>moov atom</em> is in front of the data, thus facilitating network streaming&#8221;.   Basically, it allows web movies to start playing before they are  completely downloaded.  Usage: <strong>qt-faststart input.foo output.foo</strong>.</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd ~/ffmpeg
make tools/qt-faststart
sudo checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart</pre>
</div>
<p>That&#8217;s it for installation.  You can keep the <em>~/x264</em> and <em>~/ffmpeg</em> directories if you later want to update the source files to a new revision.  See <strong>Updating FFmpeg and x264</strong> below for more details.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Using FFmpeg and x264</span></span><br />
The easiest method for high quality video encoding is by using the  libx264 presets that are included with FFmpeg.  I recommend reading the <a href="http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/" target="_blank">FFmpeg x264 encoding guide</a> before trying these presets so you have a better idea of what to use.  You can add options such as frame size (for example: <em>-s 640&#215;480</em>) or tweak my examples to customize your encode.  You can see a current <a href="http://git.ffmpeg.org/?p=ffmpeg;a=tree;f=ffpresets" target="_blank">list of all <em>libx264</em> presets</a> (such as ipod or lossless) or after installation look in the <em>/usr/local/share/ffmpeg</em> directory.</p>
<p><strong>One-pass CRF</strong> (Constant Rate Factor) using the <em>slow</em> preset.  One-pass CRF is good for general encoding and is what I use most often.  Adjust <em>-crf</em> to change the quality.  Lower numbers mean higher quality and a larger output file size.  A sane range is 18 to 28.</p>
<div>
<div>Code:</div>
<pre dir="ltr">ffmpeg -i input.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4</pre>
</div>
<p><strong>Two-Pass encode</strong> using the <em>fast</em> presets.  Two-pass encoding is used when you are targeting a specific bitrate and/or final output file size:</p>
<div>
<div>Code:</div>
<pre dir="ltr">ffmpeg -i input.avi -pass 1 -vcodec libx264 -vpre fast_firstpass -b 512k -bt 512k -threads 0 -f rawvideo -an -y /dev/null &amp;&amp; ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre fast -b 512k -bt 512k -threads 0 output.mp4</pre>
</div>
<p><strong>iPod 640&#215;480</strong> using the <em>slow</em> and <em>ipod640</em> presets:</p>
<div>
<div>Code:</div>
<pre dir="ltr">ffmpeg -i input.avi -acodec libfaac -aq 100 -ac 2 -vcodec libx264 -vpre slow -vpre ipod640 -crf 26 -map_meta_data 0:0 -vf scale=640:-1 -threads 0 output.mp4</pre>
</div>
<p><span style="font-size: medium;"><span style="color: #663300;">Updating FFmpeg and x264</span></span><br />
Development of FFmpeg and x264 is active and an occasional update can  give you new features and bug fixes.  To update FFmpeg and x264 you will  need to remove the packages, <em>make distclean</em>, update the source, recompile, and install.  To update x264:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg x264 libx264-dev
cd ~/x264
make distclean
git pull</pre>
</div>
<p>Now compile x264 as shown earlier in the guide starting with the x264 <em>./configure</em> line.  Now FFmpeg:</p>
<div>
<div>Code:</div>
<pre dir="ltr">cd ~/ffmpeg
make distclean
svn update</pre>
</div>
<p>Now continue with the installation starting with the FFmpeg <em>./configure</em> line.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Reverting Changes Made by This Guide</span></span><br />
To remove FFmpeg/x264 and other packages added for this guide:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove x264 ffmpeg qt-faststart build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev</pre>
</div>
<p>Lastly, delete the <em>ffmpeg</em> and <em>x264</em> directories in your home folder.</p>
<p><span style="font-size: medium;"><span style="color: #663300;">Additional Resources</span></span></p>
<ul>
<li><a href="http://ubuntuforums.org/showthread.php?t=1392026" target="_blank">HOWTO: Proper Screencasting on Linux</a></li>
<li><a href="http://code.google.com/p/x264-ffmpeg-up-to-date/" target="_blank">x264-ffmpeg-up-to-date</a> &#8211; bash script to update x264 and ffmpeg</li>
<li><a href="http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/" target="_blank">FFmpeg x264 encoding guide</a></li>
<li><a href="http://www.videolan.org/developers/x264.html" target="_blank">x264 &#8211; a free h264/avc encoder</a></li>
<li><a href="http://mirror01.x264.nl/x264/changelog.txt" target="_blank">x264 changelog</a></li>
<li><a href="http://ffmpeg.org/" target="_blank">FFmpeg.org</a></li>
<li><a href="http://git.ffmpeg.org/?p=ffmpeg;a=summary" target="_blank">FFmpeg revision log</a></li>
</ul>
<p><span style="font-size: medium;"><span style="color: #663300;">If You Need Help</span></span><br />
Feel free to ask your questions here and I&#8217;ll try to answer you.   Helpful information includes your Ubuntu version, names of any  third-party repositories or <a href="https://help.launchpad.net/Packaging/PPA" target="_blank">PPA</a>s you are using, FFmpeg command, and the complete FFmpeg output if applicable.</p>
<p><strong>Recent Updates</strong></p>
<blockquote><p><strong>2010-07-25:</strong> Updated the iPod example. <strong>-map_meta_data</strong> will attempt to copy any metadata such as title from the input to the output, and <strong>-vf scale=640:-1</strong> will resize the output to 640 pixels wide and then automatically  determine the proper height to preserve the aspect ratio. Replaced <strong>-ab 128k</strong> with <strong>-aq 100</strong> for VBR audio awesomeness (<strong>-ab</strong> makes CBR). <strong>Note:</strong> Values for <em>-aq</em> vary amongst encoders, so a value that works for <em>libfaac</em> won&#8217;t necessarily work for <em>libmp3lame</em>.</p>
<p><strong>2010-07-19:</strong> <span style="text-decoration: line-through;">Changed the FFmpeg pkgversion for the checkinstall command so it works for non-English languages/locales. Thanks to <a href="http://ubuntuforums.org/member.php?u=208550" target="_blank">andrew.46</a></span> (Reverted until we get it working correctly.)</p>
<p><strong>2010-07-02:</strong> Karmic guide updates: Added <em>libvpx</em>. Added <em>libogg-dev</em> to &#8220;Reverting Changes&#8230;&#8221; section.  Added <em>ffplay</em> to the <em>hash</em> command. Lucid guide: removed <em>&#8211;nodoc</em> from the <em>libvpx</em> checkinstall because it installs without that option now.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg</title>
		<link>http://www.doyourself.org/ffmpeg/587-howto-easily-enable-mp3-mpeg4-aac-and-other-restricted-encoders-in-ffmpeg/</link>
		<comments>http://www.doyourself.org/ffmpeg/587-howto-easily-enable-mp3-mpeg4-aac-and-other-restricted-encoders-in-ffmpeg/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:31:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=587</guid>
		<description><![CDATA[A common question is &#8220;why doesn&#8217;t the repository FFmpeg convert to mp3, aac, mpeg4, etc?&#8221;. Ubuntu doesn&#8217;t make it very clear to the general user as to why to repo FFmpeg is so limited or how to fix this issue. This is reflected in the number of forum questions relating to this topic. Why is [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A common question is &#8220;why doesn&#8217;t the repository FFmpeg convert to mp3,  aac, mpeg4, etc?&#8221;.  Ubuntu doesn&#8217;t make it very clear to the general  user as to why to repo FFmpeg is so limited or how to fix this issue.   This is reflected in the number of forum questions relating to this  topic.</p>
<p><span style="font-size: medium;"><span style="color: #cc6600;">Why is FFmpeg from the repository so limited?</span></span><br />
Legal reasons.  Some software is limited due to geographical differences  in software patents, legal restrictions on free speech, and  restrictions on certain technologies.  Ubuntu sidesteps these legal  restrictions by not including some restricted packages by default.   Users must install these packages on their own.  See <a href="https://help.ubuntu.com/community/RestrictedFormats" target="_blank">Restricted Formats Ubuntu Community Documentation</a> and <a href="http://ffmpeg.org/legal.html" target="_blank">FFmpeg License and Legal Considerations</a> for more details.</p>
<p><span style="font-size: medium;"><span style="color: #cc6600;">How do I fix FFmpeg?</span></span><br />
There are several options:</p>
<blockquote><p>A. Compile FFmpeg yourself<br />
B. Install the <em>unstripped</em> or <em>extra</em> libraries<br />
C. Medibuntu</p></blockquote>
<p><span style="font-size: medium;"><span style="color: #cc6600;">A. Compiling FFmpeg yourself (for all Ubuntu versions)</span></span><br />
The official FFmpeg answer is to compile it yourself, giving you the  power to get what you want with the bug-fixes, enhancements, and  benefits of the most recent FFmpeg revision.  This is an excellent  solution and is explained here:</p>
<p><a href="http://www.doyourself.org/ffmpeg/592-howto-install-and-use-the-latest-ffmpeg-and-x264/" target="_blank">HOWTO: Install and use the latest FFmpeg and x264</a></p>
<p>This is the option that I personally use, and although it is not too  hard, compiling may not be for everyone for a variety of reasons.  Off  to the other options&#8230;</p>
<p><span style="font-size: medium;"><span style="color: #cc6600;">B. Installing the <em>unstripped</em> or <em>extra</em> libraries</span></span><br />
This is the quickest option for most users.  FFmpeg from the repository  does not include many restricted encoders, formats, and codecs which may  include: H.263, aac (libfaac), mp3 (libmp3lame), H.264 (libx264), xvid  (libxvid), and mpeg4.  You can fix this by installing the <em>unstripped</em> or <em>extra</em> (Ubuntu Karmic renamed <em>unstripped</em> to <em>extra</em>) FFmpeg libraries that will enable these restricted encoders.  Open up Terminal and enter:</p>
<p><strong>Ubuntu Lucid Lynx 10.04 &amp; Ubuntu Karmic Koala 9.10</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install ffmpeg libavcodec-extra-52</pre>
</div>
<blockquote><p><strong>Note:</strong> <span style="color: #ff6600;">The <strong>libavcodec-extra-52</strong> package for Lucid and Karmic do not support AAC or AMR formats.  I recommend using <strong>libavcodec-extra-52</strong> from the Medibuntu repository.  See option <strong>C. Medibuntu</strong>.</span></p></blockquote>
<p><strong>Ubuntu Jaunty Jackalope 9.04</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install ffmpeg libavcodec-unstripped-52</pre>
</div>
<p><strong>Ubuntu Intrepid Ibex 8.10</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install ffmpeg libavcodec-unstripped-51</pre>
</div>
<p>Alternatively, you can search for these packages in the Synaptic Package Manager.</p>
<p><span style="font-size: medium;"><span style="color: #cc6600;">C. Medibuntu</span></span><br />
This option is available for <strong>Ubuntu Lucid Lynx 10.04</strong>, <strong>Ubuntu Karmic Koala 9.10</strong> and <strong>Ubuntu Hardy Heron 8.04</strong>.  <a href="http://medibuntu.org/" target="_blank">Medibuntu</a> is a third-party repository that contains packages that are unable to  be included in the official Ubuntu repositories.  To install FFmpeg from  Medibuntu open Terminal (Applications -&gt; Accessories -&gt; Terminal)  and run the following:</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list &amp;&amp; sudo apt-get -q update &amp;&amp; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring &amp;&amp; sudo apt-get -q update</pre>
</div>
<p>This huge command (adapted from <a href="https://help.ubuntu.com/community/Medibuntu" target="_blank">Medibuntu &#8211; Community Ubuntu Documentation</a>) will install the repository information to your computer then update and authenticate the new repository.  Now install FFmpeg:</p>
<p><strong>Ubuntu Lucid Lynx 10.04 &amp; Ubuntu Karmic Koala 9.10</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install ffmpeg libavcodec-extra-52</pre>
</div>
<p><strong>Ubuntu Hardy Heron 8.04</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get install ffmpeg</pre>
</div>
<p>That&#8217;s it.  Now you have a non-crippled version of FFmpeg.  See some usage examples at the <a href="http://www.doyourself.org/ffmpeg/588-ffmpeg-x264-encoding-guide/" target="_blank">FFmpeg x264 encoding guide</a>.</p>
<p><span style="font-size: medium;"><span style="color: #cc6600;">Undoing Changes Made By This Guide</span></span><br />
<strong>B. Uninstalling the <em>unstripped</em> or <em>extra</em> libraries</strong></p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo apt-get remove ffmpeg libavcodec-*-5*</pre>
</div>
<p><strong>C. Uninstalling FFmpeg and the Medibuntu Repository</strong></p>
<div>Code:</div>
<pre dir="ltr">sudo apt-get autoremove ffmpeg medibuntu-keyring &amp;&amp; sudo rm /etc/apt/sources.list.d/medibuntu.list</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/587-howto-easily-enable-mp3-mpeg4-aac-and-other-restricted-encoders-in-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FFmpeg x264 encoding guide</title>
		<link>http://www.doyourself.org/ffmpeg/588-ffmpeg-x264-encoding-guide/</link>
		<comments>http://www.doyourself.org/ffmpeg/588-ffmpeg-x264-encoding-guide/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:30:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=588</guid>
		<description><![CDATA[Preset files are available from the FFmpeg source code in the ffpresets subdirectory. Using the 0.5 release or current svn trunk of FFmpeg, running make install will install the preset files to ${prefix}/share/ffmpeg and just specifying -vcodec libx264 -vpre &#60;preset&#62; is sufficient for ffmpeg to find the preset. Otherwise, you can either copy *.ffpreset from [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Preset files are available from the FFmpeg source code in the  ffpresets subdirectory. Using the 0.5 release or current svn trunk of  FFmpeg, running <code>make install</code> will install the preset files to <code>${prefix}/share/ffmpeg</code> and just specifying <code>-vcodec libx264 -vpre &lt;preset&gt;</code> is sufficient for <code>ffmpeg</code> to find the preset.</p>
<p>Otherwise, you can either copy *.ffpreset from the FFmpeg source into  ~/.ffmpeg/ or you can point to a preset file directly in the argument  of <code>-fpre</code> in your command line.</p>
<h2>Basic FFmpeg Usage</h2>
<p>To construct an <code>ffmpeg</code> command line, you need to understand a few fairly simple things. The basic command line format is:</p>
<p><code>ffmpeg [input options] -i [input file] [output options] [output file]</code></p>
<ul>
<li>input options – these are usually mandatory information that is  missing about the source file (for example, in the case of a sequence of  image files this could be the frame rate), or the seek position  corresponding to the desired start point of the stream</li>
<li>output options – audio and video filtering (alteration of the sample  rate, number of channels, frame dimensions, frame rate), audio and  video codecs and their corresponding options, container format and  related options</li>
</ul>
<p>Normally the <strong>minimum</strong> one should specify in an <code>ffmpeg</code> command line would be something like:</p>
<p><code>ffmpeg -i INFILE -acodec ACODEC -ab 96k -vcodec VCODEC -b 500k OUTFILE</code></p>
<p>…replacing the capitalised values as appropriate. When using x264, we need to add some extra bits as the defaults are bad.</p>
<h2>x264 – Rate Control Choices</h2>
<p>Firstly, you need to decide on a rate control method. This controls  how bits are allocated within the stream. At a rudimentary level, you  want the quality to remain constant but this implies that more complex  frames use more bits and less complex frames use less bits.</p>
<p>Rate control methods available:</p>
<ul>
<li>constant quantisation parameter – not recommended anymore unless you know you want it</li>
<li>constant rate factor – good for one pass when the priority is quality and file size/bit rate is not really a concern</li>
<li>one pass average bit rate – good for streaming purposes or targeting a bit rate when two-pass is unfeasible</li>
<li>two pass variable bit rate – good for targeting a bit rate when you  have the time to spend on two passes (though the first pass can be quite  fast) and are writing to a file</li>
</ul>
<p>Or in prose, CQP mode is mostly deprecated by CRF as CRF maintains  more constant quality which was usually the aim of someone using CQP  mode. If you care more about quality than bit rate then I would  recommend using one pass CRF to save yourself a bit of time. Evaluate  various rate factors between about 25 and 15 (a lower value is higher  quality and higher bit rate) until you find a quality level/approximate  bit rate with which you’re happy and then you can use that value forever  more.</p>
<p>One pass average bit rate is good if you need to aim for an  approximate bit rate but don’t have time to run two passes. If you have  the time then two passes are recommended as the bits will be better  distributed to maintain constant quality.</p>
<p>To use one pass CQP:</p>
<p><code>-cqp &lt;int&gt;</code></p>
<p>To use one pass CRF:</p>
<p><code>-crf &lt;float&gt;</code></p>
<p>To use one pass ABR or two pass VBR:</p>
<p><code>-b BIT_RATE -bt BIT_RATE</code></p>
<h2>x264 – FFmpeg Preset Choices</h2>
<p>Secondly, you need to choose an appropriate preset from those available.</p>
<p>Presets available (for lossy compression):</p>
<ul>
<li>quality related:
<ul>
<li>ultrafast</li>
<li>superfast</li>
<li>veryfast</li>
<li>faster</li>
<li>fast</li>
<li>medium – x264 CLI default</li>
<li>slow</li>
<li>slower</li>
<li>veryslow</li>
<li>placebo</li>
</ul>
</li>
<li>first pass:
<ul>
<li>&lt;preset from above&gt;_firstpass – for example medium_firstpass</li>
</ul>
</li>
<li>profile constraints:
<ul>
<li>baseline</li>
<li>main</li>
</ul>
</li>
</ul>
<p>Note: Profile constraint presets need to be specified with a second <code>-vpre</code> option <strong>after</strong> the quality/first pass preset, e.g. <code>-vpre slower -vpre main</code></p>
<h2>x264 – Recommended General Options</h2>
<p>For all rate control methods you will probably want libx264 to select  the number of threads to use to maximise its performance on your  CPU(s):</p>
<p><code>-threads 0</code></p>
<p><a name="examples"></a></p>
<h2>Two-Pass Example</h2>
<p>So if you wanted to encode using two-pass VBR, the command line would be something like:</p>
<p><code>ffmpeg -i INPUT -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b BIT_RATE -bt BIT_RATE -threads 0 OUTPUT.mp4</code></p>
<p>Note: We don’t encode the audio in the first pass because we will not be using the data that was output.</p>
<p><code>ffmpeg -i INPUT -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -vpre slow -b BIT_RATE -bt BIT_RATE -threads 0 OUTPUT.mp4</code></p>
<h2>Single-Pass Constant Rate Factor (CRF) Example</h2>
<p>Or for a single pass CRF encode:</p>
<p><code>ffmpeg -i INFILE -acodec libfaac -ab 96k -vcodec libx264 -vpre slow -crf 22 -threads 0 OUTPUT.mp4</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/588-ffmpeg-x264-encoding-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YouTube, FFMPEG, and MP3 Conversion</title>
		<link>http://www.doyourself.org/ffmpeg/550-youtube-ffmpeg-and-mp3-conversion/</link>
		<comments>http://www.doyourself.org/ffmpeg/550-youtube-ffmpeg-and-mp3-conversion/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 16:50:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=550</guid>
		<description><![CDATA[Yesterday I published a quick post about a basic MPEG -&#62; FLV video conversion method using FFMPEG. Today I want to share another great usage of FFMPEG: stripping a videoâ€™s audio and creating an MP3. As an added bonus, Iâ€™ll be ripping the audio from a great YouTube video using youtube-dl, a python script with [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Yesterday I published a quick post about a basic <a href="http://davidwalsh.name/convert-video-ffmpeg">MPEG -&gt; FLV video conversion method using FFMPEG</a>.<br />
Today I want to share another great usage of FFMPEG: stripping a<br />
videoâ€™s audio and creating an MP3. As an added bonus, Iâ€™ll be ripping<br />
the audio from a <a href="http://www.youtube.com/watch?v=tlWpnLdPwvk">great YouTube video</a> using <a href="http://bitbucket.org/rg3/youtube-dl/wiki/Home">youtube-dl</a>, a python script with loads of options for downloading YouTube videos.<br />
<h2>The youtube-dl Shell Script</h2>
<div class="syntaxhighlighter ">
<div class="lines">
<div class="line alt1"><code>01.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>#command</code></span></span></div>
<div class="line alt2"><code>02.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>davidwalsh83$ youtube-dl.py <a href="http://www.youtube.com/">http://www.youtube.com/</a></code><code>watch</code><code>?</code><code>v</code><code>=tlWpnLdPwvk</code></span></span></div>
<div class="line alt1"><code>03.</code><span class="content"><span class="block" style="margin-left: 0px ! important">&nbsp;</span></span></div>
<div class="line alt2"><code>04.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>#output</code></span></span></div>
<div class="line alt1"><code>05.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[youtube] Setting language</code></span></span></div>
<div class="line alt2"><code>06.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[youtube] tlWpnLdPwvk: Downloading video webpage</code></span></span></div>
<div class="line alt1"><code>07.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[youtube] tlWpnLdPwvk: Extracting video information</code></span></span></div>
<div class="line alt2"><code>08.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[youtube] tlWpnLdPwvk: URL: <a href="http://www.youtube.com/get_video?video_id=tlWpnLdPwvk&amp;">http://www.youtube.com/get_video?video_id=tlWpnLdPwvk&amp;</a>;t=vjVQa1PpcFMZ4TkTSYXamGxmLZq-ot2l8Jx-HiNAf0I=&amp;el=detailpage&amp;</code><code>ps</code><code>=</code></span></span></div>
<div class="line alt1"><code>09.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[download] Destination: tlWpnLdPwvk.flv</code></span></span></div>
<div class="line alt2"><code>10.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>[download] 100.0% of 18.78M at&nbsp;&nbsp; 53.98k/s ETA 00:00</code></span></span></div>
</div>
</div>
<p>The initial install of youtube-dl was tough but only because Iâ€™m not<br />
well-versed with the permissions side of Unix. I eventually figured it<br />
out but if you have trouble installing youtube-dl or simply want to use<br />
its advanced options, check out <a href="http://bitbucket.org/rg3/youtube-dl/wiki/Home">youtube-dlâ€™s documentation</a>.  youtube-dl also provides an option to read a text file with a list of videos and will do a batch download. <em>Note: youtube-dl allows you to set an output file name but it didnâ€™t appear to be working.</em>  If youâ€™d like a more simple method, Mark Sanborn wrote a great post on <a href="http://www.marksanborn.net/howto/using-wget-to-download-youtube-videos/">ripping YouTube videos using wget</a>.</p>
<h2>The FFMPEG Shell Script</h2>
<div class="syntaxhighlighter ">
<div class="bar">
<div class="toolbar"><a class="item viewSource" title="view source" href="http://davidwalsh.name/youtube-ffmpeg-mp3-conversion#viewSource">view source</a><a class="item printSource" title="print" href="http://davidwalsh.name/youtube-ffmpeg-mp3-conversion#printSource">print</a><a class="item about" title="?" href="http://davidwalsh.name/youtube-ffmpeg-mp3-conversion#about">?</a></div>
</div>
<div class="lines">
<div class="line alt1"><code>1.</code><span class="content"><span class="block" style="margin-left: 0px ! important"><code>davidwalsh83$ ffmpeg -i tlWpnLdPwvk.flv RodStewartMaggieMay.mp3</code></span></span></div>
</div>
</div>
<p>As I did with youtube-dl, I chose the most basic usage of FFMPEG.  <a href="http://www.ffmpeg.org/ffmpeg-doc.html">FFMPEGâ€™s documentation</a> provides you a list of all of the possible conversion options if you need them.</p>
<p>Use the video player above to listen to the result. The video I chose<br />
is a live version of Maggie May by Rod Stewart recorded at Royal Albert<br />
Hall in the Knightsbridge area of the City of Westminster, London,<br />
England. The video is from Rodâ€™s <a href="http://www.amazon.com/One-Night-Only-Stewart-Albert/dp/B00064VR0W/ref=sr_1_1?ie=UTF8&amp;s=music&amp;qid=1246897303&amp;sr=8-1">One Night Only DVD</a><br />
which I HIGHLY recommend. This is the best version of Maggie May that<br />
exists (my opinion but, as you know, when is my opinion not correct?)<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/550-youtube-ffmpeg-and-mp3-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting video (AVI, MOV, MPG, MP4) to FLV using FFmpeg</title>
		<link>http://www.doyourself.org/ffmpeg/549-converting-video-avi-mov-mpg-mp4-to-flv-using-ffmpeg/</link>
		<comments>http://www.doyourself.org/ffmpeg/549-converting-video-avi-mov-mpg-mp4-to-flv-using-ffmpeg/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 16:44:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FFMPEG]]></category>
		<category><![CDATA[(AVI]]></category>
		<category><![CDATA[Converting]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[mov]]></category>
		<category><![CDATA[MP4)]]></category>
		<category><![CDATA[mpg]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[using]]></category>
		<category><![CDATA[video!!!]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=549</guid>
		<description><![CDATA[Firstly you need to download FFmpeg from the FFmpeg website To convert your file use the following command. ffmpeg -i â€œC:videosvideoname.movâ€ -ar 44100 -ab 96 -f flv â€œC:videosvideoname.flvâ€ ffmpeg â€“ runs the program -i â€œfilename.extâ€ â€“ input file -ar 44100 â€“ audio frequency -ab 96 â€“ audio bitrate -f flv â€“ force format followed by [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Firstly you need to download FFmpeg from the <a href="http://ffmpeg.mplayerhq.hu/download.html">FFmpeg</a> website</p>
<p>To convert your file use the following command.</p>
<blockquote><p>ffmpeg -i â€œC:videosvideoname.movâ€ -ar 44100 -ab 96 -f flv â€œC:videosvideoname.flvâ€</p>
</blockquote>
<ul>
<li><strong>ffmpeg</strong> â€“ runs the program</li>
<li><strong>-i â€œfilename.extâ€</strong> â€“ input file</li>
<li><strong>-ar 44100</strong> â€“ audio frequency</li>
<li><strong>-ab 96</strong> â€“ audio bitrate</li>
<li><strong>-f flv</strong> â€“ force format followed by format</li>
<li><strong>â€œnewfilename.extâ€</strong> â€“ output file</li>
</ul>
<p>I used these settings to convert some 500MB+ Apple Quicktime (MOV)<br />
files down to ~20MB FLV which were perfect for uploading to YouTube.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/ffmpeg/549-converting-video-avi-mov-mpg-mp4-to-flv-using-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

