视频转码: linux下用mplayer做视频转码
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了视频转码: linux下用mplayer做视频转码相关的知识,希望对你有一定的参考价值。
视频转码器mplayer安装使用
#!/bin/bash
#1、保证系统可以连到外网,需要下载安装包和依赖包
set -e
MPlayer="/usr/myapp"
MPVer="MPlayer-1.3.0"
mkdir $MPlayer -pv
yum install wget gcc git -y
cd /usr/local/src
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.gz
echo "export PATH="$PATH:/usr/myapp/ffmpeg/bin"" >> /etc/profile
source /etc/profile
tar xf all-20110131.tar.bz2
tar xf MPlayer-1.3.0.tar.gz
mv /usr/local/src/all-20110131 /usr/local/lib/codecs
cd /usr/local/src/$MPVer
./configure --prefix=$MPlayer/mplayer --codecsdir=/usr/local/lib/codecs && make && make install
if [[ $? == 0 ]];then
cd $MPlayer/mplayer/bin && ls
echo -e "\033[31m Usage:\n\t 路径:/usr/myapp/mplayer/bin/ \033[0m"
echo -e "\033[31m Usage:\n\t mencoder 1.rmvb -o output.avi -oac mp3lame -lameopts cbr:br=32 -ovc x264 -x264encopts bitrate=440 -vf scale=448:-3 \033[0m"
echo "export PATH="$PATH:/usr/myapp/mplayer/bin"" >> /etc/profile
source /etc/profile
#mencoder 1.rmvb -o output.avi -oac mp3lame -lameopts cbr:br=32 -ovc x264 -x264encopts bitrate=440 -vf scale=448:-3
else
break
fi
以上是关于视频转码: linux下用mplayer做视频转码的主要内容,如果未能解决你的问题,请参考以下文章