m2vmp2cut-0.82/ANNOUNCEm2vmp2cut-0.84/ANNOUNCE
@@ -1,5 +1,5 @@
11
2m2vmp2cut 0.822m2vmp2cut 0.84
33
4This is stable release of m2vmp2cut -- frame accurate (currently PAL)4This is stable release of m2vmp2cut -- frame accurate (currently PAL)
5mpeg2 video (m2v file) with accompanied mp2 audio (mp2 file) cutter.5mpeg2 video (m2v file) with accompanied mp2 audio (mp2 file) cutter.
m2vmp2cut-0.82/bin/m2vmp2cut.shm2vmp2cut-0.84/bin/m2vmp2cut.sh
@@ -7,7 +7,7 @@
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: Tue 25 Sep 2012 21:47:23 EEST too10# Last modified: Fri 12 Oct 2012 16:47:06 EEST too
1111
12set -eu12set -eu
13case ${1-} in -x) set -x; shift; esac # debug help, passed thru wrapper.13case ${1-} in -x) set -x; shift; esac # debug help, passed thru wrapper.

@@ -20,7 +20,7 @@
20 warn; die Usage: m2vmp2cut '(file|directory)' $cmd "$@"20 warn; die Usage: m2vmp2cut '(file|directory)' $cmd "$@"
21}21}
2222
23x () { echo + "$@"; "$@"; }23x () { echo + "$@" >&2; "$@"; }
2424
25M2VMP2CUT_CMD_PATH=`cd \`dirname "$0"\`; pwd`25M2VMP2CUT_CMD_PATH=`cd \`dirname "$0"\`; pwd`
26case $M2VMP2CUT_CMD_PATH in26case $M2VMP2CUT_CMD_PATH in

@@ -35,8 +35,12 @@
35 case $1 in 6) exit 0 ;; *) exit 1 ;; esac35 case $1 in 6) exit 0 ;; *) exit 1 ;; esac
36}36}
3737
38cmd_lvev6frames () # Legacy m2vmp2cut support; dig cutpoints from ~/.lve/* file38cmd_lvev6frames () ## Legacy m2vmp2cut support; dig cutpoints from ~/.lve/*
39{39{
40 case ${1-} in '!') ;; *)
41 warn; warn "'lvev6frames' is deprecated command"
42 die "to use this add '!' to the command line"
43 esac
40 $M2VMP2CUT_CMD_PATH/lvev6frames.pl44 $M2VMP2CUT_CMD_PATH/lvev6frames.pl
41}45}
4246

@@ -196,7 +200,7 @@
196 do200 do
197 case $line in *~) continue; esac201 case $line in *~) continue; esac
198 sed -n '2 { s/./ '"$line"' /202 sed -n '2 { s/./ '"$line"' /
199 s/\(.\{12\}\) */\1/p; q; }' $line203 s/\(.\{15\}\) */\1/p; q; }' $line
200 done204 done
201 echo; exit 0205 echo; exit 0
202 esac206 esac

@@ -286,14 +290,15 @@
286# ---290# ---
287291
288case ${1-} in '')292case ${1-} in '')
289 bn=`basename "$0" .sh`293 bn=`exec basename "$0" .sh`
290 echo294 echo
291 echo Usage: $bn '[-batch] (file|directory) <command> [args]'295 echo Usage: $bn '[-batch] (file|directory) <command> [args]'
292 echo296 echo
293 echo $bn commands available:297 echo $bn commands available:
294 echo298 echo
295 sed -n '/^cmd_[a-z0-9_]/ { s/cmd_/ /; s/ () [ -#]*/ /299 sed -n '/^cmd_[a-z0-9_].*() *#[^#]/ { s/cmd_/ /;
300 s/ () [ -#]*/ /
296 s/$0/'"`exec basename "$0"`"'/; s/\(.\{14\}\) */\1/p; }' "$0"301 s/$0/'"$bn"'/; s/\(.\{14\}\) */\1/p; }' "$0"
297 echo302 echo
298 echo Command can be abbreviated to any unambiguous prefix.303 echo Command can be abbreviated to any unambiguous prefix.
299 echo304 echo

