m2vmp2cut-0.72/ANNOUNCE m2vmp2cut-0.74/ANNOUNCE
1Last committed: $Id: ANNOUNCE 2177 2008-07-30 08:18:41Z too $1Last committed: $Id: ANNOUNCE 2192 2008-08-18 18:21:58Z too $
22
3ANNOUNCE for m2vmp2cut 0.723ANNOUNCE for m2vmp2cut 0.74
44
5This is stable release of m2vmp2cut -- frame accurate (currently PAL)5This is stable release of m2vmp2cut -- frame accurate (currently PAL)
6mpeg2 video (m2v file) with accompanied mp2 audio (mp2 file) cutter.6mpeg2 video (m2v file) with accompanied mp2 audio (mp2 file) cutter.
1313
14This software is available currently at http://www.iki.fi/too/sw/m2vmp2cut/14This software is available currently at http://www.iki.fi/too/sw/m2vmp2cut/
15and is licensed under GNU Public License (GPL).15and is licensed under GNU Public License (GPL).
16
17Changes since 0.72 (r2177)
18 Fixed largefile support in fileparts command.
19 Added getyuv.pl and getmp2.sh -- and related commands to m2vmp2cut;
20 these outputs selected video and audio parts from the source.
21 Added "contrib" interface.
22 Added first "contrib" script, mpeg2 re-encoding.
23 Tuned file/directory argument position on m2vmp2cut command (again).
1624
17Changes since 0.68 (r2174) (Not even far!):25Changes since 0.68 (r2174) (Not even far!):
18 ANNOUNCE informs this is stable version.26 ANNOUNCE informs this is stable version.

m2vmp2cut-0.72/HISTORY m2vmp2cut-0.74/HISTORY
1# Created using svn -v log | sed -n -e '${x;p;x;p;q};/^--*$/{x;/./p;d};x;p'1# Created using svn -v log | sed -n -e '${x;p;x;p;q};/^--*$/{x;/./p;d};x;p'
2# This file is not version controlled2# This file is not version controlled
33
4------------------------------------------------------------------------
5r2192 | too | 2008-08-18 21:21:58 +0300 (Mon, 18 Aug 2008) | 1 line
6Changed paths:
7 M /main/projects/m2vmp2cut/ANNOUNCE
8 M /main/projects/m2vmp2cut/Makefile
9 M /main/projects/m2vmp2cut/README
10 M /main/projects/m2vmp2cut/VERSION
11 M /main/projects/m2vmp2cut/bin/m2vmp2cut.pl
12 M /main/projects/m2vmp2cut/contrib/mpeg2.sh
13
14Version 0.74
15------------------------------------------------------------------------
16r2191 | too | 2008-08-18 19:47:33 +0300 (Mon, 18 Aug 2008) | 1 line
17Changed paths:
18 M /main/projects/m2vmp2cut/bin/m2vmp2cut.sh
19 A /main/projects/m2vmp2cut/contrib
20 A /main/projects/m2vmp2cut/contrib/mpeg2.sh
21
22contrib work for initial release.
23------------------------------------------------------------------------
24r2190 | too | 2008-08-18 08:18:06 +0300 (Mon, 18 Aug 2008) | 1 line
25Changed paths:
26 M /main/projects/m2vmp2cut/src/fileparts.c
27
28patch < ~/m2vmp2cut.off_t.patch (fileparts.c fix from G?\195?\182ran)
29------------------------------------------------------------------------
30r2188 | too | 2008-08-11 22:23:02 +0300 (Mon, 11 Aug 2008) | 1 line
31Changed paths:
32 M /main/projects/m2vmp2cut/bin/getmp2.sh
33 M /main/projects/m2vmp2cut/bin/getyuv.pl
34 M /main/projects/m2vmp2cut/bin/m2vmp2cut.sh
35 M /main/projects/m2vmp2cut/tools/relhelper.sh
36
37contrib interface. tunes.
38------------------------------------------------------------------------
39r2187 | too | 2008-08-07 21:57:37 +0300 (Thu, 07 Aug 2008) | 1 line
40Changed paths:
41 M /main/projects/m2vmp2cut/bin/m2vmp2cut.sh
42
43help updates.
44------------------------------------------------------------------------
45r2186 | too | 2008-08-07 20:50:05 +0300 (Thu, 07 Aug 2008) | 1 line
46Changed paths:
47 M /main/projects/m2vmp2cut/bin/m2vmp2cut.sh
48
49m2vmp2cut.sh: file|dir in either side of command. getyuv and getmp2 commands.
50------------------------------------------------------------------------
51r2184 | too | 2008-08-06 19:44:49 +0300 (Wed, 06 Aug 2008) | 1 line
52Changed paths:
53 M /main/projects/m2vmp2cut/bin/getmp2.sh
54 M /main/projects/m2vmp2cut/bin/m2vmp2cut.pm
55
56getmp2.sh works now too.
57------------------------------------------------------------------------
58r2183 | too | 2008-08-06 18:22:17 +0300 (Wed, 06 Aug 2008) | 1 line
59Changed paths:
60 M /main/projects/m2vmp2cut/bin/getmp2.sh
61 M /main/projects/m2vmp2cut/bin/getyuv.pl
62
63'<directory>' in usage
64------------------------------------------------------------------------
65r2182 | too | 2008-08-06 17:53:50 +0300 (Wed, 06 Aug 2008) | 1 line
66Changed paths:
67 M /main/projects/m2vmp2cut/bin/getyuv.pl
68
69getyuv.pl works now.
70------------------------------------------------------------------------
71r2181 | too | 2008-08-05 21:55:28 +0300 (Tue, 05 Aug 2008) | 1 line
72Changed paths:
73 A /main/projects/m2vmp2cut/bin/getmp2.sh
74 A /main/projects/m2vmp2cut/bin/getyuv.pl
75 A /main/projects/m2vmp2cut/bin/m2vmp2cut.pm
76
77Some get(yuv|mp2).* and m2vmp2cut.pm code
4------------------------------------------------------------------------78------------------------------------------------------------------------
5r2177 | too | 2008-07-30 11:18:41 +0300 (Wed, 30 Jul 2008) | 1 line79r2177 | too | 2008-07-30 11:18:41 +0300 (Wed, 30 Jul 2008) | 1 line
6Changed paths:80Changed paths:

