- Add x264 codec support,
- Add extra vcodec option support (vopts), - Add volume control option.
This commit is contained in:
parent
4466a01b8c
commit
9e72c0a187
@ -1,7 +1,7 @@
|
||||
# $RCSfile: ReleaseNotes.txt,v $
|
||||
# $Revision: 1.6 $
|
||||
# $Revision: 1.7 $
|
||||
# $Name: $
|
||||
# $Date: 2009/01/06 00:17:12 $
|
||||
# $Date: 2009/05/23 00:09:55 $
|
||||
# $Author: agibert $
|
||||
|
||||
|
||||
@ -9,13 +9,19 @@
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
dvd2divx V 4.0.0-1 - A. Gibert - 2000/01/05
|
||||
dvd2divx V 4.0.0-1 - A. Gibert - 2009/05/24
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
- Major code rewrite,
|
||||
- New command line interface,
|
||||
- Args major reorganisation,
|
||||
- New video quality presetings (vqual).
|
||||
- Add x264 codec support,
|
||||
- New video quality presetings (vqual),
|
||||
- Add crop support,
|
||||
- Add OSD sub title support,
|
||||
- Add extra vcodec option support (vopts),
|
||||
- Add id support in alang option,
|
||||
- Add volume control option.
|
||||
|
||||
|
||||
|
||||
|
65
dvd2divx
65
dvd2divx
@ -5,9 +5,9 @@
|
||||
# (C) 2004-2009 Arnaud G. Gibert
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
# $RCSfile: dvd2divx,v $
|
||||
# $Revision: 1.8 $
|
||||
# $Revision: 1.9 $
|
||||
# $Name: $
|
||||
# $Date: 2009/02/25 18:04:40 $
|
||||
# $Date: 2009/05/23 00:09:55 $
|
||||
# $Author: agibert $
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
# Usage exemple
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
# #!/bin/bash
|
||||
# # divx_root divx_title input dvd_device dvd_title chapter angle alang slang audio abr asrate stereo sub video vcodec vqual vbr crop xsize aspect deint threads
|
||||
# #-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# dvd2divx cobra 1 dbo /dev/cdrom1 10 1- 1 fr - - - - - - - - - - - - - - -
|
||||
# dvd2divx cobra 1 b - - - - - - fvp 128 - n - 2a xvid 3 1000 - 480 4/3 y 4
|
||||
# # divx_root divx_title input dvd_device dvd_title chapter angle alang slang audio abr asrate stereo volume sub video vcodec vqual vbr crop xsize aspect deint threads vopts
|
||||
# #---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# dvd2divx cobra 1 dbo /dev/cdrom1 10 1- 1 fr - - - - - - - - - - - - - - - -
|
||||
# dvd2divx cobra 1 b - - - - - - fvp 128 - n 10 - 2a xvid 3 1000 - 480 4/3 y 4 cartoon
|
||||
|
||||
|
||||
|
||||
@ -54,19 +54,20 @@ audio=${10} # ap|avp|fvp|n (ap: compress audio during audio pass | avp: comp
|
||||
abr=${11} #
|
||||
asrate=${12} # -|xxx (resample audio)
|
||||
stereo=${13} # y|n
|
||||
volume=${14} # -|... # other acodec options
|
||||
#------------------------------------------------------------------------------
|
||||
sub=${14} # -|f|o (-: no subtitles | f: file subtitles | o: OSD subtitles)
|
||||
sub=${15} # -|f|o (-: no subtitles | f: file subtitles | o: OSD subtitles)
|
||||
#------------------------------------------------------------------------------
|
||||
video=${15} # 1|2a|2s|n (1: compress video in 1 pass | 2a: compress video in 2 assymetric passes | 2s: compress video in 2 symetric passes | no: use input video stream)
|
||||
vcodec=${16} # -|lavc|xvid
|
||||
vquality=${17} # 0|1|2|3 (0: realtime | 1: fast | 2: High quality | 3: very high quality)
|
||||
vbr=${18} #
|
||||
crop=${19} # -|width:height:x:y
|
||||
xsize=${20} # -|...
|
||||
aspect=${21} # -|4/3|16/9|...
|
||||
deint=${22} # y|n
|
||||
threads=${23} # -|1..
|
||||
|
||||
video=${16} # 1|2a|2s|n (1: compress video in 1 pass | 2a: compress video in 2 assymetric passes | 2s: compress video in 2 symetric passes | no: use input video stream)
|
||||
vcodec=${17} # -|lavc|xvid|x264
|
||||
vquality=${18} # 0|1|2|3 (0: realtime | 1: fast | 2: High quality | 3: very high quality)
|
||||
vbr=${19} #
|
||||
crop=${20} # -|width:height:x:y
|
||||
xsize=${21} # -|...
|
||||
aspect=${22} # -|4/3|16/9|...
|
||||
deint=${23} # y|n
|
||||
threads=${24} # -|1..
|
||||
vopts=${25} # -|... # other vcodec options
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -78,9 +79,9 @@ out_name=../$divx_root-$divx_title
|
||||
|
||||
echo "DivX: [$divx_name] title: ($title)"
|
||||
echo "Input: [$input] device: [$dvd_device] title: ($title) chapter: ($chapter) angle: ($angle) alang: ($alang) slang: ($slang)"
|
||||
echo "Audio: [$audio] abr: ($abr) asrate: ($asrate) stereo: ($stereo)"
|
||||
echo "Audio: [$audio] abr: ($abr) asrate: ($asrate) stereo: ($stereo) volume: (${volume})"
|
||||
echo "Sub: [$sub]"
|
||||
echo "Video: [$video] vcodec: [$vcodec] vquality: [$vquality] vbr: ($vbr) crop: ($crop) xsize: ($xsize) aspect: ($aspect) deint: ($deint) threards: ($threads)"
|
||||
echo "Video: [$video] vcodec: [$vcodec] vquality: [$vquality] vbr: ($vbr) crop: ($crop) xsize: ($xsize) aspect: ($aspect) deint: ($deint) threards: ($threads) vopts: [${vopts}]"
|
||||
|
||||
|
||||
|
||||
@ -166,7 +167,7 @@ if [ "$asrate" == "-" ]
|
||||
then
|
||||
aresample=""
|
||||
else
|
||||
aresample="-srate $asrate -af lavcresample=$asrate"
|
||||
aresample="-srate $asrate -af-add lavcresample=$asrate"
|
||||
fi
|
||||
|
||||
if [ "$stereo" == "y" ]
|
||||
@ -176,7 +177,14 @@ else
|
||||
stereo_mode=3
|
||||
fi
|
||||
|
||||
audio_comp_opt="-oac mp3lame -lameopts cbr:br=$abr:aq=0:mode=$stereo_mode $aresample"
|
||||
if [ "${volume}" == "-" ]
|
||||
then
|
||||
vol_opt=""
|
||||
else
|
||||
vol_opt="-af-add volume=$volume:0"
|
||||
fi
|
||||
|
||||
audio_comp_opt="-oac mp3lame -lameopts cbr:br=$abr:aq=0:mode=$stereo_mode $aresample $vol_opt"
|
||||
audio_copy_opt="-oac copy"
|
||||
|
||||
if [ "$audio" != "n" ]
|
||||
@ -226,6 +234,15 @@ video_xvid_body_1="turbo:vhq=0"
|
||||
video_xvid_body_2="vhq=2:bvhq=1:chroma_opt:quant_type=mpeg"
|
||||
video_xvid_body_3="chroma_opt:vhq=4:bvhq=1:quant_type=mpeg"
|
||||
|
||||
video_x264_header_11="-ovc x264 -x264encopts bitrate=$vbr"
|
||||
video_x264_header_21="-ovc x264 -x264encopts pass=1:bitrate=$vbr"
|
||||
video_x264_header_22="-ovc x264 -x264encopts pass=2:bitrate=$vbr"
|
||||
|
||||
video_x264_body_0=""
|
||||
video_x264_body_1="subq=4:bframes=2:b_pyramid:weight_b"
|
||||
video_x264_body_2="subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b"
|
||||
video_x264_body_3="subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b"
|
||||
|
||||
|
||||
|
||||
if [ "$video" != "n" ]
|
||||
@ -276,6 +293,12 @@ then
|
||||
video_opt2=$video_opt2":threads=$threads"
|
||||
fi
|
||||
|
||||
if [ "${vopts}" != "-" ]
|
||||
then
|
||||
video_opt1=$video_opt1":${vopts}"
|
||||
video_opt2=$video_opt2":${vopts}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user