-
-
Save helpsquad/1b143def257f7bb3dcc162eb5cff2d14 to your computer and use it in GitHub Desktop.
#script used on serversquad servers -> www.serversquad.eu | |
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel -y | |
yum install ruby rubygems -y | |
#install flvtool2 | |
gem install flvtool2 | |
#install yamdi | |
cd /usr/local/src | |
wget https://sourceforge.net/projects/yamdi/files/yamdi/1.9/yamdi-1.9.tar.gz | |
tar xzf yamdi-1.9.tar.gz | |
cd yamdi-1.9 | |
gcc yamdi.c -o yamdi -O2 -Wall | |
strip yamdi | |
cp yamdi /usr/bin/yamdi | |
#install ffmpeg | |
mkdir /home/ffmpeg_sources | |
cd /home/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="/usr/bin" | |
make | |
make install | |
make distclean | |
export "PATH=$PATH:/usr/bin" | |
cd /home/ffmpeg_sources | |
git clone --depth 1 git://github.com/mirror/x264.git | |
cd x264 | |
./configure --prefix="/home/ffmpeg_build" --bindir="/usr/bin" --enable-static | |
make | |
make install | |
make distclean | |
cd /home/ffmpeg_sources | |
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz | |
tar xzf faac-1.28.tar.gz | |
cd faac-1.28 | |
./bootstrap | |
./configure --enable-shared | |
make && make install | |
ldconfig | |
make distclean | |
cd /home/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 /home/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="/usr/bin" --disable-shared --enable-nasm | |
make | |
make install | |
make distclean | |
cd /home/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 /home/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 /home/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 /home/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 /home/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 /home/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="/usr/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 | |
cd /home/ffmpeg_sources/ffmpeg/tools | |
make qt-faststart | |
cp qt-faststart /usr/bin | |
ldconfig | |
cd |
This script doesn't work on centos 7.3 I get errors below.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 460 100 460 0 0 1301 0 --:--:-- --:--:-- --:--:-- 1303
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
./ffmpeg_install.sh: line 104: cd: libtheora-1.1.1: No such file or directory
./ffmpeg_install.sh: line 105: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target install'. Stop. make: *** No rule to make target
distclean'. Stop.
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
- base: centos.t-2.net
- epel: ftp.arnes.si
- extras: centos.t-2.net
- nux-dextop: mirror.li.nux.ro
- updates: centos.t-2.net
Package freetype-devel-2.4.11-15.el7.x86_64 already installed and latest version
Package speex-devel-1.2-0.19.rc1.el7.x86_64 already installed and latest version
Nothing to do
fatal: destination path 'ffmpeg' already exists and is not an empty directory.
ERROR: opus not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Makefile:2: ffbuild/config.mak: No such file or directory
Makefile:40: /tools/Makefile: No such file or directory
Makefile:41: /ffbuild/common.mak: No such file or directory
Makefile:90: /libavutil/Makefile: No such file or directory
Makefile:90: /ffbuild/library.mak: No such file or directory
Makefile:92: /fftools/Makefile: No such file or directory
Makefile:93: /doc/Makefile: No such file or directory
Makefile:94: /doc/examples/Makefile: No such file or directory
Makefile:159: /tests/Makefile: No such file or directory
make: *** No rule to make target /tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:90: /libavutil/Makefile: No such file or directory Makefile:90: /ffbuild/library.mak: No such file or directory Makefile:92: /fftools/Makefile: No such file or directory Makefile:93: /doc/Makefile: No such file or directory Makefile:94: /doc/examples/Makefile: No such file or directory Makefile:159: /tests/Makefile: No such file or directory make: *** No rule to make target
/tests/Makefile'. Stop.
Makefile:2: ffbuild/config.mak: No such file or directory
Makefile:40: /tools/Makefile: No such file or directory
Makefile:41: /ffbuild/common.mak: No such file or directory
Makefile:90: /libavutil/Makefile: No such file or directory
Makefile:90: /ffbuild/library.mak: No such file or directory
Makefile:92: /fftools/Makefile: No such file or directory
Makefile:93: /doc/Makefile: No such file or directory
Makefile:94: /doc/examples/Makefile: No such file or directory
Makefile:159: /tests/Makefile: No such file or directory
make: *** No rule to make target /tests/Makefile'. Stop. make:
qt-faststart' is up to date.
thanks for sharing that helps a lot