m2vmp2cut-0.72/Makefile m2vmp2cut-0.74/Makefile
29TRG_BINS = m2vcut-gui m2vfilter m2vscan m2vtoyuv mp2cutpoints \29TRG_BINS = m2vcut-gui m2vfilter m2vscan m2vtoyuv mp2cutpoints \
30 fileparts filerotate wavgraph warpxpointer \30 fileparts filerotate wavgraph warpxpointer \
31 m2vmp2cut.pl m2vmp2cut.sh m2v_catfiltered.py m2v_somehdrinfo.py \31 m2vmp2cut.pl m2vmp2cut.sh m2v_catfiltered.py m2v_somehdrinfo.py \
32 wrapper.sh lvev6frames.pl32 wrapper.sh lvev6frames.pl getyuv.pl getmp2.sh m2vmp2cut.pm
3333
34#TRG_DOCS = Examples m2vcut_help-default m2vcut_help-fi_FI Options Usage34#TRG_DOCS = Examples m2vcut_help-default m2vcut_help-fi_FI Options Usage
35TRG_DOCS = m2vcut_help-default m2vcut_help-fi_FI Options Usage35TRG_DOCS = m2vcut_help-default m2vcut_help-fi_FI Options Usage
3636
37chkfiles:37chkfiles: all
38 @for i in $(TRG_BINS:%=bin/%) $(TRG_DOCS:%=doc/%); \38 @for i in $(TRG_BINS:%=bin/%) $(TRG_DOCS:%=doc/%); \
39 do test -f "$$i" || { echo "'$$i' missing"; exit 1; }; done39 do test -f "$$i" || { echo "'$$i' missing"; exit 1; }; done
40 @test -f m2vmp2cut40 @test -f m2vmp2cut
44 @chkdir() { [ -d "$$1" ] || mkdir -m 755 -p "$$1"; }; \44 @chkdir() { [ -d "$$1" ] || mkdir -m 755 -p "$$1"; }; \
45 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER); chkdir $(PREFIX)/bin; \45 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER); chkdir $(PREFIX)/bin; \
46 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER)/bin; \46 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER)/bin; \
47 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER)/doc47 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER)/doc; \
48 chkdir $(PREFIX)/lib/m2vmp2cut-$(VER)/contrib
48 cp $(TRG_BINS:%=bin/%) $(PREFIX)/lib/m2vmp2cut-$(VER)/bin49 cp $(TRG_BINS:%=bin/%) $(PREFIX)/lib/m2vmp2cut-$(VER)/bin
49 cp $(TRG_DOCS:%=doc/%) $(PREFIX)/lib/m2vmp2cut-$(VER)/doc50 cp $(TRG_DOCS:%=doc/%) $(PREFIX)/lib/m2vmp2cut-$(VER)/doc
51 cp contrib/* $(PREFIX)/lib/m2vmp2cut-$(VER)/contrib
50 cp m2vmp2cut $(PREFIX)/bin/m2vmp2cut52 cp m2vmp2cut $(PREFIX)/bin/m2vmp2cut
51 ln -s $(PJXJAR) $(PREFIX)/lib/m2vmp2cut-$(VER)/bin/ProjectX.jar53 ln -s $(PJXJAR) $(PREFIX)/lib/m2vmp2cut-$(VER)/bin/ProjectX.jar
52# v=$(VER); sed "s/=devel/=$$v/" m2vmp2cut > $(PREFIX)/bin/m2vmp2cut54# v=$(VER); sed "s/=devel/=$$v/" m2vmp2cut > $(PREFIX)/bin/m2vmp2cut
136#,# VERSION138#,# VERSION
137139
138#,# bin140#,# bin
141#,# bin/getmp2.sh x
142#,# bin/getyuv.pl x
139#,# bin/lvev6frames.pl x143#,# bin/lvev6frames.pl x
140#,# bin/m2v_catfiltered.py x144#,# bin/m2v_catfiltered.py x
141#,# bin/m2vmp2cut.pl x145#,# bin/m2vmp2cut.pl x
146#,# bin/m2vmp2cut.pm
142#,# bin/m2vmp2cut.sh x147#,# bin/m2vmp2cut.sh x
143#,# bin/m2v_somehdrinfo.py x148#,# bin/m2v_somehdrinfo.py x
144#,# bin/wrapper.sh x149#,# bin/wrapper.sh x
150
151#,# contrib
152#,# contrib/mpeg2.sh x
145153
146#,# doc154#,# doc
147#,# doc/Examples155#,# doc/Examples

m2vmp2cut-0.72/README m2vmp2cut-0.74/README
1Last committed: $Id: README 2177 2008-07-30 08:18:41Z too $1Last committed: $Id: README 2192 2008-08-18 18:21:58Z too $
22
3README for m2vmp2cut 0.72:3README for m2vmp2cut 0.74:
44
5m2vmp2cut is frame accurate (currently PAL) mpeg2 video (m2v file)5m2vmp2cut is frame accurate (currently PAL) mpeg2 video (m2v file)
6with accompanied mp2 audio (mp2 file) cutter.6with accompanied mp2 audio (mp2 file) cutter.

m2vmp2cut-0.72/VERSION m2vmp2cut-0.74/VERSION
10.72 (2008-07-27) ""10.74 (2008-08-18) ""
22
3$Id: VERSION 2177 2008-07-30 08:18:41Z too $3$Id: VERSION 2192 2008-08-18 18:21:58Z too $
44
5-- use sed -n '1s/ .*//p' VERSION to read version number from this file --5-- use sed -n '1s/ .*//p' VERSION to read version number from this file --

