#usage <scriptname> inputfile outputfile
BITRATE=450
###########generated muxed video / sound##########
~/install/mencoder_psp/install/mencoder "$1" -vf scale=480:272 -ovc x264 -x264encopts bitrate=$BITRATE:pass=1:turbo=1:threads=2 -srate 44100 -oac mp3lame -lameopts vol=0:mode=0:cbr:br=128 -o /dev/null
~/install/mencoder_psp/install/mencoder "$1" -vf scale=480:272 -ovc x264 -x264encopts bitrate=$BITRATE:pass=2 -srate 44100 -oac mp3lame -lameopts vol=0:mode=0:cbr:br=128 -o "$2".temp
###########rename x264 file##########
mv x264file.txt "$2".264.txt
###########copy video out##########
~/install/mencoder_psp/install/mencoder "$2".temp -ovc copy -nosound -o "$2".264
###########copy sound out##########
~/install/mencoder_psp/install/mencoder "$2".temp -srate 44100 -oac copy -ovc copy -of rawaudio -o "$2".mp3
##########generate pmp file##########
~/install/pmpmux/pmp_muxer_avc.pl -v "$2".264 -a "$2".mp3 -o "$2".pmp -w 480 -h 272
#clean up:
if [ -f "$2".pmp ]
then
echo "Found PMP. Cleaning up temp files."
rm "$2".264.txt "$2".264 "$2".mp3 "$2".temp
exit 0
fi
echo "**********************************************"
echo "PMP file wasn't found. Temp files not deleted."
echo "**********************************************"
avi to pmp.x264.mp4 脚本
最新推荐文章于 2019-10-09 14:30:02 发布