- Fix audio encoding in fvp mode and 2a or 2s video mode,

- Fix video aspect by using "-force-avi-aspect".
This commit is contained in:
agibert 2010-02-16 14:29:56 +00:00
parent b8429d3d99
commit 1e50d14892

View File

@ -5,9 +5,9 @@
# (C) 2004-2009 Arnaud G. Gibert
#-----------------------------------------------------------------------------------------------------------------------------------
# $RCSfile: dvd2divx,v $
# $Revision: 1.10 $
# $Revision: 1.11 $
# $Name: $
# $Date: 2009/10/20 07:08:49 $
# $Date: 2010/02/16 14:29:56 $
# $Author: agibert $
#-----------------------------------------------------------------------------------------------------------------------------------
@ -193,7 +193,7 @@ then
then
audio_opt1="$audio_comp_opt"
else
if [ "$video" == "2" ]
if [ "$video" != "n" ]
then
if [ "$audio" == "avp" ]
then
@ -221,6 +221,8 @@ fi
# Video Setup
#-----------------------------------------------------------------------------------------------------------------------------------
gen_opt=""
video_lavc_header_11="-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$vbr"
video_lavc_header_21="-ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=$vbr"
video_lavc_header_22="-ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=$vbr"
@ -290,6 +292,7 @@ then
else
video_opt1=$video_opt1":aspect=$aspect"
video_opt2=$video_opt2":aspect=$aspect"
gen_opt="${gen_opt} -force-avi-aspect ${aspect}"
fi
if [ "$threads" != "-" ]
@ -353,18 +356,18 @@ then
if [ "$video" == "1" ]
then
echo "Compressing DivX..."
mencoder $read_opt2 $audio_opt1 $video_opt1 $vf_opt -o $divx_name >$out_name.3.log 2>&1
mencoder $read_opt2 $gen_opt $audio_opt1 $video_opt1 $vf_opt -o $divx_name >$out_name.3.log 2>&1
else
echo "Compressing DivX pass 1..."
mencoder $read_opt2 $audio_opt1 $video_opt1 $vf_opt -o /dev/null >$out_name.3.log 2>&1
mencoder $read_opt2 $gen_opt $audio_opt1 $video_opt1 $vf_opt -o /dev/null >$out_name.3.log 2>&1
echo "Compressing DivX pass 2..."
mencoder $read_opt2 $audio_opt2 $video_opt2 $vf_opt -o $divx_name >$out_name.4.log 2>&1
mencoder $read_opt2 $gen_opt $audio_opt2 $video_opt2 $vf_opt -o $divx_name >$out_name.4.log 2>&1
fi
else
if [ "$audio" == "ap" ]
then
echo "Compressing DivX audio..."
mencoder $read_opt2 $audio_opt1 -ovc copy -o $divx_name >$out_name.3.log 2>&1
mencoder $read_opt2 $gen_opt $audio_opt1 -ovc copy -o $divx_name >$out_name.3.log 2>&1
fi
fi