Add multi instance support: we can call many dvd2divx in parallel in the same directory.

This commit is contained in:
agibert 2008-10-07 10:11:04 +00:00
parent 108bfe811f
commit 56bb6c5d46
3 changed files with 44 additions and 14 deletions

View File

@ -1,13 +1,21 @@
# $RCSfile: ReleaseNotes.txt,v $ # $RCSfile: ReleaseNotes.txt,v $
# $Revision: 1.4 $ # $Revision: 1.5 $
# $Name: $ # $Name: $
# $Date: 2007/05/10 09:56:19 $ # $Date: 2008/10/07 10:11:04 $
# $Author: agibert $ # $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 dvd2divx V 3.0.0-1 - A. Gibert - 2007/05/10
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -1,7 +1,15 @@
#!/bin/bash #!/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 # 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 1 1 1-24 1 fr - - - - - - - - - o - - -
dvd2divx - barry_lyndon 2 1 25- 1 fr - - - - - - - - - o - - - 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 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
wait

View File

@ -2,12 +2,12 @@
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
# DVD2DivX # DVD2DivX
# #
# (C) 2004-2007 Arnaud G. Gibert # (C) 2004-2008 Arnaud G. Gibert
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
# $RCSfile: dvd2divx,v $ # $RCSfile: dvd2divx,v $
# $Revision: 1.4 $ # $Revision: 1.5 $
# $Name: $ # $Name: $
# $Date: 2007/05/10 10:00:01 $ # $Date: 2008/10/07 10:11:04 $
# $Author: agibert $ # $Author: agibert $
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
@ -55,7 +55,7 @@ slang=$8 # -|en|fr|...
vcodec=$9 # -|lavc|xvid vcodec=$9 # -|lavc|xvid
vbr=${10} vbr=${10}
abr=${11} abr=${11}
xsize=${12} # xsize=${12} # -|...
aspect=${13} # -|4/3|16/9|... aspect=${13} # -|4/3|16/9|...
stereo=${14} # y|n stereo=${14} # y|n
asrate=${15} # -|xxx (resample audio) 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) 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) 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 vpass=${19} # 1|2
threads=${20} # -|1.. threads=${20} # -|1..
#----------------------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------------------
divx_name=$divx_root-$divx_title.avi tmpdir_name=$divx_root-$divx_title.tmp
tmp_name=$divx_root-$divx_title.vob divx_name=../$divx_root-$divx_title.avi
out_name=$divx_root-$divx_title 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 "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 "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" != "-" ] if [ "$dvd_device" != "-" ]
@ -109,7 +110,11 @@ then
vf_opt="-vf-add lavcdeint" vf_opt="-vf-add lavcdeint"
fi fi
if [ "$xsize" != "-" ]
then
vf_opt="$vf_opt -vf-add scale -zoom -xy $xsize" 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" 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" 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" ] if [ "$bufferize" != "n" ]