@@ -333,11 +338,13 @@
333338
334# fixme: move these to separate doc file (w/ locale extension)339# fixme: move these to separate doc file (w/ locale extension)
335340
336#h lvev6frames: lvev6frames (no options)341#h lvev6frames: lvev6frames !
337#h lvev6frames:342#h lvev6frames:
338#h lvev6frames: Old versions of m2vmp2cut supported using lve-generated343#h lvev6frames: Old versions of m2vmp2cut supported using lve-generated
339#h lvev6frames: "edit lists" for cutpoint information. With lvev6frames344#h lvev6frames: "edit lists" for cutpoint information. With lvev6frames
340#h lvev6frames: these old edits can be used with this m2vmp2cut version345#h lvev6frames: these old edits can be used with this m2vmp2cut version.
346#h lvev6frames: This is deprecated feature. To use this the '!' needs to
347#h lvev6frames: be added to the command line.
341#h lvev6frames:348#h lvev6frames:
342349
343#h demux: demux [projectx options]350#h demux: demux [projectx options]
m2vmp2cut-0.82/contrib/mpeg2.shm2vmp2cut-0.84/contrib/mpeg2.sh
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2# re-encode to mpeg2, using mpeg2enc. original mp2 audio is muxed in.2# re-encode mpeg2 video using mpeg2enc, with original mp2 audio
3#3#
4# Author: Tomi Ollila -- too ät iki piste fi4# Author: Tomi Ollila -- too ät iki piste fi
5#5#

@@ -7,7 +7,7 @@
7# All rights reserved7# All rights reserved
8#8#
9# Created: Mon Aug 18 18:54:24 EEST 2008 too9# Created: Mon Aug 18 18:54:24 EEST 2008 too
10# Last modified: Mon Aug 18 20:49:45 EEST 2008 too10# Last modified: Fri 12 Oct 2012 16:45:39 EEST too
1111
1212
13case $1 in13case $1 in

@@ -19,8 +19,7 @@
1919
20 initial version, most of the planned features missing (not much even tested!).20 initial version, most of the planned features missing (not much even tested!).
2121
22 current options: (4:3|16:9) <dir>22 current options: (4:3|16:9)
23 <dir>: m2vmp2cut-created directory containing source to be encoded
2423
25 currently fixed bitrate: 2000 kb/s24 currently fixed bitrate: 2000 kb/s
2625

@@ -31,8 +30,7 @@
31.30.
32exit 0 ;; esac31exit 0 ;; esac
3332
33src=$M2VMP2CUT_MEDIA_DIRECTORY
34case $2 in '') exit 1;; esac
35test -d "$2" || exit 2;
3634
37denoisefilt=35denoisefilt=
38deintfilter=36deintfilter=

@@ -42,9 +40,9 @@
42trap "rm -f fifo.video.$$ fifo.audio.$$" 040trap "rm -f fifo.video.$$ fifo.audio.$$" 0
43mkfifo fifo.video.$$ fifo.audio.$$41mkfifo fifo.video.$$ fifo.audio.$$
4442
45$M2VMP2CUT_CMD_DIRNAME/bin/getmp2.sh "$2" > fifo.audio.$$ &43$M2VMP2CUT_CMD_DIRNAME/bin/getmp2.sh "$src" > fifo.audio.$$ &
4644
47eval "$M2VMP2CUT_CMD_DIRNAME/bin/getyuv.pl '$2' $filters" | \45eval "$M2VMP2CUT_CMD_DIRNAME/contrib/ffgetyuv.pl $filters" | \
48 mpeg2enc -f 3 -a $a -b 2000 -R 2 -K kvcd -s -o fifo.video.$$ 2>&1 &46 mpeg2enc -f 3 -a $a -b 2000 -R 2 -K kvcd -s -o fifo.video.$$ 2>&1 &
4947
50mplex -f 8 -o out.mpg fifo.video.$$ fifo.audio.$$48mplex -f 8 -o out.mpg fifo.video.$$ fifo.audio.$$
m2vmp2cut-0.82/contrib/webm.shm2vmp2cut-0.84/contrib/webm.sh
@@ -1,5 +1,5 @@
1#!/bin/sh1#!/bin/sh
2# encode to vp8, vorbis and put into webm (matroska subset) container2# encode to vp8 video and vorbis audio into webm container
3# -*- mode: shell-script; sh-basic-offset: 8; tab-width: 8 -*-3# -*- mode: shell-script; sh-basic-offset: 8; tab-width: 8 -*-
4# $ webm.sh $4# $ webm.sh $
5#5#

