centos 6.4 32bit安装ffmpeg手记

LINUX相关 bablue 暂无评论

mkdir /ffmpeg_sources

cd /ffmpeg_sources
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --bindir="/usr/local/bin"
make
make install
make distclean
cd /ffmpeg_sources
git clone --depth 1 git://git.videolan.org/x264
cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="/usr/local/bin" --enable-static
make
make install
make distclean
cd /ffmpeg_sources
hg clone https://bitbucket.org/multicoreware/x265
cd /ffmpeg_sources/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install
cd /ffmpeg_sources
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
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="/usr/local/bin" --disable-shared --enable-nasm
make
make install
make distclean
cd /ffmpeg_sources
git clone https://github.com/xiph/opus.git
cd opus
autoreconf -fiv
./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.2.tar.gz
tar xzvf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./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.4.tar.gz
tar xzvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
LDFLAGS="-L$HOME/ffmeg_build/lib" CPPFLAGS="-I$HOME/ffmpeg_build/include" ./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.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples
make
make install
make clean
cd /ffmpeg_sources
git clone http://source.ffmpeg.org/git/ffmpeg.git(国内https://git.videolan.org/git/ffmpeg.git)
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="/usr/local/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
make
make install
make distclean
hash -r



ffmpeg -i /root/0.flv -y -ab 32 -ar 22050 -qscale 10 -s 640*480 -r 15 /root/0.mp4


CentOS yum方式安装ffmpeg

系统为CentOS 6.4,自己编译ffmpeg和众多解码器太痛苦了,yum方式安装ffmpeg的解码器很全,先用用看。

1、安装所需软件

yum install -y automake autoconf libtool gcc gcc-c++

2、安装第三方更新源

rpm -ivh http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

3、安装ffmpeg

yum install ffmpeg ffmpeg-devel

会自动安装众多解码器,ffmpeg版本为0.6.5-1.el6.rf。看了下yum安装的解码器版本还不是很旧,但是ffmpeg版本较老。

下载地址:(已被隐藏)关注下面的微信公众号后,秘密入口: 福利视频 福利图片(不关注或关注后取消进入无效)

宅男的福音:公众号图说视界(微信号:tushuosj)或扫二维码进行关注,每天推送一大波美女等你来(打开微信-点击右上角的+ -添加朋友-公众号-搜索图说视界)

qrcode_for_gh_952f766aa7b3_430.jpg

转载请注明:轻轻的插插 » centos 6.4 32bit安装ffmpeg手记

喜欢 ()or分享