Changes between Initial Version and Version 1 of CompilationGuide/Centos


Ignore:
Timestamp:
Dec 6, 2011, 5:03:09 AM (8 years ago)
Author:
llogan
Comment:

make initial page

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/Centos

    v1 v1  
     1= Compile FFmpeg on CentOS 6.0 =
     2
     3This guide is based on a minimal CentOS installation and will install FFmpeg with several external encoding libraries.
     4
     5  '''Note:''' The # indicates that the command should be executed as superuser or root.
     6
     7== Preparation ==
     8Remove any existing packages.
     9{{{
     10# yum erase x264 ffmpeg
     11}}}
     12
     13=== Get the dependencies ===
     14{{{
     15# yum install curl gcc git make nasm pkgconfig wget
     16}}}
     17
     18=== Make a source directory ===
     19Make a directory in your home to keep everything organized.
     20{{{
     21mkdir ~/ffmpeg-source
     22}}}
     23
     24== Installation ==
     25=== Yasm ===
     26Yasm is an assembler used by x264 and FFmpeg.
     27{{{
     28cd ~/ffmpeg-source
     29wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
     30tar xzvf yasm-1.2.0.tar.gz
     31cd yasm-1.2.0
     32./configure
     33make
     34# make install
     35}}}
     36
     37  '''Note:''' If you do not require certain encoders you may skip the relevant section and then remove the appropriate ./configure option in FFmpeg. For example, if libtheora is not needed, then skip that section and then remove ''--enable-libtheora'' from the Install FFmpeg section.
     38
     39=== x264 ===
     40{{{
     41H.264 video encoder.
     42cd ~/ffmpeg-source
     43git clone git://git.videolan.org/x264
     44cd x264
     45./configure --enable-static
     46make
     47# make install
     48}}}
     49
     50=== LAME ===
     51MP3 audio encoder.
     52{{{
     53cd ~/ffmpeg-source
     54wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
     55tar xzvf lame-3.99.tar.gz
     56cd lame-3.99
     57./configure --enable-nasm
     58make
     59# make install
     60}}}
     61
     62=== libogg ===
     63Required for libtheora and libvorbis.
     64{{{
     65cd ~/ffmpeg-source
     66wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.xz
     67tar Jxvf libogg-1.3.0.tar.xz
     68cd libogg-1.3.0
     69./configure
     70make
     71# make install
     72}}}
     73
     74=== libtheora ===
     75Theora video encoder.
     76{{{
     77cd ~/ffmpeg-source
     78wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
     79tar xzvf libtheora-1.1.1.tar.gz
     80cd libtheora-1.1.1
     81./configure
     82make
     83# make install
     84}}}
     85
     86=== libvorbis ===
     87Vorbis audio encoder.
     88{{{
     89cd ~/ffmpeg-source
     90wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
     91tar xzvf libvorbis-1.3.2.tar.gz
     92cd libvorbis-1.3.2
     93./configure
     94make
     95# make install
     96}}}
     97
     98=== vo-aacenc ===
     99VisualOn AAC audio encoder.
     100{{{
     101cd ~/ffmpeg-source
     102wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.1.tar.gz
     103tar xzvf vo-aacenc-0.1.1.tar.gz
     104./configure
     105make
     106# make install
     107}}}
     108
     109
     110=== libvpx ===
     111VP8 video encoder.
     112{{{
     113cd ~/ffmpeg-source
     114git clone http://git.chromium.org/webm/libvpx.git
     115cd libvpx
     116./configure
     117make
     118# make install
     119}}}
     120
     121=== FFmpeg ===
     122{{{
     123cd ~/ffmpeg-source
     124git clone git://source.ffmpeg.org/ffmpeg
     125cd ffmpeg
     126./configure --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc--enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3
     127make
     128# make install
     129}}}
     130
     131  '''Note:''' Keep the ffmpeg-source directory and all contents if you intend to update or uninstall as shown below.
     132
     133== Updating x264, libvpx, and FFmpeg ==
     134First uninstall x264, libvpx, and FFmpeg:
     135{{{
     136cd ~/ffmpeg-source/x264
     137# make uninstall
     138cd ~/ffmpeg-source/ffmpeg
     139# make uninstall
     140cd ~/ffmpeg-source/libvpx
     141# make uninstall
     142}}}
     143
     144=== Update x264 ===
     145{{{
     146cd ~/ffmpeg-source/x264
     147make distclean
     148git pull
     149}}}
     150Then run ./configure, make, and make install as shown in the Install x264 section.
     151
     152=== Update FFmpeg ===
     153{{{
     154cd ~/ffmpeg-source/ffmpeg
     155make distclean
     156git pull
     157}}}
     158Then run ./configure, make, and make install as shown in the Install FFmpeg section.
     159
     160=== Update libvpx ===
     161{{{
     162cd ~/ffmpeg-source/libvpx
     163make distclean
     164git pull
     165}}}
     166Then run ./configure, make, and make install as shown in the Install libvpx section.
     167
     168== Reverting changes made by this guide ==
     169{{{
     170# yum erase gcc git make nasm pkgconfig wget
     171cd ~/ffmpeg-source/yasm-1.2.0
     172# make uninstall
     173cd ~/ffmpeg-source/x264
     174# make uninstall
     175cd lame-3.99
     176# make uninstall
     177cd ~/ffmpeg-source/ffmpeg
     178# make uninstall
     179}}}
     180
     181{{{
     182#!comment
     183Todo:
     184Integrate installation via package management system instead of "make install" or don't even install.
     185}}}