annotate TOOLS/mencvcd @ 6030:fab518e0cbb8

sometime source files have other frame rates than for vcd's and svcd's, so you have to set manually the frame rate with "-vfr". This patch introduce the option "-vfr". by Juergen Hammelmann <juergen.hammelmann@gmx.de>
author jaf
date Thu, 09 May 2002 10:27:36 +0000
parents c0b50929b2cd
children c7af28266704
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
1 #!/bin/sh
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
2 #
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
3 # Version: 0.1.6
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
4 #
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
5 # Licence: GPL
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
6 #
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
7 # 2002/04/14 Jürgen Hammelmann <juergen.hammelmann@gmx.de>
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
8 #
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
9 # Script: MPlayer Sources (DVD) to (S)VCD ripping and burning
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
10 #
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
11 # requires: newest mplayer cvs version
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
12 # mjpegtools v1.6 beta
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
13 # vcdimager
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
14 # cdrdao
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
15 # lame
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
16 #
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
17 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
18 #
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
19 # 2002/04/11 v0.1.0: first version
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
20 # 2002/04/12 v0.1.1:
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
21 # 2002/04/14 v0.1.2:
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
22 # - handles now multiple vcd's
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
23 # - support's mp3 audio as option
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
24 # - use of mp2enc/lame instead of toolame because of support
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
25 # of resampling and mp3
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
26 # 2002/04/16 v0.1.3:
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
27 # - new option "-burnonly"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
28 # - new option "-vbr"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
29 # - removes mpg file after mastering cd image
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
30 # (mplayer can read bin images!)
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
31 # - bugfixes
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
32 # 2002/04/22 v0.1.4
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
33 # - bugfixes / changes
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
34 # - more options
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
35 # 2002/05/06 v0.1.5
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
36 # - new option "-norm"
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
37 # 2002/05/08 v0.1.6
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
38 # - bugfixes
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
39 # - new option "-vfr"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
40 # - "-norm" renamed to "-vnorm"
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
41 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
42 ################################################################################
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
43 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
44 # global config section, change them to your needs!
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
45
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
46 TMPDIR="." # path to directory for creating temporary files, recommended 2-3GB space
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
47
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
48 CDDRV="generic-mmc" # cdrdao: cdwriter driver
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
49 CDDEV="--device 0,1,0" # or comment out and create link /dev/cdrecorder to your cdwriter dev
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
50
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
51
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
52 ################################################################################
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
53 AUDIO="audiodump.wav"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
54 VIDEO="stream.yuv"
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
55 VCDMODE=2
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
56 SVCDMODE=5
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
57 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
58
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
59 function usage() {
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
60 echo "usage: $HOWCALLED <name> [options] [mplayer options]"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
61 echo
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
62 echo "$HOWCALLED options:"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
63 echo
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
64 echo "-h|-? help"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
65 echo "-w outputs in wide screen format 16:9"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
66 echo "-abr <n> output audio bitrate in kbs [224]"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
67 echo "-asr <n> output audio sample rate in Hz [48000]"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
68 echo "-blank cleans cd-rw before burning"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
69 echo "-burnonly burn only the premastered <name>*.cue/<name>*.bin images"
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
70 echo "-cdsize <n> maximal size of cd images [646]"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
71 echo "-denoise denoises mpeg stream"
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
72 echo "-vfr <n> sets the frame-rate: of the output-stream. Currently"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
73 echo " only the standard MPEG rates are supported."
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
74 echo " 0 - illegal"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
75 echo " 1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
76 echo " 2 - 24.0 (NATIVE FILM)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
77 echo " 3 - 25.0 (PAL/SECAM VIDEO / converted FILM)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
78 echo " 4 - 30000.0/1001.0 (NTSC VIDEO)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
79 echo " 5 - 30.0"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
80 echo " 6 - 50.0 (PAL FIELD RATE)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
81 echo " 7 - 60000.0/1001.0 (NTSC FIELD RATE)"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
82 echo " 8 - 60.0"
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
83 echo "-noburn disables burning"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
84 echo "-mp3 outputs audio in mp3 instead of mp2 format"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
85 echo "-mpg don't encode from source, multiplex/burn"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
86 echo " only the encoded mpg stream"
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
87 echo "-vnorm p|n|s sets the output norm p,n or s: forces the input stream to"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
88 echo " be treated as NTSC|PAL|SECAM regardless of what the"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
89 echo " stream header might suggest. Basically this just sets"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
90 echo " the defaults for a bunch of other options."
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
91 echo "-ratio <s> output ratio size of frames, see yuvscaler (1)"
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
92 echo "-size <X>x<Y> sets output size of frames"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
93 echo "-svcdout encode to SVCD format [VCD default]"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
94 echo "-vbr <n> output video bitrate in kbs [VCD:1152, SVCD:2500]"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
95 echo
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
96 echo "example:"
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
97 echo "'$HOWCALLED crazy -dvd 3 -w' encodes and burns dvd title 3 to VCD in 16:9."
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
98 }
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
99
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
100 HOWCALLED=`basename $0`
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
101 NAME=$1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
102 if [ $# -le 1 ]; then
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
103 usage
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
104 exit 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
105 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
106 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
107
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
108 cd $TMPDIR
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
109 rm -f $VIDEO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
110 rm -f $AUDIO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
111 # create a named pipe for video stream
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
112 mkfifo -m 660 $VIDEO
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
113
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
114 # some inits
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
115 sub=""
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
116 size=""
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
117 ratio=""
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
118 params=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
119 wide=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
120 blank=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
121 burn=1
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
122 burnonly=0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
123 mp3=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
124 mkstream=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
125 abr=224
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
126 abrset=0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
127 asr=44100
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
128 vbr=1152
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
129 vbrset=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
130 denoise="cat -"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
131 norm="VCD"
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
132 mplexnorm="-f $VCDMODE -m 1 -V -b 46"
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
133 max=646
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
134 mpegnorm="-f $VCDMODE -b $vbr -B 260 -V 46"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
135 imaget="-t vcd2"
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
136 yuvout=""
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
137 framerate=""
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
138
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
139 while [ "$1"x != "x" ]; do
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
140 case $1 in
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
141 -w)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
142 wide="-M WIDE2STD"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
143 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
144 -h|-?)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
145 usage
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
146 exit 0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
147 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
148 -abr)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
149 abr=$2
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
150 abrset=1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
151 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
152 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
153 -asr)
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
154 asr=$2
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
155 shift 1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
156 ;;
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
157 -cdsize)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
158 max=$2
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
159 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
160 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
161 -blank)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
162 blank=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
163 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
164 -noburn)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
165 burn=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
166 ;;
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
167 -burnonly)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
168 burnonly=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
169 burn=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
170 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
171 -vfr)
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
172 framerate="-F $2"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
173 shift 1
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
174 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
175 -mp3)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
176 mp3=1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
177 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
178 -mpg)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
179 mkstream=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
180 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
181 -vnorm)
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
182 yuvout="-n $2"
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
183 shift 1
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
184 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
185 -denoise)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
186 denoise="yuvdenoise"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
187 ;;
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
188 -ratio)
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
189 ratio=$2
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
190 shift 1
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
191 ;;
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
192 -sid) # mplayer option: have to set vop expand, too!!!
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
193 sub="-vop pp,expand=-1:-1:-1:-1:1 -sid $2"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
194 shift 1
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
195 ;;
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
196 -size)
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
197 size=$2
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
198 shift 1
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
199 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
200 -svcdout)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
201 norm="SVCD"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
202 ;;
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
203 -vbr)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
204 vbr=$2
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
205 vbrset=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
206 shift 1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
207 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
208 *)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
209 params="$params $1"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
210 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
211 esac
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
212 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
213 done
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
214
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
215 # some configs
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
216 if [ "$norm" == "SVCD" ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
217 [ $vbrset -eq 0 ] && vbr=2500
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
218 mplexnorm="-f $SVCDMODE -m 2 -V -b 230"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
219 if [ -n "$wide" ]; then
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
220 wide=""
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
221 mpegnorm="-f $SVCDMODE -b $vbr -B 260 -V 230 -a 3"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
222 else
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
223 mpegnorm="-f $SVCDMODE -b $vbr -B 260 -V 230 -a 2"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
224 fi
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
225 imaget="-t svcd"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
226 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
227
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
228 # ratio overwrites wide sizing, size overwrites default frame size
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
229 [ -n "$ratio" ] && wide="-M $ratio"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
230 [ -n "$size" ] && size="-O SIZE_$size"
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
231
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
232 # with mp3 audio set the default audio bitrate to 128 kbs
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
233 [ $mp3 -eq 1 -a $abrset -eq 0 ] && abr=128
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
234
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
235 # audio sample rate in kHz
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
236 ((a=$asr / 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
237 ((b=$asr % 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
238 [ $b -le 9 ] && b="00$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
239 [ $b -le 99 ] && b="0$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
240 kasr="$a.$b"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
241
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
242 # start de-/encoding
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
243 if [ $burnonly -eq 0 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
244 # encode streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
245 if [ $mkstream -eq 1 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
246 # start mplayer
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
247 mplayer -noframedrop -vo yuv4mpeg -ao pcm -waveheader \
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
248 -v -osdlevel 0 $sub $params &
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
249
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
250 # mjpegtools
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
251 ($denoise < $VIDEO | \
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
252 yuvscaler -v 0 $wide -O $norm $size $yuvout | \
5783
e77da1c93ef7 by Juergen Hammelmann <juergen.hammelmann@gmx.de>, some bugfixes and new options, enables subtitles with new -vop expand plugin
jaf
parents: 5686
diff changeset
253 mpeg2enc -v 0 -s $mpegnorm -S $max -g 6 -G 15 -r 16 \
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
254 $framerate $yuvout -4 2 -2 1 -o $NAME.mpv) &
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
255
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
256 # wait for finishing the subprocesses
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
257 wait
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
258
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
259 if [ $mp3 -eq 0 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
260 # mp2enc/lame can't read audiodump.wav directly from named pipe,
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
261 # we have to read the whole file.
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
262 mp2enc -b $abr -r $asr -o $NAME.mpa < $AUDIO
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
263 else
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
264 lame -b $abr --resample $kasr - $NAME.mpa < $AUDIO
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
265 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
266 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
267
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
268 # remove wav file, won't need anymore!
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
269 rm -f $AUDIO
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
270
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
271 # multiplex streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
272 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
273 rm -f ${NAME}*.mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
274 mplex $mplexnorm $NAME.mpv $NAME.mpa -o ${NAME}%d.mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
275
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
276 # create cd images
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
277 for mpg in ${NAME}*.mpg; do
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
278 [ -f $mpg ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
279 cue="`basename $mpg .mpg`.cue"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
280 bin="`basename $mpg .mpg`.bin"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
281 rm -f $cue $bin
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
282 vcdimager $imaget -c $cue -b $bin $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
283 [ -f $bin -a -f $cue ] && rm -f $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
284 done
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
285
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
286 # end of streaming/mastering
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
287 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
288
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
289 # remove pipe, won't need anymore!
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
290 rm -f $VIDEO
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
291
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
292 # burn the (s)vcd's
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
293 [ $burn -eq 0 ] && exit 0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
294
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
295 for cue in ${NAME}*.cue; do
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
296 bin="`basename $cue .cue`.bin"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
297 [ -f $bin -a -f $cue ] || exit 1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
298
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
299 echo "please insert a cd in your cdwriter, after a keypress we start:"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
300 read -n 1 i
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
301
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
302 if [ $blank -eq 1 ]; then
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
303 cdrdao blank --reload $CDDEV --driver $CDDRV --blank-mode minimal
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
304 fi
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
305 cdrdao write --reload $CDDEV --driver $CDDRV $cue
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
306 done
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
307 exit 0