Created
June 2, 2014 07:36
-
-
Save shun115/3529b381fae4ab77f853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
exec > >(tee /var/log/ffmpeg.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm | |
yum remove libvpx libogg libvorbis libtheora libx264 x264 ffmpeg | |
yum install --enablerepo=epel gcc gcc-c++ automake autoconf libtool yasm nasm -y | |
mkdir /root/lib | |
cd /root/lib | |
#### 基本的なコーデック | |
cd /root/lib | |
wget http://www8.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2 | |
bunzip2 all-20110131.tar.bz2; tar xvf all-20110131.tar | |
mkdir /usr/local/lib/codecs/ | |
mkdir /usr/local/lib64/codecs/ | |
cp all-20110131/* /usr/local/lib/codecs/ | |
cp all-20110131/* /usr/local/lib64/codecs/ | |
chmod -R 755 /usr/local/lib/codecs/ | |
chmod -R 755 /usr/local/lib64/codecs/ | |
#### ライブラリパスを通す | |
cat >> /etc/ld.so.conf.d/ffmpeg.conf <<EOS | |
/usr/local/lib | |
EOS | |
ldconfig | |
#### Xvid | |
cd /root/lib | |
wget http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz | |
tar -zxf xvidcore-1.3.3.tar.gz | |
cd xvidcore/build/generic | |
./configure | |
make | |
make install | |
ldconfig | |
#### LAME | |
cd /root/lib | |
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz | |
tar -zxf lame-3.98.4.tar.gz | |
cd lame-3.98.4 | |
./configure | |
make | |
make install | |
ldconfig | |
#### FAAC | |
yum install faac-devel -y | |
ldconfig | |
#### OpenCore AMR | |
cd /root/lib | |
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz | |
tar -xzf opencore-amr-0.1.2.tar.gz | |
cd opencore-amr-0.1.2 | |
./configure | |
make | |
make install | |
ldconfig | |
#### LibOgg | |
cd /root/lib | |
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz | |
tar xzvf libogg-1.3.2.tar.gz | |
cd libogg-1.3.2 | |
./configure | |
make | |
make install | |
ldconfig | |
#### Libvorbis | |
cd /root/lib | |
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz | |
tar xzvf libvorbis-1.3.4.tar.gz | |
cd libvorbis-1.3.4 | |
./configure | |
make | |
make install | |
ldconfig | |
#### Libtheora | |
cd /root/lib | |
wget 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 | |
make | |
make install | |
ldconfig | |
#### Libvpx | |
cd /root/lib | |
git clone http://git.chromium.org/webm/libvpx.git | |
cd libvpx | |
./configure --enable-shared --extra-cflags=-fPIC | |
make | |
make install | |
ldconfig | |
#### AACenc | |
cd /root/lib | |
wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.3.tar.gz | |
tar xzvf vo-aacenc-0.1.3.tar.gz | |
cd vo-aacenc-0.1.3 | |
./configure --enable-shared | |
make | |
make install | |
ldconfig | |
#### X264 | |
cd /root/lib | |
git clone git://git.videolan.org/x264.git | |
cd x264 | |
./configure --enable-shared --extra-cflags=-fPIC --extra-asflags=-D__PIC__ | |
make | |
make install | |
ldconfig | |
#### ffmpeg | |
ldconfig | |
cd /root/lib | |
wget http://www.ffmpeg.org/releases/ffmpeg-1.0.9.tar.gz | |
tar xvzf ffmpeg-1.0.9.tar.gz | |
cd ffmpeg-1.0.9 | |
./configure --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --extra-cflags=-fPIC | |
make | |
make install | |
ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment