annotate TOOLS/mencvcd @ 7485:d772e0caac7b

put some comemnts into teh generated help_mp.h file
author arpi
date Sun, 22 Sep 2002 16:37:08 +0000
parents a9b01022396a
children a3bc99f2860d
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 #
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
3 # Version: 0.1.10
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 #
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 #
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
17
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
18 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
19 if [ -z "`which $exe`" ]; then
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
20 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
21 exit 1
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
22 fi
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
23 done
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
24 for exe in vcdimager lame cdrdao yuvdenoise ; do
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
25 if [ -z "`which $exe`" ]; then
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
26 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
27 fi
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
28 done
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
29
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
30 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
31 #
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
32 # 2002/04/11 v0.1.0: first version
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
33 # 2002/04/12 v0.1.1:
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
34 # 2002/04/14 v0.1.2:
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
35 # - handles now multiple vcd's
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
36 # - support's mp3 audio as option
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
37 # - 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
38 # of resampling and mp3
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
39 # 2002/04/16 v0.1.3:
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
40 # - new option "-burnonly"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
41 # - new option "-vbr"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
42 # - removes mpg file after mastering cd image
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
43 # (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
44 # - 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
45 # 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
46 # - 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
47 # - more options
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
48 # 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
49 # - 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
50 # 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
51 # - bugfixes
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
52 # - new option "-vfr"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
53 # - "-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
54 # 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
55 # - 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
56 # - more help
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
57 # 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
58 # - 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
59 # 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
60 # - new option "-mpgonly"
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
61 # 2002/09/21 v0.1.10
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
62 # - bug fixes
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
63 # - 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
64 # and errors.
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
65 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
66 ################################################################################
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
67 #
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
68 # 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
69
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
70 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
71
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
72 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
73 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
74
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
75
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 AUDIO="audiodump.wav"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
78 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
79 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
80 SVCDMODE=5
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
81 ################################################################################
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
82
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
83 function usage() {
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
84 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
85 echo
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
86 echo "$HOWCALLED options:"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
87 echo
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
88 echo "-?|-h help."
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
89 echo "-abr <n> output audio bitrate in kbs [224]."
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
90 echo "-asr <n> output audio sample rate in Hz [44100]."
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
91 echo "-blank cleans cd-rw before burning."
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
92 echo "-burnonly burn only the premastered <name>*.cue/<name>*.bin images."
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
93 echo "-cdsize <n> maximal size of cd images [700]."
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
94 echo "-denoise denoises mpeg 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
95 echo "-mp3 outputs audio in mp3 instead of mp2 format."
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
96 echo "-mpg don't encode from source, multiplex/burn."
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
97 echo " only the encoded mpg stream."
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
98 echo "-mpgonly do only encoding to mpeg 1/2 format."
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
99 echo "-noburn disables burning."
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
100 echo "-ratio <s> output ratio size of frames, see yuvscaler (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
101 echo "-size <X>x<Y> sets output size of frames."
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
102 echo "-svcdout encode to SVCD format [VCD default]."
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
103 echo "-sync <n> set the presentation timestamp offset of video"
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
104 echo " stream w.r.t. audio stream (video-audio) in mSec."
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
105 echo "-vbr <n> output video bitrate in kbs [VCD:1152, SVCD:2500]."
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
106 echo "-vfr <n> sets the frame-rate of the output-stream. Currently"
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
107 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
108 echo " 0 - illegal"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
109 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
110 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
111 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
112 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
113 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
114 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
115 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
116 echo " 8 - 60.0"
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
117 echo "-vnorm p|n|s sets the input video norm p, n or s:"
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
118 echo " forces the input stream to be treated as PAL|NTSC|SECAM"
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
119 echo " regardless of what the stream header might suggest."
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
120 echo "-w outputs in wide screen format 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
121 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
122 echo "examples:"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
123 echo
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
124 echo "'$HOWCALLED crazy -dvd 3 -w':"
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
125 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
126 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
127 echo "'mencvcd carter -dvd 1 -sid 0 -aid 128 -ss 3:00 -frames 1500 \\"
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
128 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
129 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
130 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
131 echo "and output frame rate 23.98 fps because of the 3:2 pulldown method in NTSC."
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
132 }
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
133
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
134 HOWCALLED=`basename $0`
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
135 NAME=$1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
136 if [ $# -le 1 ]; then
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
137 usage
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
138 exit 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
139 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
140 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
141
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
142 cd $TMPDIR
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
143 rm -f $VIDEO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
144 rm -f $AUDIO
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
145 # create a named pipe for video stream
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
146 mkfifo -m 660 $VIDEO
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
147
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
148 # 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
149 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
150 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
151 ratio=""
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
152 params=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
153 wide=""
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
154 blank=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
155 burn=1
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
156 burnonly=0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
157 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
158 mpgonly=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
159 mkstream=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
160 abr=224
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
161 abrset=0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
162 asr=44100
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
163 vbr=1152
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
164 vbrset=0
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
165 denoise="cat -"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
166 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
167 mplexnorm="-f $VCDMODE -m 1 -V -b 46"
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
168 max=700
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
169 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
170 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
171 yuvin=""
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
172 framerate=""
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
173 sync=""
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
174
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
175 while [ "$1"x != "x" ]; do
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
176 case $1 in
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
177 -w)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
178 wide="-M WIDE2STD"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
179 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
180 -h|-?)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
181 usage
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
182 exit 0
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
183 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
184 -abr)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
185 abr=$2
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
186 abrset=1
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
187 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
188 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
189 -asr)
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
190 asr=$2
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
191 shift 1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
192 ;;
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
193 -cdsize)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
194 max=$2
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
195 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
196 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
197 -blank)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
198 blank=1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
199 ;;
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
200 -noburn)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
201 burn=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
202 ;;
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
203 -burnonly)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
204 burnonly=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
205 burn=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
206 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
207 -vfr)
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
208 framerate="-F $2"
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
209 shift 1
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
210 ;;
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
211 -mp3)
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
212 mp3=1
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
213 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
214 -mpg)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
215 mkstream=0
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
216 ;;
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
217 -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
218 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
219 ;;
6030
fab518e0cbb8 sometime source files have other frame rates than for vcd's and svcd's, so
jaf
parents: 6008
diff changeset
220 -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
221 yuvin="-n $2"
6008
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
222 shift 1
c0b50929b2cd Sometimes yuvscaler can't determine the output size/norm of pal/secam/ntsc, so
jaf
parents: 5783
diff changeset
223 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
224 -denoise)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
225 denoise="yuvdenoise"
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
226 ;;
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
227 -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
228 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
229 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
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
231 -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
232 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
233 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
234 ;;
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
235 -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
236 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
237 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
238 ;;
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
239 -svcdout)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
240 norm="SVCD"
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
241 ;;
6246
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
242 -sync)
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
243 sync="-O $2"
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
244 shift 1
ce7422676d5e v0.1.8, - new option -sync, by J¸«ärgen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6107
diff changeset
245 ;;
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
246 -vbr)
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
247 vbr=$2
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
248 vbrset=1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
249 shift 1
5568
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 *)
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
252 params="$params $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 esac
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
255 shift 1
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
256 done
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
257
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
258 # some configs
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
259 if [ "$norm" == "SVCD" ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
260 [ $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
261 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
262 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
263 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
264 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
265 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
266 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
267 fi
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
268 imaget="-t svcd"
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
269 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
270
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
271 # 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
272 [ -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
273 [ -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
274
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
275 # 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
276 [ $mp3 -eq 1 -a $abrset -eq 0 ] && abr=128
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
277
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
278 # audio sample rate in kHz
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
279 ((a=$asr / 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
280 ((b=$asr % 1000))
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
281 [ $b -le 9 ] && b="00$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
282 [ $b -le 99 ] && b="0$b00"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
283 kasr="$a.$b"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
284
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
285 # start de-/encoding
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
286 if [ $burnonly -eq 0 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
287 # encode streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
288 if [ $mkstream -eq 1 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
289 # start mplayer
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
290 mplayer -noframedrop -vo yuv4mpeg -ao pcm -waveheader -benchmark \
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
291 -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
292
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
293 # mjpegtools
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
294 ($denoise < $VIDEO | \
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
295 yuvscaler -v 0 $wide -O $norm $size $yuvin | \
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
296 mpeg2enc -v 0 -s $mpegnorm -S $max -g 6 -G 15 -r 16 \
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
297 $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
298
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
299 # wait for finishing the subprocesses
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
300 wait
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
301
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
302 if [ $mp3 -eq 0 ]; then
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
303 # 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
304 # we have to read the whole file.
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
305 mp2enc -b $abr -r $asr -o $NAME.mpa < $AUDIO
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
306 else
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
307 lame -b $abr --resample $kasr - $NAME.mpa < $AUDIO
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
308 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
309 fi
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
310
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
311 # remove wav file, won't need anymore!
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
312 rm -f $AUDIO
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
313
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
314 # multiplex streams
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
315 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
316 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
317 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
318
7462
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
319 # remove pipe, won't need anymore!
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
320 rm -f $VIDEO
a9b01022396a version 0.1.10 by Juergen Hammelmann <juergen.hammelmann@gmx.de>
jaf
parents: 6508
diff changeset
321
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
322 # 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
323 [ $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
324
5686
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
325 # create cd images
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
326 for mpg in ${NAME}*.mpg; do
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
327 [ -f $mpg ] || exit 1
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
328 cue="`basename $mpg .mpg`.cue"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
329 bin="`basename $mpg .mpg`.bin"
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
330 rm -f $cue $bin
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
331 vcdimager $imaget -c $cue -b $bin $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
332 [ -f $bin -a -f $cue ] && rm -f $mpg
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
333 done
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
334
00ac1397ecb7 - new option "-burnonly": burn only the preformated bin images
atmos4
parents: 5633
diff changeset
335 # end of streaming/mastering
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
336 fi
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
337
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
338 # 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
339 [ $burn -eq 0 ] && exit 0
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
340
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
341 for cue in ${NAME}*.cue; do
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
342 bin="`basename $cue .cue`.bin"
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
343 [ -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
344
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
345 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
346 read -n 1 i
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
347
5633
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
348 if [ $blank -eq 1 ]; then
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
349 cdrdao blank --reload $CDDEV --driver $CDDRV --blank-mode minimal
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
350 fi
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
351 cdrdao write --reload $CDDEV --driver $CDDRV $cue
b62460b1db74 Updated to support resampling audio and multiple cds.
atmos4
parents: 5568
diff changeset
352 done
5568
772c627c1494 anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff changeset
353 exit 0