@@ -9,7 +9,7 @@
9# All rights reserved9# All rights reserved
10#10#
11# Created: Wed 19 Sep 2012 17:24:05 EEST too11# Created: Wed 19 Sep 2012 17:24:05 EEST too
12# Last modified: Sat 29 Sep 2012 15:06:11 EEST too12# Last modified: Fri 12 Oct 2012 16:46:45 EEST too
1313
14set -eu14set -eu
15#set -x15#set -x

@@ -104,8 +104,19 @@
104then die "Work in progress file '$of.wip' exists."104then die "Work in progress file '$of.wip' exists."
105fi105fi
106106
107printtimediff ()
108{
109 st=$1 et=$2; shift 2
110 awk -v s=$st -v e=$et 'BEGIN {
111 t = e - s; h = int(t / 3600); m = int(t / 60) % 60; s = t % 60
112 printf "%s", "'"$*"' "; if (h > 0) printf "%d hours ", h
113 if (m > 0) printf "%d minutes ", m; print s, "seconds"
114 }'
115
116}
107117
108m2vmp2cut_bindir=$M2VMP2CUT_CMD_DIRNAME/bin118m2vmp2cut_bindir=$M2VMP2CUT_CMD_DIRNAME/bin
119m2vmp2cut_cntdir=$M2VMP2CUT_CMD_DIRNAME/contrib
109120
110denoisefilt='| yuvdenoise'121denoisefilt='| yuvdenoise'
111#deintfilter='| yuvdeinterlace -s1' # m2vtoyuv provides "full" frames...122#deintfilter='| yuvdeinterlace -s1' # m2vtoyuv provides "full" frames...

@@ -143,7 +154,7 @@
143}154}
144fifovideo ()155fifovideo ()
145{156{
146 eval "$m2vmp2cut_bindir/getyuv.pl '$src' $filters" > fifo.video.$$ &157 eval "$m2vmp2cut_cntdir/ffgetyuv.pl $filters" > fifo.video.$$ &
147 vpid=$!158 vpid=$!
148}159}
149160

@@ -154,17 +165,31 @@
154# -q 2 ~96 ~96 - ~112 point/lossless yes165# -q 2 ~96 ~96 - ~112 point/lossless yes
155aopts="-acodec libvorbis -q:a $aq ${af:+-af $af}"166aopts="-acodec libvorbis -q:a $aq ${af:+-af $af}"
156167
157echo; echo168eval `date "+sdate='%c' ss=%s"`
169echo
170echo '***' Starting pass1 at $sdate
171echo
158mkfifos fifo.video.$$172mkfifos fifo.video.$$
159fifovideo173fifovideo
160x ffmpeg -i fifo.video.$$ -pass 1 $vopts -an -y "$of.wip"174x ffmpeg -i fifo.video.$$ -pass 1 $vopts -an -y "$of.wip"
161175
162echo; echo176eval `date "+date='%c' ms=%s"`
177echo
178echo '***' Starting pass2 at $date
179echo
163mkfifos fifo.video.$$ fifo.audio.$$180mkfifos fifo.video.$$ fifo.audio.$$
164fifoaudio181fifoaudio
165fifovideo182fifovideo
166x ffmpeg -i fifo.video.$$ -i fifo.audio.$$ -pass 2 $vopts $aopts -y "$of.wip"183x ffmpeg -i fifo.video.$$ -i fifo.audio.$$ -pass 2 $vopts $aopts -y "$of.wip"
167184
185eval `date "+date='%c' es=%s"`
186echo
187echo Started at $sdate
188printtimediff $ss $ms Pass 1 execution time:
189printtimediff $ms $es Pass 2 execution time:
190printtimediff $ss $es Total execution time:' '
191echo Completed at $date
192echo
168mv "$of".wip "$of"193mv "$of".wip "$of"
169194ls -o "$of"
170echo "Result is in '$of'"195echo
m2vmp2cut-0.82/doc/m2vcut_help-defaultm2vmp2cut-0.84/doc/m2vcut_help-default
@@ -1,3 +1,4 @@
1
1Keybindings:2Keybindings:
23
3Left Arrow: 1 frame backward.4Left Arrow: 1 frame backward.

