annotate TOOLS/qepdvcd.sh @ 27319:09cf111f68b8

Revert to previous dependency checking behavior. Take included header files into account when generating dependency files. This has problems when header files are removed or renamed, but does not silently miscompile files.
author diego
date Sat, 26 Jul 2008 18:36:48 +0000
parents 37feaaf7b7b4
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
1 #!/bin/bash
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
2 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
3 # QEPDVCD
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
4 #
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
5 # Most of this stuff comes straight from MPlayer documentation.
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
6 # Options are limited only to a small useful subset, if you
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
7 # want more control, RTFM and DIY.
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
8 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
9 # Version: 0.1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
10 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
11 # Licence: GPL
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
12 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
13 # Author: Reynaldo H. Verdejo Pinochet <reynaldo@opendot.cl>
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
14 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
15 # Script: MPlayer Sources. Anything supported to vcd/svcd pal/ntsc
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
16 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
17 # requires: mencoder
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
18 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
19 # sugests: vcdimager / cdrecord
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
20 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
21 # Thanks to: Carlos Navarro Salas - name author ;)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
22 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
23 #
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
24
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
25 # Defaults
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
26
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
27 MYNAME=`basename $0`
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
28 TARGET="svcd"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
29 ENCQ="2"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
30 ABPS="224"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
31 VBPS="2000"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
32 NORM="NTSC"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
33 SPLIT="0"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
34 TOLERANCE="85"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
35 OUTNAME="mencodedvcd"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
36 SUBFILENAME=0
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
37
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
38 EDLFILENAME="pass.edl"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
39 HAVESUB=0
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
40 WORKDIR="."
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
41 RATIOX=4
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
42 RATIOY=3
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
43
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
44 OPTIONS="INPUTFILENAME TARGET ENCQ ABPS VBPS NORM SPLIT TOLERANCE OUTNAME"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
45
27195
5eb532ff5793 Remove unnecessary function keyword from shell script function declarations,
diego
parents: 18213
diff changeset
46 usage()
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
47 {
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
48 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
49 echo "usage $MYNAME inputfile [options]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
50 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
51 echo "Options: [Default value]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
52 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
53 echo "-t Target svcd|vcd [svcd]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
54 echo "-q Encoding quality 0|1|2 [2]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
55 echo "-a Audio bitrate in kbps [224]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
56 echo "-v Video bitrate in kbps [2000 For SVCD, 1150 For VCD]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
57 echo "-n Norm NTSC|PAL [NTSC]"
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
58 echo "-d Divide/split movie at given times time1:time2:... [no split]"
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
59 echo "-s Shitty TV screen tolerance %, afects subtitle positioning [85]"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
60 echo "-u Subtitle file name [No subtitle]"
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
61 echo "-o Output basename [mencodedvcd]"
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
62 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
63 echo "In case you want to use -a/-v please read:"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
64 echo "http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
65 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
66 }
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
67
27195
5eb532ff5793 Remove unnecessary function keyword from shell script function declarations,
diego
parents: 18213
diff changeset
68 test_needed()
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
69 {
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
70
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
71 for i in mencoder; do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
72 if [ -z "`which $i`" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
73 echo "[ERROR] mencoder not found in $PATH!"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
74 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
75 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
76 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
77
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
78 }
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
79
27195
5eb532ff5793 Remove unnecessary function keyword from shell script function declarations,
diego
parents: 18213
diff changeset
80 test_sugested()
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
81 {
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
82
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
83 for i in vcdimager cdrecord; do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
84 if [ -z "`which $i`" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
85 echo "[WARNING] $i not found in $PATH!"
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
86 echo "You'll likely need it after we finish."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
87 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
88 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
89 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
90 }
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
91
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
92 test_needed
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
93 test_sugested
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
94
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
95 if [ $# -lt 1 ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
96 echo ""
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
97 echo "[ERROR] Input filename parameter is mandatory."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
98 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
99 usage
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
100 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
101 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
102
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
103 case $1 in
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
104 -*)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
105 usage
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
106 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
107 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
108 *)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
109 INPUTFILENAME=$1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
110 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
111 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
112 esac
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
113
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
114 while [ "$1"x != "x" ]; do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
115 case $1 in
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
116 -t)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
117 TARGET=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
118 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
119 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
120 -q)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
121 ENCQ=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
122 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
123 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
124 -a)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
125 ABPS=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
126 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
127 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
128 -v)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
129 VBPS=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
130 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
131 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
132 -n)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
133 NORM=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
134 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
135 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
136 -d)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
137 SPLIT=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
138 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
139 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
140 -s)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
141 TOLERANCE=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
142 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
143 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
144 -u)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
145 SUBFILENAME="$2"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
146 HAVESUB=1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
147 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
148 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
149 -o)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
150 OUTNAME=$2
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
151 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
152 ;;
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
153 esac
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
154 shift 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
155 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
156
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
157 echo ""
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
158 echo "[STATUS] Will re-encode using the following parameters:"
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
159 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
160 for i in $OPTIONS ; do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
161 echo "$i ${!i}";
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
162 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
163
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
164 # Parameter Sanity Check ###########################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
165 # We need to check supplied params against known format constraints
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
166 ####################################################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
167
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
168 if [ $TARGET = "svcd" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
169 if [ $ABPS -gt 384 ]; then
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
170 echo "[ERROR] SVCD maximum abitrate is 384kbps."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
171 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
172 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
173 if [ $VBPS -gt 2600 ]; then
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
174 echo "[ERROR] SVCD maximum vbitrate is 2600kbps."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
175 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
176 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
177 else [ $TARGET = "vcd" ]
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
178 if [ $ABPS -eq 224 ]; then
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
179 echo "[ERROR] VCD abitrate must be 224kbps."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
180 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
181 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
182 if [ $VBPS -gt 1150 ]; then
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
183 echo "[ERROR] VCD maximum vbitrate is 1150kbps."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
184 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
185 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
186 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
187
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
188 # Set encoding options ##############################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
189
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
190 if [ $TARGET = "svcd" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
191 FORMAT="xsvcd"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
192 VCODEC="mpeg2video"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
193 VRCMINRATE=4
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
194 VRCMAXRATE=2500
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
195 VRCBUFSIZE=917
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
196 if [ $NORM = "NTSC" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
197 SCALEX=480
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
198 SCALEY=480
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
199 KEYINT=18
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
200 OFPS="24000/1001"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
201 TELECINE=":telecine"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
202 else [ $NORM = "PAL" ]
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
203 SCALEX=480
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
204 SCALEY=576
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
205 KEYINT=15
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
206 OFPS=25
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
207 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
208 else [ $TARGET = "vcd" ]
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
209 FORMAT="xvcd"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
210 VCODEC="mpeg1video"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
211 VRCMINRATE=$VBPS
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
212 VRCMAXRATE=$VBPS
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
213 VRCBUFSIZE=327
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
214 if [ $NORM = "NTSC" ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
215 SCALEX=352
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
216 SCALEY=240
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
217 KEYINT=18
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
218 OFPS="24000/1001"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
219 else [ $NORM = "PAL" ]
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
220 SCALEX=352
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
221 SCALEY=288
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
222 KEYINT=15
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
223 OFPS=25
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
224 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
225 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
226
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
227 # Start reencoding ###################################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
228
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
229 cd $WORKDIR
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
230
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
231 if [ $(($HAVESUB+1)) -eq 1 ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
232 SUBTITLESTRING="/dev/null"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
233 else
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
234 SUBTITLESTRING="$SUBFILENAME"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
235 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
236
27196
37feaaf7b7b4 Replace == in []/test constructs with =, == is a bashism.
diego
parents: 27195
diff changeset
237 if [ $SPLIT = "0" ]; then
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
238 CICLES=0
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
239 TIMESTRING=""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
240 else
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
241 if [ -e $EDLFILENAME ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
242 echo "[ERROR]"
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
243 echo "The -d option needs to generate a temporary file called"
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
244 echo "$EDLFILENAME. You already have one in this directory,"
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
245 echo "please remove/rename it and run $MYNAME again."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
246 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
247 exit 1
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
248 else
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
249 EDLSTRING=$(echo $SPLIT | sed -e s/:/' '/g)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
250 EDLARRAY=($EDLSTRING)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
251 CICLES=$(echo $EDLSTRING | wc -w)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
252 TIMESTRING="-edl $EDLFILENAME -hr-edl-seek"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
253 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
254 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
255
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
256
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
257 for j in $(seq 0 $CICLES); do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
258
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
259 NEWNAME=$OUTNAME"_PART"$j".mpg"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
260 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
261 echo "Making $NEWNAME, wish me luck ;-)"
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
262 echo ""
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
263
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
264 # Create EDLFILENAME #################################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
265
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
266 if [ $CICLES -ge 1 ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
267 for i in $(seq 0 $CICLES)
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
268 do
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
269 if [ $i -eq $j ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
270 if [ $j -ne 0 ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
271 echo "0 ${EDLARRAY[$(($i-1))]} 0" > $EDLFILENAME
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
272 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
273 if [ $i -ne $CICLES ]; then
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
274 echo "${EDLARRAY[$(($i))]} 999999 0" >> $EDLFILENAME
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
275 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
276 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
277 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
278 fi
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
279
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
280 # Mencoder Time ;-) ###################################################
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
281
18213
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
282 mencoder \
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
283 -ovc lavc -oac lavc -vf expand=:::::$RATIOX/$RATIOY:1,scale=$SCALEX:$SCALEY,harddup \
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
284 -srate 44100 -af lavcresample=44100 -lavcopts acodec=mp2:abitrate=$ABPS:vcodec=$VCODEC:\
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
285 vbitrate=$VBPS:keyint=$KEYINT:mbd=$ENCQ:vrc_buf_size=$VRCBUFSIZE:vrc_maxrate=$VRCMAXRATE:\
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
286 vrc_minrate=$VRCMINRATE:vi_qfactor=0.1:vi_qoffset=1.5:aspect=$RATIOX/$RATIOY -of mpeg \
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
287 -mpegopts format=$FORMAT$TELECINE -sub $SUBTITLESTRING -subpos $TOLERANCE -subwidth \
631e27c9ca85 Cosmetic fix, splitting long mencoder cmd line
reynaldo
parents: 18177
diff changeset
288 $TOLERANCE -ofps $OFPS $TIMESTRING -o $NEWNAME $INPUTFILENAME
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
289
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
290 echo "Encoding of $NEWNAME finished."
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
291 echo "Run vcdimager -t svcd/vcd $NEWNAME and burn with cdrecord."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
292
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
293 done
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
294
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
295 echo "$(($CICLES+1)) VCD/SVCD file(s) created!!!"
16997
c1a271b1cfb3 spelling/grammar
diego
parents: 16996
diff changeset
296 echo "Happy to be of some help ;-) have fun."
16996
17dd370a838a Added new TOOL to convert 'anything supported' to VCD/SVCD (PAL/NTSC) using mencoder
reynaldo
parents:
diff changeset
297 exit 0