Mercurial > mplayer.hg
annotate TOOLS/mencvcd @ 5586:6ce9c6231bdd
updated
author | arpi |
---|---|
date | Sat, 13 Apr 2002 02:09:18 +0000 |
parents | 772c627c1494 |
children | b62460b1db74 |
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 # |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
3 # Version: 0.1.1 |
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 # |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
7 # 2002/05/11 Jürgen Hammelmann <juergen.hammelmann@gmx.de> |
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 # toolame |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
14 # vcdimager |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
15 # cdrdao |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
16 # |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
17 ################################################################################ |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
18 # |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
19 # global options section, change them to your needs! |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
20 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
21 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
|
22 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
23 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
|
24 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
|
25 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
26 ################################################################################ |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
27 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
28 function usage() { |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
29 echo "usage: $HOWCALLED <filename> [options] [mplayer options]" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
30 echo |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
31 echo "$HOWCALLED options:" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
32 echo |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
33 echo "-w outputs in wide screen format 16:9" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
34 echo "-abr <n> audio bitrate in kbs [224]" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
35 echo "-asr <n> audio sample rate in Hz [44100]" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
36 echo "-blank cleans cd-rw before burning" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
37 echo "-burn enables burning [default]" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
38 echo "-denoise denoises mpeg stream" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
39 echo "-noburn disables burning" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
40 echo "-mpg don't encode from source, multiplex/burn only the mpeg stream" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
41 echo "-vcdout encode to VCD format [default]" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
42 echo "-svcdout encode to SVCD format" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
43 echo |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
44 echo "example:" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
45 echo "'$HOWCALLED crazy -dvd 3 -w' encodes and burns dvd title 3 to VCD in wide" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
46 echo " screen format." |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
47 } |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
48 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
49 HOWCALLED=`basename $0` |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
50 NAME=$1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
51 if [ $# -le 1 ]; then |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
52 usage |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
53 exit 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
54 fi |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
55 shift 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
56 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
57 cd $TMPDIR |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
58 rm -f stream.yuv |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
59 rm -f audiodump.pcm |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
60 rm -f audiodump.wav |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
61 mkfifo -m 660 stream.yuv |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
62 mkfifo -m 660 audiodump.pcm |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
63 mkfifo -m 660 audiodump.wav |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
64 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
65 params="" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
66 wide="" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
67 blank=0 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
68 burn=1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
69 mkstream=1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
70 abr=224 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
71 masr=44100 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
72 denoise="cat -" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
73 norm="VCD" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
74 mplexnorm="-f 2 -V" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
75 mpegnorm="-f 2 -b 1152" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
76 imaget="-t vcd2" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
77 while [ "$1"x != "x" ]; do |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
78 case $1 in |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
79 -w) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
80 wide="-M WIDE2STD" |
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 -abr) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
83 abr=$2 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
84 shift 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
85 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
86 -asr) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
87 masr=$2 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
88 shift 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
89 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
90 -blank) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
91 blank=1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
92 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
93 -burn) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
94 burn=1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
95 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
96 -noburn) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
97 burn=0 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
98 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
99 -mpg) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
100 mkstream=0 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
101 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
102 -denoise) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
103 denoise="yuvdenoise" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
104 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
105 -vcdout) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
106 norm="VCD" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
107 mplexnorm="-f 2 -V" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
108 mpegnorm="-f 2 -b 1152" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
109 imaget="-t vcd2" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
110 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
111 -svcdout) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
112 norm="SVCD" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
113 mplexnorm="-f 4 -V" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
114 mpegnorm="-f 4" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
115 imaget="-t svcd" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
116 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
117 *) |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
118 params="$params $1" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
119 ;; |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
120 esac |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
121 shift 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
122 done |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
123 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
124 if [ -n "$wide" ]; then |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
125 if [ "$norm" == "SVCD" ]; then |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
126 wide="" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
127 mpegnorm="$mpegnorm -a 3" |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
128 fi |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
129 fi |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
130 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
131 # encode streams |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
132 if [ $mkstream -eq 1 ]; then |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
133 # start mplayer |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
134 mplayer -noframedrop -aop list=resample:fout=$masr -vo yuv4mpeg -ao pcm \ |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
135 -waveheader $params & |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
136 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
137 # mjpegtools / sox |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
138 ($denoise < stream.yuv | \ |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
139 yuvscaler -v 0 $wide -O $norm | \ |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
140 mpeg2enc -v 0 -s $mpegnorm -g 6 -G 15 -r 16 -o $NAME.mpv) & |
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 # we have to use toolame, mp2enc don't understand audiodump.wav directly, no RIFF header?! |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
143 (toolame -m s -b $abr audiodump.wav $NAME.mpa) & |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
144 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
145 # wait for finishing the subprocesses |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
146 wait |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
147 fi |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
148 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
149 # remove pipes |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
150 rm -f stream.yuv |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
151 rm -f audiodump.pcm |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
152 rm -f audiodump.wav |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
153 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
154 # multiplex streams |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
155 [ -f $NAME.mpv -a -f $NAME.mpa ] || exit 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
156 rm -f $NAME.mpg |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
157 mplex $mplexnorm $NAME.mpv $NAME.mpa -o $NAME.mpg |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
158 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
159 # create cd image |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
160 [ -f $NAME.mpg ] || exit 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
161 rm -f $NAME.cue $NAME.bin |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
162 vcdimager $imaget -c $NAME.cue -b $NAME.bin $NAME.mpg |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
163 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
164 # burn the vcd |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
165 [ $burn -eq 0 ] && exit 0 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
166 [ -f $NAME.bin -a -f $NAME.cue ] || exit 1 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
167 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
168 if [ $blank -eq 1 ]; then |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
169 cdrdao blank --reload $CDDEV --driver $CDDRV --blank-mode minimal |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
170 fi |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
171 cdrdao write --reload $CDDEV --driver $CDDRV $NAME.cue |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
172 |
772c627c1494
anything to (S)VCD encode script by Juergen Hammelmann <juergen.hammelmann at gmx.de>
atmos4
parents:
diff
changeset
|
173 exit 0 |