@@ -25,6 +26,4 @@
2526
26t: Test output around current/closest cutpoint27t: Test output around current/closest cutpoint
2728
28a: Show audio graph around current position (deprecating feature)
29
30i: information (about estimated final file size)29i: information (about estimated final file size)
m2vmp2cut-0.82/doc/m2vcut_help-fi_FIm2vmp2cut-0.84/doc/m2vcut_help-fi_FI
@@ -1,3 +1,4 @@
1
1Näppäimet:2Näppäimet:
23
3Vasen nuoli: 1 kuva taaksepäin4Vasen nuoli: 1 kuva taaksepäin

@@ -25,6 +26,4 @@
2526
26t: Testaa tulos lähimmän leikkauspisteen kohdalta27t: Testaa tulos lähimmän leikkauspisteen kohdalta
2728
28a: Näytä äänigraafi nykyisen sijainnin ympärillä (vanhentuva ominaisuus)
29
30i: tietoa (lopullisesta tiedostokoosta)29i: tietoa (lopullisesta tiedostokoosta)
m2vmp2cut-0.82/m2vmp2cutm2vmp2cut-0.84/m2vmp2cut
@@ -4,4 +4,4 @@
44
5case ${1-} in '') echo; echo m2vmp2cut inplace wrapper:5case ${1-} in '') echo; echo m2vmp2cut inplace wrapper:
6esac6esac
7exec ./bin/m2vmp2cut.sh "$@"7exec "`dirname "$0"`"/bin/m2vmp2cut.sh "$@"
m2vmp2cut-0.82/Makefilem2vmp2cut-0.84/Makefile
@@ -13,7 +13,8 @@
13export PJXJAR13export PJXJAR
1414
15TRG_BINS = m2vcut-gui m2vfilter m2vscan m2vtoyuv mp2cutpoints \15TRG_BINS = m2vcut-gui m2vfilter m2vscan m2vtoyuv mp2cutpoints \
16 fileparts filerotate textdisp wavgraph warpxpointer \16 fileparts filerotate textdisp \
17 libpreload_ffm2vtoyuv4mpeghax.so \
17 m2vmp2cut.pl m2vmp2cut.sh m2v_catfiltered.py m2v_somehdrinfo.py \18 m2vmp2cut.pl m2vmp2cut.sh m2v_catfiltered.py m2v_somehdrinfo.py \
18 wrapper.sh lvev6frames.pl getyuv.pl getmp2.sh m2vmp2cut.pm19 wrapper.sh lvev6frames.pl getyuv.pl getmp2.sh m2vmp2cut.pm
1920
m2vmp2cut-0.82/makehelperm2vmp2cut-0.84/makehelper
@@ -83,6 +83,12 @@
83 do test -f $f || die "'$f' missing"83 do test -f $f || die "'$f' missing"
84 done84 done
85
86 case $VERSION in *wip*)
87 if test -d .git
88 then VERSION=$VERSION-g`git log -1 --format=format:%h`
89 fi
90 esac
8591
86 echo; echo Begin installation.; echo92 echo; echo Begin installation.; echo
87 rm -rf $PREFIX/lib/m2vmp2cut-$VERSION93 rm -rf $PREFIX/lib/m2vmp2cut-$VERSION
88 x mkdir -m 755 -p $PREFIX94 x mkdir -m 755 -p $PREFIX

