From 56bb6c5d460aef219deab425073c68d7ea333703 Mon Sep 17 00:00:00 2001 From: agibert Date: Tue, 7 Oct 2008 10:11:04 +0000 Subject: [PATCH] Add multi instance support: we can call many dvd2divx in parallel in the same directory. --- ReleaseNotes.txt | 12 ++++++++++-- barry_lyndon_example | 14 +++++++++++--- dvd2divx | 32 +++++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 4486ae9..75f203a 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,13 +1,21 @@ # $RCSfile: ReleaseNotes.txt,v $ -# $Revision: 1.4 $ +# $Revision: 1.5 $ # $Name: $ -# $Date: 2007/05/10 09:56:19 $ +# $Date: 2008/10/07 10:11:04 $ # $Author: agibert $ +-------------------------------------------------------------------------------- +dvd2divx V 3.1.0-1 - A. Gibert - 2008/10/07 +-------------------------------------------------------------------------------- + +Add multi instance support: we can call many dvd2divx in parallel in the same directory. + + + -------------------------------------------------------------------------------- dvd2divx V 3.0.0-1 - A. Gibert - 2007/05/10 -------------------------------------------------------------------------------- diff --git a/barry_lyndon_example b/barry_lyndon_example index fd9306b..a81fbe0 100755 --- a/barry_lyndon_example +++ b/barry_lyndon_example @@ -1,7 +1,15 @@ #!/bin/bash # dvd_device divx_root divx_title dvd_title chapter angle alang slang vcodec vbr abr xsize aspect stereo asrate deint buffer apass vpass threads #-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +# Mono Instance +#dvd2divx - barry_lyndon 1 1 1-24 1 fr - - - - - - - - - o - - - +#dvd2divx - barry_lyndon 2 1 25- 1 fr - - - - - - - - - o - - - +#dvd2divx - barry_lyndon 1 - - - - - lavc 920 128 480 4/3 y - n s y 2 4 +#dvd2divx - barry_lyndon 2 - - - - - lavc 920 128 480 4/3 y - n s y 2 4 +# +# Multi Instance dvd2divx - barry_lyndon 1 1 1-24 1 fr - - - - - - - - - o - - - -dvd2divx - barry_lyndon 2 1 25- 1 fr - - - - - - - - - o - - - -dvd2divx - barry_lyndon 1 - - - - - lavc 920 128 480 4/3 y - n s y 2 4 -dvd2divx - barry_lyndon 2 - - - - - lavc 920 128 480 4/3 y - n s y 2 4 +dvd2divx - barry_lyndon 2 1 25- 1 fr - lavc 920 128 480 4/3 y - n s y 2 4 & +dvd2divx - barry_lyndon 1 - - - - - lavc 920 128 480 4/3 y - n s y 2 4 & + +wait diff --git a/dvd2divx b/dvd2divx index 074f81a..9a3505c 100755 --- a/dvd2divx +++ b/dvd2divx @@ -2,12 +2,12 @@ #----------------------------------------------------------------------------------------------------------------------------------- # DVD2DivX # -# (C) 2004-2007 Arnaud G. Gibert +# (C) 2004-2008 Arnaud G. Gibert #----------------------------------------------------------------------------------------------------------------------------------- # $RCSfile: dvd2divx,v $ -# $Revision: 1.4 $ +# $Revision: 1.5 $ # $Name: $ -# $Date: 2007/05/10 10:00:01 $ +# $Date: 2008/10/07 10:11:04 $ # $Author: agibert $ #----------------------------------------------------------------------------------------------------------------------------------- @@ -55,7 +55,7 @@ slang=$8 # -|en|fr|... vcodec=$9 # -|lavc|xvid vbr=${10} abr=${11} -xsize=${12} # +xsize=${12} # -|... aspect=${13} # -|4/3|16/9|... stereo=${14} # y|n asrate=${15} # -|xxx (resample audio) @@ -63,19 +63,20 @@ deint=${16} # y|n bufferize=${17} # o|y|n|s (only: bufferize and stop | yes: bufferize an continue | no: read directly from disk | skip: bufferize previously done) apass=${18} # o|y|n|s (only: compress and stop | yes: compress and continue | no: compress mp3 whith video | skip: mp3 previously compressed) vpass=${19} # 1|2 -threads=${20} # -|1.. +threads=${20} # -|1.. #----------------------------------------------------------------------------------------------------------------------------------- -divx_name=$divx_root-$divx_title.avi -tmp_name=$divx_root-$divx_title.vob -out_name=$divx_root-$divx_title +tmpdir_name=$divx_root-$divx_title.tmp +divx_name=../$divx_root-$divx_title.avi +tmp_name=../$divx_root-$divx_title.vob +out_name=../$divx_root-$divx_title echo "device: [$dvd_device] DivX: [$divx_name] title: ($title) chapter: ($chapter) angle: ($angle) alang: ($alang) slang: ($slang)" echo "vcodec: [$vcodec] vbr: ($vbr) abr: ($abr) xsize: ($xsize) aspect: ($aspect) stereo: ($stereo) asrate: ($asrate) deint: ($deint)" -echo "bufferize: ($bufferize) apass: ($apass) vpass: ($vpass) theards: ($threads)" +echo "bufferize: ($bufferize) apass: ($apass) vpass: ($vpass) threards: ($threads)" if [ "$dvd_device" != "-" ] @@ -109,7 +110,11 @@ then vf_opt="-vf-add lavcdeint" fi +if [ "$xsize" != "-" ] +then vf_opt="$vf_opt -vf-add scale -zoom -xy $xsize" +fi + read_opt="$device_opt dvd://$title -chapter $chapter -dvdangle $angle -alang $alang $slang_opt" audio_opt="-oac mp3lame -lameopts cbr:br=$abr:aq=0:mode=$stereo_mode $aresample" @@ -155,6 +160,15 @@ fi +#----------------------------------------------------------------------------------------------------------------------------------- + +mkdir $tmpdir_name +cd $tmpdir_name + + + + + #----------------------------------------------------------------------------------------------------------------------------------- if [ "$bufferize" != "n" ]