RHEL6.4安装mplayer,ffmpeg视音频转码器

hello~~~~以下所有安装包均可在本站下载,下载地址:http://www.chocolee.cn/download/ffmpeg-Mplayer/

需求:

一、安装mplayer 不用安装皮肤,能使用里面的mencoder即可,要能够从rmvb转换到avi
二、安装ffmpeg 要支持xvid、x264、mp3、ogg、amr、faac

安装ffmpeg

libfaac faac格式的编解码包
libmp3lame mp3格式编解码包
libopencore-amrwb libopencore-amrnb amr格式编解码包
libx264 x264格式编解码包
libvorbis ogg格式编解码包
libxvid xvid格式编解码包

#解决libvorbis依赖
yum install automake
rpm -ivh libogg-devel-1.1.4-2.1.el6.x86_64.rpm
rpm -ivh libvorbis-devel-1.2.3-4.el6_2.1.x86_64.rpm

开始安装(有些包下载可能需要翻墙)

#faac
wget http://softlayer-dal.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
tar zxf faac-1.28.tar.gz
cd faac-1.28
sed -i '124s#C#C++#g' common/mp4v2/mpeg4ip.h
sed -i '126s#^#const #g' common/mp4v2/mpeg4ip.h
./configure --prefix=/usr/local/
make && make install

#lame
wget http://colocrossing.dl.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 --prefix=/usr/local/
make && make install

#opencore-amr
wget http://iweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
tar zxf opencore-amr-0.1.3.tar.gz
cd opencore-amr
./configure --prefix=/usr/local/
make && make install

#yasm(x264 configure need)
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar zxf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix=/usr/local/
make && make install

#x264
wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar jxf last_x264.tar.bz2
cd x264-snapshot-20141124-2245
./configure --prefix=/usr/local/  --enable-static --enable-shared
make && make install

#ogg
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
xz -d libogg-1.3.2.tar.xz
tar xf libogg-1.3.2.tar
cd libogg-1.3.2
./configure --prefix=/usr/local/
make && make install

#xvid
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 --prefix=/usr/local/
make && make install

#ffmpeg
wget http://ffmpeg.org/releases/ffmpeg-2.4.3.tar.bz2
tar jxf ffmpeg-2.4.3.tar.bz2
cd ffmpeg-2.4.3
./configure --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib
make    #wait about 10 minutes
make install

安装mplayer

tar xcf MPlayer-1.1.1.tar
cd MPlayer-1.1.1
./configure
make
make install

加载动态链接库

echo '/usr/local/lib/' >>/etc/ld.so.conf

ldconfig
cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib/

测试

视频测试

mencoder a.rmvb -oac mp3lame -lameopts preset=64 -ovc xvid -xvidencopts bitrate=600 -of avi -o a.avi 

音频测试
ffmpeg -i 1.mp3 -ac 1 -ar 8000 1.amr

 

linuxlogo


发表评论

登录 后发表评论.