@@ -133,9 +139,12 @@
133139
134cmd_snapshot ()140cmd_snapshot ()
135{141{
142 # XXX any git suffices ;/
143 test -d .git || die "Snapshotting only from git working copies"
136 VERSION=`sed 's/^m2vmp2cut *//; s/ .*//; q' NEWS`144 VERSION=`sed 's/^m2vmp2cut *//; s/ .*//; q' NEWS`
137 case $VERSION in 'wip') VERSION=`date +"snap-%Y%m%d-%H"` ;;145 case $VERSION in 'wip') VERSION=`date +"snap-%Y%m%d-%H"` ;;
146 *-wip) VERSION=$VERSION-g`git log -1 --format=format:%h` ;;
138 *-wip) ;; *) die "Snapshotting only 'wip' versions"147 *) die "Snapshotting only 'wip' versions"
139 esac148 esac
140 makedist149 makedist
141}150}
m2vmp2cut-0.82/NEWSm2vmp2cut-0.84/NEWS
@@ -1,3 +1,12 @@
1m2vmp2cut 0.84 (2012-10-14)
2===========================
3
4* Added contrib/ffgetyuv.pl which uses ffmpeg to decode m2v input.
5* Contrib scripts use ffgetyuv.pl for some m2v error concealment.
6* Hid deprecated m2vmp2cut lvev6frames feature.
7* Removed obsoleted 'a' (show agraph) feature from select GUI.
8* Some small usage/doc improvements.
9
1m2vmp2cut 0.82 (2012-09-30)10m2vmp2cut 0.82 (2012-09-30)
2===========================11===========================
312

@@ -7,8 +16,8 @@
7* Demux output files now written to subdirectory in current dir.16* Demux output files now written to subdirectory in current dir.
8* General code improvemenet with no functional change.17* General code improvemenet with no functional change.
918
10m2vmp2cut 0.78 (2008-11-20) (Lost in transition)19m2vmp2cut 0.78 (2009-11-20) (Lost and Found)
11================================================20============================================
1221
13* If 'projectx' command is found (in PATH), that is used.22* If 'projectx' command is found (in PATH), that is used.
14* Demux can demux multiple files.23* Demux can demux multiple files.
m2vmp2cut-0.82/READMEm2vmp2cut-0.84/README
@@ -1,5 +1,5 @@
11
2m2vmp2cut 0.822m2vmp2cut 0.84
33
4m2vmp2cut is command-line driven frame accurate (currently PAL) mpeg24m2vmp2cut is command-line driven frame accurate (currently PAL) mpeg2
5video (m2v file) with accompanied mp2 audio (mp2 file) cutter.5video (m2v file) with accompanied mp2 audio (mp2 file) cutter.
m2vmp2cut-0.82/src/m2vcut-gui.cm2vmp2cut-0.84/src/m2vcut-gui.c
@@ -22,7 +22,7 @@
22 * All rights reserved22 * All rights reserved
23 *23 *
24 * Created: Sun Dec 30 14:17:12 EET 2007 too24 * Created: Sun Dec 30 14:17:12 EET 2007 too
25 * Last modified: Wed 26 Sep 2012 13:32:03 EEST too25 * Last modified: Wed 10 Oct 2012 16:56:13 EEST too
26 */26 */
2727
28// later (maybe?) test, undo, append-cut/merge to file (w/htonl()))28// later (maybe?) test, undo, append-cut/merge to file (w/htonl()))

