码迷,mamicode.com
首页 > 系统相关 > 详细

视频转码: linux下用mplayer做视频转码

时间:2018-03-14 16:58:38      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:视频转码

视频转码器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做视频转码

标签:视频转码

原文地址:http://blog.51cto.com/11962757/2086804

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!