-
-
Save mustafaturan/7053900 to your computer and use it in GitHub Desktop.
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
tar xzvf yasm-1.2.0.tar.gz | |
cd yasm-1.2.0 | |
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" | |
make | |
make install | |
make distclean | |
. ~/.bash_profile | |
cd ~/ffmpeg_sources | |
git clone --depth 1 https://git.videolan.org/git/x264.git | |
cd x264 | |
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git | |
cd fdk-aac | |
autoreconf -fiv | |
./configure --prefix="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz | |
tar xzvf lame-3.99.5.tar.gz | |
cd lame-3.99.5 | |
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
curl -O http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz | |
tar xzvf opus-1.0.3.tar.gz | |
cd opus-1.0.3 | |
./configure --prefix="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz | |
tar xzvf libogg-1.3.1.tar.gz | |
cd libogg-1.3.1 | |
./configure --prefix="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz | |
tar xzvf libvorbis-1.3.3.tar.gz | |
cd libvorbis-1.3.3 | |
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared | |
make | |
make install | |
make distclean | |
cd ~/ffmpeg_sources | |
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx | |
cd libvpx | |
./configure --prefix="$HOME/ffmpeg_build" --disable-examples | |
make | |
make install | |
make clean | |
cd ~/ffmpeg_sources | |
curl -O 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 --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-examples --disable-shared --disable-sdltest --disable-vorbistest | |
make | |
make install | |
make distclean | |
yum -y install freetype-devel speex-devel | |
cd ~/ffmpeg_sources | |
git clone --depth 1 git://source.ffmpeg.org/ffmpeg | |
cd ffmpeg | |
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" | |
export PKG_CONFIG_PATH | |
./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs="-ldl" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfreetype --enable-libspeex --enable-libtheora | |
make | |
make install | |
make distclean | |
hash -r | |
. ~/.bash_profile | |
cd ~/ffmpeg_sources/ffmpeg/tools | |
make qt-faststart | |
cp qt-faststart /usr/bin | |
ldconfig | |
cd |
cd ~/ffmpeg_sources
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples
make
make install
make clean
not working
Correct code for libvpx is:
git clone https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
git checkout tags/v.1.5.0
Yeah!
@Pleskan: small error in the checkout command, the tag is v1.5.0 not v.1.5.0 eg
git checkout tags/v1.5.0
Also, if you already have yasm>1.2 on the system, so are skipping the install for it in this script, but the configure script for libvpx says it can't find yasm. Your issue may be that you dont have 'which' installed.
- this can happen in very minimally installed images (Docker, in my case) and was really confusing.. until I saw that configure used 'which' to test for yasm.
in lines 61-77 installs libvorbis-1.3.3 twice?
Thanks so much!! Most helpful.
Worked great on Centos 7!
Thanks!
On Centos 6.8 64bit
Meet ERROR: libvpx decoder version must be >=0.9.1
So, compile libvpx v1.5.0, error found: nasm -Ox -f elf64 does not support section alignment (nasm <=2.08?)
Install nasm-2.12.02 from this
Continue compile libvpx v1.5.0
Works for me.
git clone https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
git checkout tags/v1.3.0
./configure --prefix="$HOME/ffmpeg_build" --disable-examples
make
make install
Works for me.
Worked for me on CentOS 6, without any modifications.
Thanks.
Thank a lot.
for libvpx, on make error, add --disable-unit-tests
to configure
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests
works for me.
getting this while running the command make on ffmpeg
libavformat/movenc.c:1943: warning: ‘codec’ is deprecated (declared at libavformat/avformat.h:893)
Merhaba video yükleniyor ama video ön izlemesi çıkmıyor eskiden yapabiliyordum ama şimdi hatırlamıyorum video önizleme resmi nasıl çıkabilir yardım edermisiniz?
Ffmpeg-php will not compile.
I get to ./configure && make and it gives me the error:
checking for ffmpeg headers...
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
Please let me know the fix, I am using CENTOS 7.3 x86_64 kvm – na WHM 62.0 (build 2)
Thanks so much. I was stuck forever trying to add repos and rpms that don't exist anymore and was not looking forward to compiling. Saved me lots of time!
Thank you very much, your script helped me a lot. However I could not run it as a whole (unless I ran it as root). I had to split it in several parts and run some of them as root. Those include the calls to yum as well as the two last commands (cp qt-faststart /usr/bin; ldconfig
). I also had to initially create a .tmp folder in my home directory and bind it to an environment variable named TMPDIR. After those few adjustments, everything worked fine. My environment is a CentOS 6.7 64 bits server.
kindly add flag :: --enable-shared
How To Install FFmpeg and FFmpeg-PHP Extension on CentOS 7?
Works for me. CentOS 7. Thank you!
My Nasm is out of date 2.10 cant find on google how to update to latest which is 2.14
curl -L
need -L option, some url has moved
If you see similar errors as shown below when compiling libvpx:
vp9/common/x86/vp9_subpixel_8t_ssse3.asm:1002: error: invalid combination of opcode and operands
make[1]: *** [vp9/common/x86/vp9_subpixel_8t_ssse3.asm.o] Error 1
make: *** [.DEFAULT] Error 2
It's because NASM is complaining about some problematic mnemounics, instead use yasm:
cd ~/ffmpeg_sources
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx
cd libvpx
PATH="$PATH:$HOME/bin" ./configure --prefix="$HOME/ffmpeg_build" --disable-examples
PATH="$PATH:$HOME/bin" make
PATH="$PATH:$HOME/bin" make install
PATH="$PATH:$HOME/bin" make clean
However, even after I've managed to compile everything, and followed the entire script down to the last bit using new URLs for some of the libs (both make and make install worked on ffmpeg)
I still cannot run ffmpeg, it says command not found, any ideas?
Hi,
can I ask if this will update ffmpeg to version 2.8 and higher? I have 2.5x and need to have at least 2.8.
Secondly, do I just paste the entire code above into Putty SSH and it will install? If not, is there any kind of 'idiots guide' for upgrading?
Kind regards
Hi,
I am getting this error
ERROR: libmp3lame >= 3.98.3 not found
I tried "&& require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame -lm" at the end of the config string.
Please help me.
regards
This is not available:
git clone --depth 1 git://git.videolan.org/x264
Use this:
git clone --depth 1 http://git.videolan.org/git/x264
Thanks a lot for the script.
I have the following error after running it:
ERROR: opus not found using pkg-config
Would really appreciate some help..
Please change "curl -O " to "wget " and "tar xzvf" to "tar -xvf"
libvpx enabled but no supported decoders found
centos 6 i386
sweet, thanks for this script!