ffmpeg

Differences between revisions 40 and 57 (spanning 17 versions)
Revision 40 as of 2008-10-31 13:16:34
Size: 6785
Editor: inet-nc01-o
Comment:
Revision 57 as of 2011-08-23 22:36:00
Size: 460
Editor: 98-65-174-206
Comment: Correct spelling of project is FFmpeg, not FFMpeg. Pretty links.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Fixing ffmpeg on Ubuntu The existing contents of this page were completely outdated. See the [[https://help.ubuntu.com/community/FFMpeg|FFmpeg]] page at Community Ubuntu Documentation for details of working with FFmpeg on Ubuntu.
Line 3: Line 3:
For a litany of legal reasons, ffmpeg does not come with all of the necessary things enabled for you to encode video for the iPod Video by default. Therefore, we need to build it from source and install some other libraries and programs, as well. Make sure you have multiverse and universe enabled. For compiling from source see [[http://ubuntuforums.org/showthread.php?t=786095|HOWTO: Install and use the latest FFmpeg and x264]] on the Ubuntu Forums.
Line 5: Line 5:
== Compiling ffmpeg from version in the repositories == Visit [[http://ffmpeg.org/|ffmpeg.org]] for more information.
Line 7: Line 7:
In the terminal, run:
{{{
sudo apt-get build-dep ffmpeg
}}}

On pre-8.04:
{{{
sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libdts-dev checkinstall
}}}

On 8.04:
{{{
sudo apt-get install liblame-dev libfaad-dev libx264-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libdts-dev checkinstall
}}}
As there is only a dummy package with libfaad2-dev, it is now replaced with libfaad-dev.

{{{
apt-get source ffmpeg
}}}

{{{
cd ffmpeg-*/
}}}

if you are using and x86_64 or AMD64 architecture (aka 64 bits) you must execute the next commands :

{{{
cp configure configure.bkp
sed -e "s/-ldts/-ldts_pic/" configure.bkp > configure
}}}

For a full explanation on the inner workings about this, take a look [[http://ubuntuforums.org/archive/index.php/t-220174.html|here]]

In pre-7.10 releases (these should be all on one line):

{{{
./configure --enable-gpl --enable-pp --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame --enable-faad --enable-faac --enable-xvid --enable-shared
}}}

Or, on 7.10:

{{{
./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg --enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-shared
}}}

On 8.04:
{{{
./configure --enable-liba52 --disable-debug --enable-libfaad --enable-libfaac --enable-gpl --enable-amr_nb --enable-amr_wb --enable-x264 --enable-xvid --enable-libdts --enable-pthreads --enable-libvorbis --enable-pp --enable-libtheora --enable-libogg --enable-libgsm --disable-debug --enable-shared --prefix=/usr
}}}

On later versions of 8.04:
{{{
./configure --enable-liba52 --disable-debug --enable-libfaad --enable-libfaac --enable-gpl --enable-x264 --enable-xvid --enable-pthreads --enable-libvorbis --enable-pp --enable-libtheora --enable-libogg --enable-libgsm --enable-swscaler --disable-debug --enable-shared --prefix=/usr
}}}

'''AMR requires codecs available in [[http://ubuntuforums.org/showthread.php?t=762399|Medibuntu]] repositories.'''


Then compile:

{{{
make
}}}

{{{
sudo checkinstall -D make install
}}}

*Only!!! If the above command doesn't work try this (reasons are explained below):
{{{
sudo make install
}}}

*If you get these errors in 8.04:
{{{
install:`cannot stat 'doc/ffmpeg.1' No such file or directory
.. ffplay.1 ..
.. ffserver.1..
make: *** Error 1
**** Installation failed. Aborting package creation
Cleaning up...OK
Bye.
}}}
Then you should run this command:
{{{
sudo apt-get install libx264-dev checkinstall
}}}
And then repeat the steps above preceeding the error message.

It will go through a bunch of stuff and prompt you on the last command for a few things. First, hit y to create docs, then just hit enter at the EOF question. Next, it will take you to the name and version. Edit #2 (name) to be ffmpeg, then edit #3 (version) to be something newer than what it is...so, either 1.cvsxxxxxx or some other way. If your installation fails because it claims that it was downgrading ffmpeg, you may use "sudo make install" instead of "sudo checkinstall -D make install", but you will not have a dpkg for it. If you go thise route, you can always uninstall by returning to this directory and typing "sudo make uninstall". If you don't mind not having a dpkg for it, then I'd recommend going straight to a sudo make install. Now, ffmpeg is fixed, time to move onto gtkpod's abilities.


== Compiling ffmpeg from upstream svn snapshots ==

 /!\ September 2008: Compiling from upstream may currently be broken if you choose to compile in '''support for H264''' (--enable-x264 option). libx264-dev shipped with Ubuntu 8.04 Hardy Heron is too old to compile ffmpeg. See this http://article.gmane.org/gmane.comp.video.mplayer.user/56828. The error message you might see includes "'X264_ME_TESA' undeclared (first use in this function)", ''' Please follow [[http://ubuntuforums.org/showthread.php?t=786095&highlight=libx264|these instructions]].


=== Remove ffmpeg ===

{{{
sudo apt-get remove ffmpeg
}}}

=== Get pre-requisites ===

{{{
sudo apt-get install liba52-dev libdts-dev libgsm1-dev libvorbis-dev libxvidcore4 libxvidcore-dev libdc1394-dev libfaac-dev liblame-dev libx264-dev libfaad2-dev libtheora-dev libsdl1.2-dev
}}}

=== Grab the ffmpeg source ===

{{{
wget http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2
tar jxvf ffmpeg-export-snapshot.tar.bz2
cd ffmpeg-export-*}}}

or checkout the latest version from svn
{{{
sudo apt-get install SVN
svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
}}}

'''September 2008: There is some on going changes in SVN and trunk is not stable.''' Use [[http://ffmpeg.mplayerhq.hu/|revision 15261]]

{{{
svn checkout -r 15261 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
}}}

=== Configure ===

{{{
./configure --prefix=/usr/local --disable-debug --enable-shared --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-liba52 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
}}}
=== Compile ===

{{{
make
}}}

=== Install ===

{{{
sudo make install
}}}

=== Test ===

{{{
export LD_LIBRARY_PATH=/usr/local/lib/
 ffmpeg -version
FFmpeg version SVN-r9450, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --enable-xvid --enable-faac --enable-mp3lame --enable-x264 --enable-faad --enable-x11grab --enable-swscaler --prefix=/usr/local
  libavutil version: 49.4.1
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jul 4 2007 21:14:05, gcc: 4.1.3 20070629 (prerelease) (Ubuntu 4.1.2-13ubuntu2)
ffmpeg SVN-r9450
libavutil 3212289
libavcodec 3352580
libavformat 3345409
}}}

== Medibuntu ==

Another option could be to add the [[http://www.medibuntu.org/|medibuntu]] repository to your ''sources''. More details [[https://help.ubuntu.com/community/Medibuntu|here]].

The existing contents of this page were completely outdated. See the FFmpeg page at Community Ubuntu Documentation for details of working with FFmpeg on Ubuntu.

For compiling from source see HOWTO: Install and use the latest FFmpeg and x264 on the Ubuntu Forums.

Visit ffmpeg.org for more information.


CategoryDocumentation

ffmpeg (last edited 2011-08-23 22:36:00 by 98-65-174-206)