comparison TOOLS/mencvcd @ 6246:ce7422676d5e

v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
author jaf
date Fri, 31 May 2002 21:44:39 +0000
parents c7af28266704
children 3dcf7fe14bd3
comparison
equal deleted inserted replaced
6245:aee789fa2d07 6246:ce7422676d5e
1 #!/bin/sh 1 #!/bin/sh
2 # 2 #
3 # Version: 0.1.7 3 # Version: 0.1.8
4 # 4 #
5 # Licence: GPL 5 # Licence: GPL
6 # 6 #
7 # 2002/04/14 Jürgen Hammelmann <juergen.hammelmann@gmx.de> 7 # 2002/04/14 Jürgen Hammelmann <juergen.hammelmann@gmx.de>
8 # 8 #
39 # - new option "-vfr" 39 # - new option "-vfr"
40 # - "-norm" renamed to "-vnorm" 40 # - "-norm" renamed to "-vnorm"
41 # 2002/05/15 v0.1.7 41 # 2002/05/15 v0.1.7
42 # - bugfixes 42 # - bugfixes
43 # - more help 43 # - more help
44 # 2002/05/26 v0.1.8
45 # - new option "-sync"
44 # 46 #
45 ################################################################################ 47 ################################################################################
46 # 48 #
47 # global config section, change them to your needs! 49 # global config section, change them to your needs!
48 50
76 echo " only the encoded mpg stream." 78 echo " only the encoded mpg stream."
77 echo "-noburn disables burning." 79 echo "-noburn disables burning."
78 echo "-ratio <s> output ratio size of frames, see yuvscaler (1)." 80 echo "-ratio <s> output ratio size of frames, see yuvscaler (1)."
79 echo "-size <X>x<Y> sets output size of frames." 81 echo "-size <X>x<Y> sets output size of frames."
80 echo "-svcdout encode to SVCD format [VCD default]." 82 echo "-svcdout encode to SVCD format [VCD default]."
83 echo "-sync <n> set the presentation timestamp offset of video"
84 echo " stream w.r.t. audio stream (video-audio) in mSec."
81 echo "-vbr <n> output video bitrate in kbs [VCD:1152, SVCD:2500]." 85 echo "-vbr <n> output video bitrate in kbs [VCD:1152, SVCD:2500]."
82 echo "-vfr <n> sets the frame-rate of the output-stream. Currently" 86 echo "-vfr <n> sets the frame-rate of the output-stream. Currently"
83 echo " only the standard MPEG rates are supported." 87 echo " only the standard MPEG rates are supported."
84 echo " 0 - illegal" 88 echo " 0 - illegal"
85 echo " 1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)" 89 echo " 1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)"
143 max=646 147 max=646
144 mpegnorm="-f $VCDMODE -b $vbr -B 260 -V 46" 148 mpegnorm="-f $VCDMODE -b $vbr -B 260 -V 46"
145 imaget="-t vcd2" 149 imaget="-t vcd2"
146 yuvin="" 150 yuvin=""
147 framerate="" 151 framerate=""
152 sync=""
148 153
149 while [ "$1"x != "x" ]; do 154 while [ "$1"x != "x" ]; do
150 case $1 in 155 case $1 in
151 -w) 156 -w)
152 wide="-M WIDE2STD" 157 wide="-M WIDE2STD"
207 size=$2 212 size=$2
208 shift 1 213 shift 1
209 ;; 214 ;;
210 -svcdout) 215 -svcdout)
211 norm="SVCD" 216 norm="SVCD"
217 ;;
218 -sync)
219 sync="-O $2"
220 shift 1
212 ;; 221 ;;
213 -vbr) 222 -vbr)
214 vbr=$2 223 vbr=$2
215 vbrset=1 224 vbrset=1
216 shift 1 225 shift 1
279 rm -f $AUDIO 288 rm -f $AUDIO
280 289
281 # multiplex streams 290 # multiplex streams
282 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1 291 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1
283 rm -f ${NAME}*.mpg 292 rm -f ${NAME}*.mpg
284 mplex $mplexnorm $NAME.mpv $NAME.mpa -o ${NAME}%d.mpg 293 mplex $mplexnorm $sync $NAME.mpv $NAME.mpa -o ${NAME}%d.mpg
285 294
286 # create cd images 295 # create cd images
287 for mpg in ${NAME}*.mpg; do 296 for mpg in ${NAME}*.mpg; do
288 [ -f $mpg ] || exit 1 297 [ -f $mpg ] || exit 1
289 cue="`basename $mpg .mpg`.cue" 298 cue="`basename $mpg .mpg`.cue"