Want more features on Pastebin? Sign Up, it's FREE!
Guest

Compiling FFMPEG for CentOS 6.3 from source

By: sanderb on Sep 11th, 2012  |  syntax: Bash  |  size: 3.93 KB  |  views: 2,210  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Compiling FFMPEG for CentOS 6.3 from source
  2. # log of commands Sept 7th, 2012
  3. # I found this information very helpful:
  4. # http://cumulusclips.org/docs/install-ffmpeg-x264-on-centos/
  5. # http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide
  6. # You may have to add your own flavour of filters and codecs to the mix,
  7. # I just needed FFMPEG to transcode from H264 MP4 to H264 MP4 Mobile, WEBM and OGV.
  8.  
  9. # first erase all ffmpeg related packages that you might have installed earlier:
  10. # (I left the rpm's for libogg libvorbis libtheora installed - yum tried to remove too many dependencies to my liking)
  11. yum erase ffmpeg faac libfaac x264 libx264 libvpx
  12.  
  13. # get some essential tools if needed (some are probably already installed)
  14. yum install gcc gcc-c++ automake autoconf libtool nasm git subversion nasm pkgconfig
  15.  
  16. export LD_LIBRARY_PATH=/usr/local/lib/
  17. echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.conf
  18. ldconfig
  19.  
  20. wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
  21. tar zxf xvidcore-1.3.2.tar.gz
  22. cd xvidcore/build/generic
  23. ./configure --enable-shared
  24. make && make install
  25. ldconfig
  26. cd ../../../
  27.  
  28. wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2F&ts=1346843156&use_mirror=dfn
  29. tar zxf lame-3.99.5.tar.gz
  30. cd lame-3.99.5
  31. ./configure --enable-shared
  32. make && make install
  33. ldconfig
  34. cd ..
  35.  
  36. wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
  37. tar xzf faac-1.28.tar.gz
  38. cd faac-1.28
  39. ./bootstrap
  40. ./configure --enable-shared
  41. make && make install
  42. ldconfig
  43. cd ..
  44.  
  45. wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencore-amr%2Ffiles%2Fopencore-amr%2F&ts=1346843453&use_mirror=dfn
  46. tar xzf opencore-amr-0.1.3.tar.gz
  47. cd opencore-amr-0.1.3
  48. ./configure --enable-shared
  49. make && make install
  50. ldconfig
  51. cd ..
  52.  
  53. wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
  54. tar xzf libogg-1.3.0.tar.gz
  55. cd libogg-1.3.0
  56. ./configure --enable-shared
  57. make && make install
  58. ldconfig
  59. cd ..
  60.  
  61. wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
  62. tar xzf libvorbis-1.3.3.tar.gz
  63. cd libvorbis-1.3.3
  64. ./configure --enable-shared
  65. make && make install
  66. ldconfig
  67. cd ..
  68.  
  69. wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
  70. tar xjf libtheora-1.1.1.tar.bz2
  71. cd libtheora-1.1.1
  72. ./configure --enable-shared
  73. make && make install
  74. ldconfig
  75. cd ..
  76.  
  77. // Yasm is an assembler used by x264 and FFmpeg.
  78. wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
  79. tar xzvf yasm-1.2.0.tar.gz
  80. cd yasm-1.2.0
  81. ./configure
  82. make && make install
  83. ldconfig
  84. cd ..
  85.  
  86. git clone git://git.videolan.org/x264.git
  87. cd x264
  88. ./configure --enable-static --enable-shared
  89. make && make install
  90. ldconfig
  91. cd ..
  92.  
  93. wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.2.tar.gz
  94. tar xzvf vo-aacenc-0.1.2.tar.gz
  95. cd vo-aacenc-0.1.2
  96. ./configure --enable-shared
  97. make && make install
  98. ldconfig
  99. cd ..
  100.  
  101. git clone http://git.chromium.org/webm/libvpx.git
  102. cd libvpx
  103. ./configure --enable-shared
  104. make && make install
  105. ldconfig
  106. cd ..
  107.  
  108. wget http://zlib.net/zlib-1.2.7.tar.gz
  109. tar xzvf zlib-1.2.7.tar.gz
  110. cd zlib-1.2.7
  111. ./configure --enable-shared
  112. make && make install
  113. ldconfig
  114. cd ..
  115.  
  116. git clone git://git.videolan.org/ffmpeg.git ffmpeg
  117. cd ffmpeg
  118. ./configure --enable-version3 --enable-libopencore-amrnb \
  119. --enable-libopencore-amrwb --enable-libvpx --enable-libfaac \
  120. --enable-libmp3lame --enable-libtheora --enable-libvorbis \
  121. --enable-libx264 --enable-libxvid --enable-gpl --enable-postproc \
  122. --enable-nonfree --enable-pthreads --enable-libvo-aacenc \
  123. --enable-postproc --enable-swscale --enable-avfilter \
  124. --enable-shared --enable-runtime-cpudetect  \
  125. --disable-stripping \
  126. --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC'
  127. make
  128. make install
  129. ldconfig
clone this paste RAW Paste Data