Only in m2vmp2cut-0.74/bin: getmp2.sh

Only in m2vmp2cut-0.74/bin: getyuv.pl

m2vmp2cut-0.72/bin/m2vmp2cut.pl m2vmp2cut-0.74/bin/m2vmp2cut.pl
6# All rights reserved6# All rights reserved
7#7#
8# Created: Sun Sep 05 11:12:24 EEST 2004 too8# Created: Sun Sep 05 11:12:24 EEST 2004 too
9# Last modified: Sun Jul 27 00:33:40 EEST 2008 too9# Last modified: Mon Aug 18 20:44:11 EEST 2008 too
10#10#
11# This program is licensed under the GPL v2. See file COPYING for details.11# This program is licensed under the GPL v2. See file COPYING for details.
1212
290mainpid=\$\$290mainpid=\$\$
291trap 'kill -USR1 0' 0291trap 'kill -USR1 0' 0
292292
293'$m2vmp2cut_sh' vermatch 5 \\\n\t|| die 'Tool version mismatch. Rerun!';293'$m2vmp2cut_sh' vermatch 6 \\\n\t|| die 'Tool version mismatch. Rerun!';
294294
295EOF295EOF
296296
593#$SIG{'INT'} = 'sleep 1; exit 1';593#$SIG{'INT'} = 'sleep 1; exit 1';
594594
595#system 'script', '-c', "$wd/do.sh", "$wd/do.sh-out";595#system 'script', '-c', "$wd/do.sh", "$wd/do.sh-out";
596$SIG{'USR1'} = 'IGNORE';
596if (system("$wd/do.sh") != 0)597if (system("$wd/do.sh") != 0)
597{598{
598 print "\n$wd/do.sh was partly unsuccessful. exiting.\n";599 print "\n$wd/do.sh was partly unsuccessful. exiting.\n";

Only in m2vmp2cut-0.74/bin: m2vmp2cut.pm

m2vmp2cut-0.72/bin/m2vmp2cut.sh m2vmp2cut-0.74/bin/m2vmp2cut.sh
7# All rights reserved7# All rights reserved
8#8#
9# Created: Wed Apr 23 21:40:17 EEST 2008 too9# Created: Wed Apr 23 21:40:17 EEST 2008 too
10# Last modified: Wed Jul 23 12:03:42 EEST 2008 too10# Last modified: Mon Aug 18 19:25:06 EEST 2008 too
1111
12e2 () { echo "$@" >&2; }12e2 () { echo "$@" >&2; }
13die () { e2 "$@"; exit 1; }13die () { e2 "$@"; exit 1; }
14usage () { e2; e2 Usage: m2vmp2cut '(file|dir)' $cc "$@"; die; }14usage () { e2; e2 Usage: m2vmp2cut '[(file|dir)]' $cc '[(file|dir)]' "$@"; die; }
15needvar () { [ x"$1" = x ] && { shift 1; "$@"; }; }15needvar () { [ x"$1" = x ] && { shift 1; "$@"; }; }
1616
17x () { echo + "$@"; "$@"; }17x () { echo + "$@"; "$@"; }
26# no interactive behaviour in batch mode...26# no interactive behaviour in batch mode...
27case $1 in --batch) batch=1; shift ;; *) batch= ;; esac27case $1 in --batch) batch=1; shift ;; *) batch= ;; esac
2828
29case $1 in ''|h|he|hel|help|vermatch) ;;29file= dir=
30 e|ex|exa|exam|examp|exampl|example) ;;30filedir () {
31 lve|lvev|lvev6|lvev6f|lvev6fr|lvev6fra|lvev6fram|lvev6frame|lvev6frames) ;;31 case $dir in '') ;; *) return 1 ;; esac
32 case "$1" in '') die m2vmp2cut $cm: file/directory arg missing ;; esac
32 *) if test -f "$1"33 if test -f "$1"
33 then34 then
34 dn=`dirname "$1"`; basename=`basename "$1"`35 dn=`dirname "$1"`; basename=`basename "$1"`
35 od=`echo $basename | sed 's/\.[^.]*$//'`.d36 od=`echo $basename | sed 's/\.[^.]*$//'`.d
40 else41 else
41 die "'$1': not a file or directory"42 die "'$1': not a file or directory"
42 fi43 fi
43 shift ;;44 return 0
44esac45}
46
47#case $1 in '') ;; *) test -f "$1" -o -d "$1" && { filedir "$1";shift; } ;; esac
4548
46# do not show this in command list49# do not show this in command list
47cmd_vermatch ()50cmd_vermatch ()
48{51{
49 case $1 in 5) exit 0;; *) exit 1 ;; esac52 case $1 in 6) exit 0;; *) exit 1 ;; esac
50}53}
5154
52cmd_lvev6frames () # Legacy m2vmp2cut support; dig cutpoints from ~/.lve/* file55cmd_lvev6frames () # Legacy m2vmp2cut support; dig cutpoints from ~/.lve/* file
6568
66cmd_demux () # Demux mpeg2 file with ProjectX for further editing...69cmd_demux () # Demux mpeg2 file with ProjectX for further editing...
67{70{
68 case $file in '')71 filedir "$1" && shift
69 die "No file to demux given" ;;72
70 esac
71 test -h $M2VMP2CUT_CMD_PATH/ProjectX.jar || { \73 test -h $M2VMP2CUT_CMD_PATH/ProjectX.jar || { \
72 e2 Symbolic link \'$M2VMP2CUT_CMD_PATH/ProjectX.jar\' does not exist74 e2 Symbolic link \'$M2VMP2CUT_CMD_PATH/ProjectX.jar\' does not exist
73 die Please provide link and try again75 die Please provide link and try again
8991
90cmd_select () # Select parts from video with a graphical tool92cmd_select () # Select parts from video with a graphical tool
91{93{
94 filedir "$1" && shift
92 test -f "$dir/video.m2v" || die "'$dir/video.m2v' does not exist"95 test -f "$dir/video.m2v" || die "'$dir/video.m2v' does not exist"
93 chkindexes "$dir"96 chkindexes "$dir"
94 x $M2VMP2CUT_CMD_PATH/m2vcut-gui \97 x $M2VMP2CUT_CMD_PATH/m2vcut-gui \
99102
100cmd_cut () # Cut using m2vmp2cut.pl for the work...103cmd_cut () # Cut using m2vmp2cut.pl for the work...
101{104{
105 filedir "$1" && shift
102 x $M2VMP2CUT_CMD_PATH/m2vmp2cut.pl --dir="$dir" "$@"106 x $M2VMP2CUT_CMD_PATH/m2vmp2cut.pl --dir="$dir" ${1:+"$@"}
103}107}
104108
105cmd_play () # Play resulting file with mplayer109cmd_play () # Play resulting file with mplayer
106{110{
111 filedir "$1" && shift
107 f="$dir"/m2vmp2cut-work/out.mpg112 f="$dir"/m2vmp2cut-work/out.mpg
108 test -f "$f" || die "'$f' does not exist"113 test -f "$f" || die "'$f' does not exist"
109 x mplayer "$@" "$f"114 x mplayer ${1:+"$@"} "$f"
110}115}
111116
112cmd_move () # Move final file to a new location (and name)117cmd_move () # Move final file to a new location (and name)
113{118{
119 filedir "$1" && shift
114 needvar "$1" usage '<destfile>'120 needvar "$1" usage '<destfile>'
115 f="$dir"/m2vmp2cut-work/out.mpg121 f="$dir"/m2vmp2cut-work/out.mpg
116 test -f "$f" || die "'$f' does not exist"122 test -f "$f" || die "'$f' does not exist"
117 x mv "$f" "$1"123 x mv "$f" "$1"
118}124}
119125
126cmd_getyuv () # get selected parts of mpeg2 video as yuv(4mpeg) frames
127{
128 case $1 in examp*) exec $M2VMP2CUT_CMD_PATH/getyuv.pl examples ;; esac
129 filedir "$1" && shift
130 x $M2VMP2CUT_CMD_PATH/getyuv.pl "$dir"
131}
132
133cmd_getmp2 () # get selected parts of mp2 audio
134{
135 case $1 in examp*) exec $M2VMP2CUT_CMD_PATH/getmp2.sh examples ;; esac
136 filedir "$1" && shift
137 x $M2VMP2CUT_CMD_PATH/getmp2.sh "$dir"
138}
139
140cmd_contrib () # contrib material, encoding scripts etc...
141{
142 M2VMP2CUT_CMD_DIRNAME=`dirname "$M2VMP2CUT_CMD_PATH"`
143 case $1 in '')
144 echo
145 echo Append one of these to your command line to continue.
146 echo Unambiquous prefix will do...
147 echo
148 cd $M2VMP2CUT_CMD_DIRNAME/contrib
149 ls -1 | while read line
150 do
151 sed -n '2 { s/./ '"$line"' /
152 s/\(.\{16\}\) */\1/p; q; }' $line
153 done
154 echo; exit 0
155 esac
156 for f in `ls -1 $M2VMP2CUT_CMD_DIRNAME/contrib`
157 do
158 case $f in
159 $1) fp= ff=$1 fm=$1 break ;;
160 $1*) fp=$ff; ff="$f $ff"; fm=$f ;;
161 esac
162 done
163 case $ff in '') die "'$1': not found." ;; esac
164 case $fp in '') ;; *) die "contrib: ambiquous match: $ff" ;; esac
165 shift
166 export M2VMP2CUT_CMD_DIRNAME
167 $M2VMP2CUT_CMD_DIRNAME/contrib/$fm ${1:+"$@"}
168}
169
120cmd_help () # Help of all or some of the commands above170cmd_help () # Help of all or some of the commands above
121{171{
172 case $1 in '') cut -d: -f 2- <<.
173 :
174 : Enter help <command-name> or '.' to see help of all commands at once.
175 :
176 : The <file>/<directory> argument can be given before or after the
177 : command. Also, if <file> arg is given when <directory> is expected
178 : the needed directory is tried to be deduced from given file name.
179 :
180.
181 exit 0 ;; esac
122 echo182 echo
123 sed -n "s|^#h $1[^:]*:||p" "$0"183 sed -n "s|^#h $1[^:]*:||p" "$0"
124}184}
128 cut -d: -f 2- >&2 <<.188 cut -d: -f 2- >&2 <<.
129 :189 :
130 : Simple example commands. In select/cut/play '<dir>' can be used.190 : Simple example commands. In select/cut/play '<dir>' can be used.
131 : (<file> is for user convenience...)191 : (<file> is for user convenience...).
192 : The <file>/<dir> option can also be given after command name...
132 :193 :
133 : m2vmp2cut <file> demux194 : m2vmp2cut <file> demux
134 : m2vmp2cut <file> select195 : m2vmp2cut <file> select
135 : m2vmp2cut <file> cut196 : m2vmp2cut <file> cut
136 : m2vmp2cut <file> play197 : m2vmp2cut <file> play
137 :198 :
138 : In above, there was basic workflow. 'cut' gui provides a test199 : In above, there was basic workflow. 'select' gui provides a test
139 : option -- but if you want to re-test, run these.200 : option -- but if you want to re-test, run these.
140 :201 :
141 : m2vmp2cut <file> cut --test=200202 : m2vmp2cut <file> cut --test=200
142 : m2vmp2cut <file> play203 : m2vmp2cut <file> play
143 :204 :
205 : getyuv and getmp2 has their own examples. Enter 'example' to their
206 : command lines to see those.
207 :
144.208.
145}209}
146210
147# ---211# ---
148212
149[ x"$1" = x ] && {213case $1 in '')
150 echo214 echo
151 echo Usage: m2vmp2cut '[-batch] (file|dir) <command> [args]'215 echo Usage: m2vmp2cut '[-batch] [(file|dir)] <command> [(file|dir)] [args]'
152 echo216 echo
153 echo m2vmp2cut commands available:217 echo m2vmp2cut commands available:
154 echo218 echo
155 sed -n '/^cmd_/ { s/cmd_/ /; s/ () [ -#]*/ /219 sed -n '/^cmd_[a-z]/ { s/cmd_/ /; s/ () [ -#]*/ /
156 s/\(.\{15\}\) */\1/p; }' $0220 s/\(.\{15\}\) */\1/p; }' $0
157 echo221 echo
158 echo Commands may be abbreviated down to no ambiguity222 echo Commands may be abbreviated down to no ambiguity
159 echo223 echo
160 exit 0224 exit 0 ;;
161}225esac
162226
163cmd=$1; shift227cmd=$1 cmd2=${2:-none}
164228
165#case $cmd in229#case $cmd in
166# c) cmd=colorset ;;230# c) cmd=colorset ;;
167#esac231#esac
168232
169 233cc= cp= cm= cc2= cp2= cm2=
170cc= cp=
171for m in `LC_ALL=C sed -n 's/^cmd_\([a-z0-9_]*\) (.*/\1/p' $0`234for m in `LC_ALL=C sed -n 's/^cmd_\([a-z0-9_]*\) (.*/\1/p' $0`
172do235do
173 case $m in236 case $m in
174 $cmd) cp= cc=$cmd cm=$cmd; break ;;237 $cmd) cp= cc=$cmd cm=$cmd; break ;;
175 $cmd*) cp=$cc; cc="$m $cc"; cm=$m ;;238 $cmd*) cp=$cc; cc="$m $cc"; cm=$m ;;
239 $cmd2*) cp2=$cc2; cc2="$m $cc2"; cm2=$m ;;
176 esac240 esac
177done241done
178242
179[ x"$cc" = x ] && { echo $0: $cmd -- command not found.; exit 1; }243case "$cc$cc2" in '') die $0: $cmd or $cmd2 -- command not found;; esac
180244
181[ x"$cp" != x ] && { echo $0: $cmd -- ambiquous command: matches $cc; exit 1; }245case $cp in '') ;; *) die $0: $cmd: -- ambiquous commands: matches $cc ;; esac
246case $cp2 in '') ;; *) die $0: $cmd2: -- ambiquous commands: matches $cc2;; esac
247
248case $cc in '') cm=$cm2; filedir "$1"; shift ;; esac
249shift
250unset cc2 cp2 cm2 cc cp
182251
183cmd=$cm252cmd=$cm
184cmd_$cm "$@"253cmd_$cm ${1:+"$@"}
185exit $?254exit $?
186255
187# fixme: move these to separate doc file (w/ locale extension)256# fixme: move these to separate doc file (w/ locale extension)
193#h lvev6frames: these old edits can be used with this m2vmp2cut version262#h lvev6frames: these old edits can be used with this m2vmp2cut version
194#h lvev6frames:263#h lvev6frames:
195264
196#h demux: <filename> demux265#h demux: demux <filename>
197#h demux:266#h demux:
198#h demux: m2vmp2cut reguires mpeg files to be demuxed to elementary streams267#h demux: m2vmp2cut reguires mpeg files to be demuxed to elementary streams
199#h demux: before cutting. This command uses ProjectX to do the demuxing.268#h demux: before cutting. This command uses ProjectX to do the demuxing.
202#h demux: source file.271#h demux: source file.
203#h demux:272#h demux:
204273
205#h select: <directory> select274#h select: select <directory>
206#h select:275#h select:
207#h select: This command uses new m2vcut-gui graphical utility for searching276#h select: This command uses new m2vcut-gui graphical utility for searching
208#h select: cutpoints. This work is done frame-accurately.277#h select: cutpoints. This work is done frame-accurately.
209#h select:278#h select:
210279
211#h cut: <directory> cut [options] ...280#h cut: cut <directory> [options] ...
212#h cut:281#h cut:
213#h cut: This command is wrapper to m2vmp2cut.pl (which used to be the frontend282#h cut: This command is wrapper to m2vmp2cut.pl (which used to be the frontend
214#h cut: of m2vmp2cut in old versions). This command has extensive help of283#h cut: of m2vmp2cut in old versions). This command has extensive help of
216#h cut: when this creates final output file.285#h cut: when this creates final output file.
217#h cut:286#h cut:
218287
219#h play: <directory> play [options]288#h play: play <directory> [options]
220#h play:289#h play:
221#h play: This command runs mplayer for the file created with cut command290#h play: This command runs mplayer for the file created with cut command
222#h play:291#h play:
292
293#h move: move <directory> <destfile>
294#h move:
295#h move: Moves final output file to a new destination.
296#h move:
297
298#h getyuv: getyuv [<directory>|examples]
299#h getyuv:
300#h getyuv: Decodes selected mpeg2 frames as a stream of yuv4mpeg pictures.
301#h getyuv: useful for further encoding.
302#h getyuv:
303
304#h getmp2: getmp2 [<directory>|examples]
305#h getmp2:
306#h getmp2: Extracts selected mp2 audio data, to be muxed with (re-encoded)
307#h getmp2: video. Mp2 data can be used as is, or as encoded to mp3 or vorbis...
308#h getmp2:
309
310#h contrib: contrib
311#h contrib:
312#h contrib: Contribution material. Mostly encoding scripts. The command line
313#h contrib: interface of the programs these scripts invoke may change over
314#h contrib: time -- there is less quarantees that these work in future than
315#h contrib: other m2vmp2cut functionality, in short term period...
316#h contrib:

