From 1e50d1489266b434dd9780c48009b4ec5322b08d Mon Sep 17 00:00:00 2001 From: agibert Date: Tue, 16 Feb 2010 14:29:56 +0000 Subject: [PATCH] - Fix audio encoding in fvp mode and 2a or 2s video mode, - Fix video aspect by using "-force-avi-aspect". --- dvd2divx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dvd2divx b/dvd2divx index e003af2..bd341ed 100755 --- a/dvd2divx +++ b/dvd2divx @@ -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