@@ -1870,6 +1870,7 @@
1870 M.mpeg2filename, afp, gfp, allframes, greenframes, null);1870 M.mpeg2filename, afp, gfp, allframes, greenframes, null);
1871}1871}
18721872
1873#if 0
1873static void show_agraph(void)1874static void show_agraph(void)
1874{1875{
1875 char cfs[12], lfs[12];1876 char cfs[12], lfs[12];

@@ -1878,6 +1879,7 @@
1878 run_command(m2vmp2cut_command("wrapper.sh"), "m2vcut_agraph",1879 run_command(m2vmp2cut_command("wrapper.sh"), "m2vcut_agraph",
1879 M.mpeg2filename, cfs, lfs, null);1880 M.mpeg2filename, cfs, lfs, null);
1880}1881}
1882#endif
18811883
1882gboolean main_window_delete_event(void * w, void * e, void * d)1884gboolean main_window_delete_event(void * w, void * e, void * d)
1883{1885{

@@ -1970,7 +1972,7 @@
1970 case GDK_h: show_help(); break;1972 case GDK_h: show_help(); break;
1971 case GDK_i: show_info(); break;1973 case GDK_i: show_info(); break;
1972 case GDK_t: test_cutpoint(); break;1974 case GDK_t: test_cutpoint(); break;
1973 case GDK_a: show_agraph(); break;1975 //case GDK_a: show_agraph(); break;
19741976
1975 case GDK_q:1977 case GDK_q:
1976 if (prevkey == GDK_q)1978 if (prevkey == GDK_q)
m2vmp2cut-0.82/src/Makefilem2vmp2cut-0.84/src/Makefile
@@ -17,10 +17,11 @@
17EGHDRS=$(TOCCODE:%=ghdrs/%.h)17EGHDRS=$(TOCCODE:%=ghdrs/%.h)
1818
19BINARIES= ../bin/m2vscan ../bin/m2vfilter ../bin/fileparts ../bin/filerotate \19BINARIES= ../bin/m2vscan ../bin/m2vfilter ../bin/fileparts ../bin/filerotate \
20 ../bin/mp2cutpoints ../bin/m2vcut-gui ../bin/m2vtoyuv ../bin/wavgraph \20 ../bin/mp2cutpoints ../bin/m2vcut-gui ../bin/m2vtoyuv ../bin/textdisp
21 ../bin/warpxpointer ../bin/textdisp
2221
22PRELOADS= ../bin/libpreload_ffm2vtoyuv4mpeghax.so
23
23all: $(BINARIES)24all: $(BINARIES) $(PRELOADS)
2425
25#obj_b/embeds.o: $(EGHDRS)26#obj_b/embeds.o: $(EGHDRS)
2627

@@ -88,18 +89,23 @@
88 sh m2vcut-gui.c && mv m2vcut-gui ../bin89 sh m2vcut-gui.c && mv m2vcut-gui ../bin
89# $(CC) $(CFLAGS) -c $< -o $@90# $(CC) $(CFLAGS) -c $< -o $@
9091
91../bin/wavgraph: wavgraph.c obj_b/x.o92#../bin/wavgraph: wavgraph.c obj_b/x.o
92 sh wavgraph.c && mv wavgraph ../bin93# sh wavgraph.c && mv wavgraph ../bin
9394
94../bin/m2vtoyuv: m2vtoyuv.c config/mpeg2.conf95../bin/m2vtoyuv: m2vtoyuv.c config/mpeg2.conf
95 sh m2vtoyuv.c && mv m2vtoyuv ../bin96 sh m2vtoyuv.c && mv m2vtoyuv ../bin
9697
97../bin/warpxpointer: warpxpointer.c98#../bin/warpxpointer: warpxpointer.c
98 sh warpxpointer.c && mv warpxpointer ../bin99# sh warpxpointer.c && mv warpxpointer ../bin
99100
100../bin/textdisp: textdisp.c101../bin/textdisp: textdisp.c
101 sh textdisp.c && mv textdisp ../bin102 sh textdisp.c && mv textdisp ../bin
102103
104../bin/libpreload_ffm2vtoyuv4mpeghax.so: libpreload_ffm2vtoyuv4mpeghax.c
105 sh $<
106 chmod 644 libpreload_ffm2vtoyuv4mpeghax.so
107 mv libpreload_ffm2vtoyuv4mpeghax.so ../bin
108
103config/mpeg2.conf: ../tools/chksyslibmpeg.sh ../tools/chklibmpeg-051.sh109config/mpeg2.conf: ../tools/chksyslibmpeg.sh ../tools/chklibmpeg-051.sh
104 ../tools/chksyslibmpeg.sh || ../tools/chklibmpeg-051.sh ..110 ../tools/chksyslibmpeg.sh || ../tools/chklibmpeg-051.sh ..
105111

@@ -145,7 +151,7 @@
145 rm -rf *~ *.o ghdrs obj_m obj_b config151 rm -rf *~ *.o ghdrs obj_m obj_b config
146152
147distclean: clean153distclean: clean
148 rm -f $(BINARIES) libmpeg2-svn-trunk154 rm -f $(BINARIES) $(PRELOADS) libmpeg2-svn-trunk
149155
150# Embedded scripts follow...156# Embedded scripts follow...
151157
uni2htmldiff.py