annotate TOOLS/mencvcd @ 15585:281d155fb37f

ported all network streams to the new API
author nicodvb
date Sun, 29 May 2005 12:54:00 +0000
parents 835822ce4bb1
children 50aebc84fe4e
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 #
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
3 # Version: 0.2.2
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 #
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
7 # 2002/09/21 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 #
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
11 # requires: mplayer
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
12 # mjpegtools
5568
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
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
15 # lame (optionally)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
16 # toolame (optionally)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
17 # sox (optionally)
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
18
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
19 for exe in mplayer mpeg2enc mp2enc mplex yuvscaler ; do
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
20 if [ -z "`which $exe`" ]; then
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
21 echo "ERROR: $exe must be in your path $PATH!"
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
22 exit 1
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
23 fi
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
24 done
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
25 for exe in vcdimager lame cdrdao yuvdenoise sox toolame normalize; do
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
26 if [ -z "`which $exe`" ]; then
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
27 echo "WARNING: $exe is not found in your path $PATH!"
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
28 fi
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
29 done
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
30
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
31 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
32 #
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
33 # 2002/04/11 v0.1.0: first version
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
34 # 2002/04/12 v0.1.1:
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
35 # 2002/04/14 v0.1.2:
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
36 # - handles now multiple vcd's
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
37 # - support's mp3 audio as option
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
38 # - 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
39 # of resampling and mp3
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
40 # 2002/04/16 v0.1.3:
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
41 # - new option "-burnonly"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
42 # - new option "-vbr"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
43 # - removes mpg file after mastering cd image
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
44 # (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
45 # - 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
46 # 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
47 # - 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
48 # - more options
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
49 # 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
50 # - 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
51 # 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
52 # - bugfixes
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
53 # - new option "-vfr"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
54 # - "-norm" renamed to "-vnorm"
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
55 # 2002/05/15 v0.1.7
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
56 # - bugfixes
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
57 # - more help
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
58 # 2002/05/26 v0.1.8
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
59 # - new option "-sync"
6508
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
60 # 2002/06/19 v0.1.9
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
61 # - new option "-mpgonly"
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
62 # 2002/09/21 v0.1.10
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
63 # - bug fixes
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
64 # - tests now, if the commands are in path and give warnings
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
65 # and errors.
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
66 # 2002/11/01 v0.2
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
67 # - bug fixes
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
68 # - new options: "-sox", "-volume", "-toolame"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
69 # - renamed "-mpg" to "-mpegsrc"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
70 # - default cd size changed to 800mb
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
71 # 2002/11/18 v0.2.1
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
72 # - aspect ratio for vcd's, too
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
73 # - pulldown mode...
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
74 # 2002/12/01 v0.2.2
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
75 # - -normalize
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
76 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
77 ################################################################################
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
78 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
79 # 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
80
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
81 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
82
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
83 CDDRV="generic-mmc" # cdrdao: cdwriter driver
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
84 CDDEV="--device 0,1,0" # or comment out and create link /dev/cdrecorder
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
85 # to your cdwriter dev
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
86 CDMAXSIZE=800
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
87
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
88 ################################################################################
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
89 AUDIO="audiodump.wav"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
90 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
91 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
92 SVCDMODE=5
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
93 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
94
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
95 function usage() {
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
96 echo "Usage: $HOWCALLED <basename> [$HOWCALLED options] [mplayer options]"
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
97 echo
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
98 echo " <basename> is used as basename of the resulting mpg/bin files."
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
99 echo
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
100 echo "For mplayer options see mplayer help and manual."
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
101 echo
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
102 echo "$HOWCALLED options:"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
103 echo
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
104 echo "-?|-h help."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
105 echo "-a <n> sets the aspect ratio (for SVCD):"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
106 echo " 1 - 1:1 display"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
107 echo " 2 - 4:3 display"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
108 echo " 3 - 16:9 display"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
109 echo " 4 - 2.21:1 display"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
110 echo "-abr <n> output audio bitrate in kbs [224]."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
111 echo "-asr <n> output audio sample rate in Hz [44100]."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
112 echo "-blank cleans cd-rw before burning."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
113 echo "-burnonly burn only the premastered <name>*.cue/<name>*.bin images."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
114 echo "-cdsize <n> maximal size of cd images [800 = 80min raw cd]."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
115 echo "-denoise denoises mpeg stream."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
116 echo "-mp3 outputs audio in mp3 instead of mp2 format."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
117 echo "-mpegsrc don't encode from source, multiplex/burn the "
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
118 echo " encoded mpg stream."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
119 echo "-mpgonly do only encoding to mpeg 1/2 format."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
120 echo "-noburn disables burning."
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
121 echo "-normalize use 'normalize'."
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
122 echo "-overburn enables overburning a cd."
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
123 echo "-pulldown enable pulldown mode in output."
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
124 echo "-ratio <s> output ratio size of frames, see yuvscaler (1)."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
125 echo "-size <X>x<Y> sets output size of frames."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
126 echo "-sox use sox for audio resampling."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
127 echo "-svcdout encode to SVCD format [VCD default]."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
128 echo "-sync <n> set the presentation timestamp offset of video"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
129 echo " stream w.r.t. audio stream (video-audio) in mSec."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
130 echo "-toolame use toolame instead of mp2enc."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
131 echo "-v <volume> change amplitude (floating point); less than 1.0"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
132 echo " decreases, greater than 1.0 increases. Use that only"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
133 echo " together with sox!"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
134 echo "-vbr <n> output video bitrate in kbs [VCD:1152, SVCD:2500]."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
135 echo "-vfr <n> sets the frame-rate of the output-stream. Currently"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
136 echo " only the standard MPEG rates are supported:"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
137 echo " 0 - illegal"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
138 echo " 1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
139 echo " 2 - 24.0 (NATIVE FILM)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
140 echo " 3 - 25.0 (PAL/SECAM VIDEO / converted FILM)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
141 echo " 4 - 30000.0/1001.0 (NTSC VIDEO)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
142 echo " 5 - 30.0"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
143 echo " 6 - 50.0 (PAL FIELD RATE)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
144 echo " 7 - 60000.0/1001.0 (NTSC FIELD RATE)"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
145 echo " 8 - 60.0"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
146 echo "-vnorm <p|n|s> sets the input video norm p, n or s:"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
147 echo " forces the input stream to be treated as PAL|NTSC|SECAM"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
148 echo " regardless of what the stream header might suggest."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
149 echo "-w outputs in wide screen format 16:9."
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
150 echo
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
151 echo "examples:"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
152 echo
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
153 echo "'$HOWCALLED teneriffa teneriffa.avi'"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
154 echo "this creates a VCD from an avi file."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
155 echo
10405
a5785a0b9ee1 -dvd -> dvd:// and -vcd -> vcd://
jonas
parents: 10243
diff changeset
156 echo "'$HOWCALLED crazy dvd://3 -w':"
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
157 echo "encodes and burns dvd title 3 to VCD in 16:9."
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
158 echo
10405
a5785a0b9ee1 -dvd -> dvd:// and -vcd -> vcd://
jonas
parents: 10243
diff changeset
159 echo "'$HOWCALLED carter dvd://1 -sid 0 -aid 128 -ss 3:00 -frames 1500 \\"
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
160 echo " -noburn -vnorm n -vfr 1':"
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
161 echo "this encodes 1500 frames of dvd title 1 with subtitle 0 and audio stream"
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
162 echo "128 starting from 3:00 with frame rate 29.97 fps and input video norm NTSC"
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
163 echo "and output frame rate 23.98 fps because of the 3:2 pulldown method in NTSC."
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
164 echo
11261
835822ce4bb1 -vop ---> -vf
diego
parents: 10405
diff changeset
165 echo "'$HOWCALLED bj -size 640x272 -vf expand=640:480:0:104:0 \\"
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
166 echo " -cdsize 645 -noburn bj.avi'"
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
167 echo "this example above shows you, how to deal with movies which are not"
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
168 echo "created with aspect ratios of 4:3 or 16:9."
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
169 }
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
170
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
171 HOWCALLED=`basename $0`
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
172 if [ $# -le 1 ]; then
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
173 usage
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
174 exit 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
175 fi
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
176 case $1 in
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
177 -*)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
178 usage
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
179 exit 1
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
180 ;;
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
181 *)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
182 NAME=$1
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
183 shift 1
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
184 ;;
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
185 esac
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
186
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
187 cd $TMPDIR
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
188 rm -f $VIDEO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
189 rm -f $AUDIO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
190 # create a named pipe for video stream
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
191 mkfifo -m 660 $VIDEO
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
192
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
193 # 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
194 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
195 size=""
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
196 aratio=""
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
197 ratio=""
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
198 params=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
199 wide=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
200 blank=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
201 burn=1
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
202 burnonly=0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
203 mp3=0
6508
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
204 mpgonly=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
205 mkstream=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
206 abr=224
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
207 abrset=0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
208 asr=44100
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
209 vbr=1152
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
210 vbrset=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
211 denoise="cat -"
10243
faust3
parents: 10209
diff changeset
212 vnorm="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
213 mplexnorm="-f $VCDMODE -m 1 -V -b 46"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
214 imaget="-t vcd2"
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
215 yuvin=""
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
216 framerate=""
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
217 sync=""
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
218 sox=0
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
219 toolame=0
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
220 volume="1.0"
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
221 overburn=""
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
222 pd=""
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
223 norm=0
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
224
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
225 while [ "$1"x != "x" ]; do
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
226 case $1 in
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
227 -a)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
228 aratio="-a $2"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
229 shift 1
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
230 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
231 -w)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
232 wide="-M WIDE2STD"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
233 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
234 -h|-?)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
235 usage
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
236 exit 0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
237 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
238 -abr)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
239 abr=$2
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
240 abrset=1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
241 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
242 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
243 -asr)
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
244 asr=$2
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
245 shift 1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
246 ;;
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
247 -cdsize)
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
248 CDMAXSIZE=$2
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
249 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
250 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
251 -blank)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
252 blank=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
253 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
254 -noburn)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
255 burn=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
256 ;;
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
257 -burnonly)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
258 burnonly=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
259 burn=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
260 ;;
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
261 -overburn)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
262 overburn="--overburn"
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
263 ;;
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
264 -pulldown)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
265 pd="-p"
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
266 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
267 -vfr)
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
268 framerate="-F $2"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
269 shift 1
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
270 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
271 -mp3)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
272 mp3=1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
273 ;;
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
274 -mpegsrc)
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
275 mkstream=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
276 ;;
6508
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
277 -mpgonly)
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
278 mpgonly=1
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
279 ;;
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
280 -normalize)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
281 norm=1
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
282 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
283 -vnorm)
6107
c7af28266704 Hi, I added some more help to my script, especially for american NTSC streams\nyou have to set some more options.\n\npatch by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6030
diff changeset
284 yuvin="-n $2"
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
285 shift 1
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
286 ;;
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
287 -volume)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
288 volume="$2"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
289 shift 1
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
290 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
291 -denoise)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
292 denoise="yuvdenoise"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
293 ;;
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
294 -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
295 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
296 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
297 ;;
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
298 -sid) # mplayer option: have to set vop expand, too!!!
11261
835822ce4bb1 -vop ---> -vf
diego
parents: 10405
diff changeset
299 sub="-vf pp,expand=-1:-1:-1:-1:1 -sid $2"
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
300 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
301 ;;
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
302 -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
303 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
304 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
305 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
306 -svcdout)
10243
faust3
parents: 10209
diff changeset
307 vnorm="SVCD"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
308 ;;
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
309 -sync)
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
310 sync="-O $2"
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
311 shift 1
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
312 ;;
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
313 -sox)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
314 sox=1
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
315 ;;
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
316 -toolame)
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
317 toolame=1
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
318 ;;
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
319 -vbr)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
320 vbr=$2
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
321 vbrset=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
322 shift 1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
323 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
324 *)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
325 params="$params $1"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
326 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
327 esac
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
328 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
329 done
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
330
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
331 # some configs
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
332 mpegnorm="-f $VCDMODE -b $vbr -B 260 -V 46"
10243
faust3
parents: 10209
diff changeset
333 if [ "$vnorm" == "SVCD" ]; then
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
334 [ $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
335 mplexnorm="-f $SVCDMODE -m 2 -V -b 230"
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
336 mpegnorm="-f $SVCDMODE -b $vbr -B 260 -V 230"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
337 imaget="-t svcd"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
338 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
339
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
340 # 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
341 [ -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
342 [ -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
343
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
344 # 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
345 [ $mp3 -eq 1 -a $abrset -eq 0 ] && abr=128
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
346
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
347 # audio sample rate in kHz
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
348 ((a=$asr / 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
349 ((b=$asr % 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
350 [ $b -le 9 ] && b="00$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
351 [ $b -le 99 ] && b="0$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
352 kasr="$a.$b"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
353
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
354 # start de-/encoding
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
355 if [ $burnonly -eq 0 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
356 # encode streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
357 if [ $mkstream -eq 1 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
358 # start mplayer
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
359 command="mplayer -noframedrop -vo yuv4mpeg -ao pcm -waveheader -v -osdlevel 0 $sub $params"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
360 echo "$command"
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
361 $command &
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
362
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
363 # mjpegtools
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
364 ($denoise < $VIDEO | \
10243
faust3
parents: 10209
diff changeset
365 yuvscaler -v 0 $wide -O $vnorm $size $yuvin | \
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
366 mpeg2enc -v 0 -s $mpegnorm $aratio -S $CDMAXSIZE -g 6 -G 15 -r 16 \
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
367 $pd $framerate $yuvin -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
368
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
369 # wait for finishing the subprocesses
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
370 wait
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
371
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
372 # normalize sound
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
373 [ $norm -eq 1 ] && (echo "normalizing sound..."; normalize $AUDIO)
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
374
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
375 # do resampling with sox
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
376 if [ $sox -ne 0 ]; then
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
377 echo "wait, do resampling with sox..."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
378 sox $AUDIO -v $volume -r $asr $NAME.wav resample -qs
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
379 mv -f $NAME.wav $AUDIO
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
380 fi
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
381
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
382 if [ $toolame -ne 0 -a $mp3 -eq 0 ]; then
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
383 # do mp2 encoding with toolame
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
384 echo "wait, encoding to mp2 audio with toolame..."
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
385 toolame -b $abr $AUDIO
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
386 mv -f `basename $AUDIO .wav`.mp2 $NAME.mpa
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
387 elif [ $toolame -eq 0 -a $mp3 -eq 0 ]; then
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
388 # 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
389 # we have to read the whole file.
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
390 echo "wait, encoding to mp2 audio with mp2enc..."
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
391 mp2enc -b $abr -r $asr -o $NAME.mpa < $AUDIO
8049
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
392 elif [ $mp3 -ne 0 ]; then
a3bc99f2860d mencvcd 0.2 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 7462
diff changeset
393 echo "wait, encoding to mp3 audio with lame..."
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
394 lame -b $abr --resample $kasr - $NAME.mpa < $AUDIO
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
395 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
396 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
397
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
398 # remove wav file, won't need anymore!
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
399 rm -f $AUDIO
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
400
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
401 # multiplex streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
402 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
403 rm -f ${NAME}*.mpg
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
404 mplex $mplexnorm $sync $NAME.mpv $NAME.mpa -o ${NAME}%d.mpg
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
405
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
406 # remove pipe, won't need anymore!
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
407 rm -f $VIDEO
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
408
6508
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
409 # should i create only the mpeg file?
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
410 [ $mpgonly -eq 1 ] && exit 0
3dcf7fe14bd3 J¸«ärgen Hammelmann: I put a new option "-mpgonly" to the script, for those, who only want to
atmos4
parents: 6246
diff changeset
411
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
412 # create cd images
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
413 for mpg in ${NAME}*.mpg; do
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
414 [ -f $mpg ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
415 cue="`basename $mpg .mpg`.cue"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
416 bin="`basename $mpg .mpg`.bin"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
417 rm -f $cue $bin
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
418 vcdimager $imaget -c $cue -b $bin $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
419 [ -f $bin -a -f $cue ] && rm -f $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
420 done
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
421
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
422 # end of streaming/mastering
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
423 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
424
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
425 # 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
426 [ $burn -eq 0 ] && exit 0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
427
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
428 for cue in ${NAME}*.cue; do
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
429 bin="`basename $cue .cue`.bin"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
430 [ -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
431
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
432 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
433 read -n 1 i
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
434
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
435 if [ $blank -eq 1 ]; then
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
436 cdrdao blank --reload $CDDEV --driver $CDDRV --blank-mode minimal
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
437 fi
10209
d96714e26280 update by the author (v0.2.2)
alex
parents: 8049
diff changeset
438 cdrdao write $overburn --reload $CDDEV --driver $CDDRV $cue
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
439 done
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
440 exit 0