Only in m2vmp2cut-0.74: contrib

m2vmp2cut-0.72/m2vmp2cut m2vmp2cut-0.74/m2vmp2cut
9# Created: Wed Apr 23 19:56:14 EEST 2008 too9# Created: Wed Apr 23 19:56:14 EEST 2008 too
10# Last modified: Mon Jul 21 15:43:46 EEST 2008 too10# Last modified: Mon Jul 21 15:43:46 EEST 2008 too
1111
12ver=0.7212ver=0.74
1313
14case $1 in '') echo; echo m2vmp2cut version $ver ;; esac14case $1 in '') echo; echo m2vmp2cut version $ver ;; esac
1515

m2vmp2cut-0.72/src/fileparts.c m2vmp2cut-0.74/src/fileparts.c
7 * All rights reserved7 * All rights reserved
8 *8 *
9 * Created: Sun Sep 26 08:51:22 EEST 2004 too9 * Created: Sun Sep 26 08:51:22 EEST 2004 too
10 * Last modified: Fri May 09 20:01:20 EEST 2008 too10 * Last modified: 2008-08-17 20:03:32.000000000 +0200 (patch from Göran)
11 *11 *
12 * This program is licensed under the GPL v2. See file COPYING for details.12 * This program is licensed under the GPL v2. See file COPYING for details.
13 */13 */
7474
75#if 175#if 1
76 if (closegop) {76 if (closegop) {
77 int olen = len;77 off_t olen = len;
78 len = s__closegop(fd, 1, len);78 len = s__closegop(fd, 1, len);
79 if (len < 0)79 if (len < 0)
80 xerrf("Data copy failure:");80 xerrf("Data copy failure:");
104 const char * p = partstring;104 const char * p = partstring;
105 char c;105 char c;
106 int state;106 int state;
107 int start, end; /* unavoidable warnings here -- but don't suppress those !!*/107 off_t start, end; /* unavoidable warnings here -- but don't suppress those !!*/
108108
109 /* using regexp /^(\d+-\d+)(,\d+-\d+)*$/) would have been easier. */109 /* using regexp /^(\d+-\d+)(,\d+-\d+)*$/) would have been easier. */
110110
112 switch (state)112 switch (state)
113 {113 {
114 case 0: /* [0-9] */114 case 0: /* [0-9] */
115 if (isdigit(c)) { start = atoi(p); state = 1; }115 if (isdigit(c)) { start = atoll(p); state = 1; }
116 else return false;116 else return false;
117 break;117 break;
118118
123 break;123 break;
124124
125 case 2: /* [0-9] */125 case 2: /* [0-9] */
126 if (isdigit(c)) { end = atoi(p); state = 3; }126 if (isdigit(c)) { end = atoll(p); state = 3; }
127 else return false;127 else return false;
128 break;128 break;
129129