sensible-cinema 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/LICENSE.TXT +70 -0
- data/README +95 -29
- data/TODO +85 -71
- data/USAGE_TERMS.TXT +15 -0
- data/VERSION +1 -1
- data/bin/sensible-cinema +90 -32
- data/bin/sensible-cinema-cli +17 -0
- data/edit sensible cinema decision list files.bat b/data/create new sensible cinema decision list → files.bat +0 -0
- data/ext/mkrf_conf.rb +17 -0
- data/how_to_create +1 -0
- data/lib/add_any_bundled_gems_to_load_path.rb +17 -0
- data/lib/blanker.rb +17 -0
- data/lib/drive_info.rb +17 -0
- data/lib/edl_parser.rb +17 -0
- data/lib/fake_blanker.rb +17 -0
- data/lib/file_chooser.rb +17 -0
- data/lib/keyboard_input.rb +17 -0
- data/lib/mencoder_wrapper.rb +32 -33
- data/lib/mouse.rb +17 -0
- data/lib/mouse_forever.rb +17 -0
- data/lib/mplayer_edl.rb +31 -0
- data/lib/muter.rb +17 -0
- data/lib/ocr.rb +17 -0
- data/lib/overlayer.rb +17 -0
- data/lib/screen_tracker.rb +18 -1
- data/lib/storage.rb +99 -82
- data/lib/swing_helpers.rb +17 -0
- data/lib/vlc_programmer.rb +17 -0
- data/preamble +17 -0
- data/sensible-cinema.gemspec +12 -5
- data/spec/blanker.spec.rb +17 -0
- data/spec/common.rb +17 -0
- data/spec/convert_image.rb +17 -0
- data/spec/drive_info.spec.rb +17 -0
- data/spec/edl_parser.spec.rb +17 -0
- data/spec/keyboard_input.spec.rb +17 -0
- data/spec/mencoder_wrapper.spec.rb +61 -21
- data/spec/mouse.spec.rb +17 -0
- data/spec/mplayer_edl.spec.rb +33 -0
- data/spec/muter.spec.rb +17 -0
- data/spec/ocr.spec.rb +17 -0
- data/spec/overlayer.spec.rb +17 -0
- data/spec/screen_tracker.spec.rb +17 -0
- data/spec/sensible_cinema_gui.spec.rb +38 -16
- data/spec/swing_helpers.spec.rb +17 -0
- data/spec/vlc_programmer.spec.rb +17 -0
- data/zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt +23 -1
- data/zamples/edit_decision_lists/dvds/Harry Potter 2.txt +18 -0
- data/zamples/edit_decision_lists/dvds/pack_wedding_2007-03-03.txt +24 -0
- data/zamples/edit_decision_lists/example_edit_decision_list.txt +1 -1
- metadata +13 -6
- data/LICENSE +0 -56
data/lib/swing_helpers.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require 'java'
|
2
19
|
module SensibleSwing
|
3
20
|
include_package 'javax.swing'
|
data/lib/vlc_programmer.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require_relative 'overlayer'
|
2
19
|
|
3
20
|
class VLCProgrammer
|
data/preamble
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
data/sensible-cinema.gemspec
CHANGED
@@ -5,31 +5,32 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sensible-cinema}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.18.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roger Pack"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-13}
|
13
13
|
s.email = %q{rogerdpack@gmail.com}
|
14
14
|
s.executables = ["sensible-cinema", "sensible-cinema-cli"]
|
15
15
|
s.extensions = ["ext/mkrf_conf.rb"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"ChangeLog",
|
18
|
-
"LICENSE",
|
18
|
+
"LICENSE.TXT",
|
19
19
|
"README",
|
20
20
|
"TODO"
|
21
21
|
]
|
22
22
|
s.files = [
|
23
23
|
"ChangeLog",
|
24
|
-
"LICENSE",
|
24
|
+
"LICENSE.TXT",
|
25
25
|
"README",
|
26
26
|
"RUN SENSIBLE CINEMA CLICK HERE.bat",
|
27
27
|
"Rakefile",
|
28
28
|
"TODO",
|
29
|
+
"USAGE_TERMS.TXT",
|
29
30
|
"VERSION",
|
30
31
|
"bin/sensible-cinema",
|
31
32
|
"bin/sensible-cinema-cli",
|
32
|
-
"
|
33
|
+
"create new sensible cinema decision list files.bat",
|
33
34
|
"experimental_readme.txt",
|
34
35
|
"ext/mkrf_conf.rb",
|
35
36
|
"gplv3.txt",
|
@@ -44,6 +45,7 @@ Gem::Specification.new do |s|
|
|
44
45
|
"lib/mencoder_wrapper.rb",
|
45
46
|
"lib/mouse.rb",
|
46
47
|
"lib/mouse_forever.rb",
|
48
|
+
"lib/mplayer_edl.rb",
|
47
49
|
"lib/muter.rb",
|
48
50
|
"lib/ocr.rb",
|
49
51
|
"lib/overlayer.rb",
|
@@ -52,6 +54,7 @@ Gem::Specification.new do |s|
|
|
52
54
|
"lib/swing_helpers.rb",
|
53
55
|
"lib/vlc_programmer.rb",
|
54
56
|
"never_do",
|
57
|
+
"preamble",
|
55
58
|
"sensible-cinema.gemspec",
|
56
59
|
"spec/blanker.spec.rb",
|
57
60
|
"spec/common.rb",
|
@@ -108,6 +111,7 @@ Gem::Specification.new do |s|
|
|
108
111
|
"spec/keyboard_input.spec.rb",
|
109
112
|
"spec/mencoder_wrapper.spec.rb",
|
110
113
|
"spec/mouse.spec.rb",
|
114
|
+
"spec/mplayer_edl.spec.rb",
|
111
115
|
"spec/muter.spec.rb",
|
112
116
|
"spec/ocr.spec.rb",
|
113
117
|
"spec/overlayer.spec.rb",
|
@@ -122,6 +126,7 @@ Gem::Specification.new do |s|
|
|
122
126
|
"vendor/unzip.exe",
|
123
127
|
"zamples/edit_decision_lists/category descriptions.txt",
|
124
128
|
"zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt",
|
129
|
+
"zamples/edit_decision_lists/dvds/Harry Potter 2.txt",
|
125
130
|
"zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt",
|
126
131
|
"zamples/edit_decision_lists/dvds/bobs_big_plan.txt",
|
127
132
|
"zamples/edit_decision_lists/dvds/happiest baby on the block.txt",
|
@@ -132,6 +137,7 @@ Gem::Specification.new do |s|
|
|
132
137
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/labyrinth.txt",
|
133
138
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/making marriage work.txt",
|
134
139
|
"zamples/edit_decision_lists/dvds/old_and_inaccurate/star_trek_generations_hulu.txt",
|
140
|
+
"zamples/edit_decision_lists/dvds/pack_wedding_2007-03-03.txt",
|
135
141
|
"zamples/edit_decision_lists/example_edit_decision_list.txt",
|
136
142
|
"zamples/edit_decision_lists/old_not_yet_update/youtube/gummy_bear_song_youtube.txt",
|
137
143
|
"zamples/edit_decision_lists/old_not_yet_update/youtube/nuki_song_youtube.txt",
|
@@ -159,6 +165,7 @@ Gem::Specification.new do |s|
|
|
159
165
|
"spec/keyboard_input.spec.rb",
|
160
166
|
"spec/mencoder_wrapper.spec.rb",
|
161
167
|
"spec/mouse.spec.rb",
|
168
|
+
"spec/mplayer_edl.spec.rb",
|
162
169
|
"spec/muter.spec.rb",
|
163
170
|
"spec/ocr.spec.rb",
|
164
171
|
"spec/overlayer.spec.rb",
|
data/spec/blanker.spec.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.dirname(__FILE__) + '/common'
|
2
19
|
require_relative '../lib/blanker.rb'
|
3
20
|
|
data/spec/common.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require 'rubygems'
|
2
19
|
begin
|
3
20
|
require 'rspec' # rspec2
|
data/spec/convert_image.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require 'rubygems'
|
2
19
|
require 'sane'
|
3
20
|
require 'RMagick'
|
data/spec/drive_info.spec.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
2
19
|
require_relative '../lib/drive_info'
|
3
20
|
|
data/spec/edl_parser.spec.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
2
19
|
require_relative '../lib/edl_parser'
|
3
20
|
|
data/spec/keyboard_input.spec.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
2
19
|
require_relative '../lib/keyboard_input'
|
3
20
|
|
@@ -1,12 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.dirname(__FILE__) + "/common"
|
2
19
|
require_relative '../lib/mencoder_wrapper'
|
3
20
|
require_relative '../lib/edl_parser'
|
4
21
|
|
22
|
+
# mpeg fulli_unedited one pass doesn't look "awful"
|
23
|
+
# mp4 fulli_unedited default looks way granular
|
24
|
+
# so could either attempt to re-encode at high cpu, possibly still lossy
|
25
|
+
# or do the frame accurate splitter. Prefer the latter.
|
26
|
+
|
5
27
|
describe MencoderWrapper do
|
6
28
|
|
7
29
|
before do
|
8
|
-
FileUtils.rm 'to_here.
|
9
|
-
FileUtils.rm 'to_here.
|
30
|
+
FileUtils.rm 'to_here.fulli_unedited.tmp.mpg.done' rescue nil
|
31
|
+
FileUtils.rm 'to_here.fulli_unedited.tmp.mpg' rescue nil
|
10
32
|
@a = EdlParser.parse_file "../zamples/edit_decision_lists/dvds/bobs_big_plan.txt"
|
11
33
|
@out = MencoderWrapper.get_bat_commands @a, "e:\\", 'to_here'
|
12
34
|
end
|
@@ -19,31 +41,39 @@ describe MencoderWrapper do
|
|
19
41
|
it "should have what looks like a working mencoder grab command" do
|
20
42
|
@out.should match(/mencoder dvdnav:/)
|
21
43
|
@out.should match(/dvdnav.*lavcopt.*keyint=1/)
|
22
|
-
|
44
|
+
use_mpg2_fulli_unedited = true
|
45
|
+
if use_mpg2_fulli_unedited
|
46
|
+
@out.should match(/dvdnav.*lavcopt.*mpeg2video/)
|
47
|
+
@out.should match(/autoaspect/) # try to preserve aspect
|
48
|
+
end
|
23
49
|
end
|
24
50
|
|
25
51
|
it "should avoid subtitles" do
|
26
52
|
@out.should match(/-sid 1000/)
|
27
53
|
end
|
28
54
|
|
55
|
+
it "should default to english" do
|
56
|
+
@out.should match(/-alang en/)
|
57
|
+
end
|
58
|
+
|
29
59
|
it "should create a .done file after ripping" do
|
30
|
-
@out.should include("&& echo got_file > to_here.
|
60
|
+
@out.should include("&& echo got_file > to_here.fulli_unedited.tmp.mpg.done")
|
31
61
|
end
|
32
62
|
|
33
63
|
def go
|
34
64
|
@out = MencoderWrapper.get_bat_commands @a, "e:\\", 'to_here'
|
35
65
|
end
|
36
66
|
|
37
|
-
it "should not
|
67
|
+
it "should not grab it again if the .done file exists and the original file exist" do
|
38
68
|
go
|
39
|
-
@out.should include(" -o to_here.
|
69
|
+
@out.should include(" -o to_here.fulli_unedited.tmp.mpg")
|
40
70
|
|
41
|
-
FileUtils.touch 'to_here.
|
71
|
+
FileUtils.touch 'to_here.fulli_unedited.tmp.mpg.done'
|
42
72
|
go
|
43
|
-
@out.should include(" -o to_here.
|
44
|
-
FileUtils.touch 'to_here.
|
73
|
+
@out.should include(" -o to_here.fulli_unedited.tmp.mpg")
|
74
|
+
FileUtils.touch 'to_here.fulli_unedited.tmp.mpg'
|
45
75
|
go
|
46
|
-
@out.should match(/@rem.*-o to_here.
|
76
|
+
@out.should match(/@rem.*-o to_here.fulli_unedited.tmp.mpg/)
|
47
77
|
end
|
48
78
|
|
49
79
|
it "should raise if the output file is held by some other process" do
|
@@ -107,12 +137,22 @@ describe MencoderWrapper do
|
|
107
137
|
@out.should match(/del to_here.1.avi/)
|
108
138
|
end
|
109
139
|
|
110
|
-
it "should rm
|
111
|
-
|
140
|
+
it "should rm the files in the code, not the batch commands" do
|
141
|
+
FileUtils.touch 'to_here.3.avi'
|
142
|
+
File.exist?('to_here.3.avi').should be true
|
143
|
+
out = MencoderWrapper.get_bat_commands @a, "e:\\", 'to_here'
|
144
|
+
out.should_not match(/del to_here.3.avi$/)
|
145
|
+
File.exist?('to_here.3.avi').should be false
|
146
|
+
end
|
147
|
+
|
148
|
+
it "should echo that it is done, and with the right filename" do
|
149
|
+
@out.should match(/echo wrote.*to_here.avi/)
|
112
150
|
end
|
113
151
|
|
114
|
-
it "should
|
115
|
-
|
152
|
+
it "should accept audio_code" do
|
153
|
+
settings = {"audio_codec"=>"pcm"}
|
154
|
+
out = MencoderWrapper.get_bat_commands settings, "e:\\", 'to_here.avi'
|
155
|
+
out.should include("-oac pcm")
|
116
156
|
end
|
117
157
|
|
118
158
|
def setup
|
@@ -135,14 +175,14 @@ describe MencoderWrapper do
|
|
135
175
|
|
136
176
|
it "should lop off a fraction of a second per segment, as per wiki instructions" do
|
137
177
|
setup
|
138
|
-
@out.should match(
|
178
|
+
@out.should match(/0.999/)
|
139
179
|
end
|
140
180
|
|
141
181
|
it "should not have doubled .avi.avi's" do
|
142
182
|
setup
|
143
|
-
# lodo cleanup this ugliness
|
144
|
-
@out.scan(
|
145
|
-
@out.scan(
|
183
|
+
# lodo cleanup this ugliness [.avi.1.avi]...
|
184
|
+
@out.scan(/(ffmpeg|mencoder).*to_here.avi.1.avi/).length.should be >= 1
|
185
|
+
@out.scan(/(ffmpeg|mencoder).*to_here.avi.2.avi/).length.should be >= 1
|
146
186
|
end
|
147
187
|
|
148
188
|
context 'pinpointing sections' do
|
@@ -151,7 +191,7 @@ describe MencoderWrapper do
|
|
151
191
|
@out = MencoderWrapper.get_bat_commands settings, "e:\\", 'to_here.avi', '00:14', '00:25'
|
152
192
|
end
|
153
193
|
|
154
|
-
it "should always somewhat
|
194
|
+
it "should always somewhat grab the whole thing, no endpos" do
|
155
195
|
@out.should_not match(/mencoder dvd.*endpos/)
|
156
196
|
end
|
157
197
|
|
@@ -160,8 +200,8 @@ describe MencoderWrapper do
|
|
160
200
|
@out.should include("14.0")
|
161
201
|
@out.should_not include("99999")
|
162
202
|
@out.should include(" 0 ") # no start at 0 even
|
163
|
-
@out.should
|
164
|
-
@out.should
|
203
|
+
@out.should match(/-ss 14.0.*0.999/)
|
204
|
+
@out.should match(/-ss 15.0.*4.999/)
|
165
205
|
end
|
166
206
|
|
167
207
|
it "should allow you to play something even if there's no edit list, just for examination sake" do
|
data/spec/mouse.spec.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright 2010, Roger Pack
|
3
|
+
This file is part of Sensible Cinema.
|
4
|
+
|
5
|
+
Sensible Cinema is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
Sensible Cinema is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
=end
|
1
18
|
require File.expand_path(File.dirname(__FILE__) + '/common')
|
2
19
|
require_relative '../lib/mouse'
|
3
20
|
|