sensible-cinema 0.18.2 → 0.18.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -0
- data/Rakefile +5 -2
- data/TODO +14 -18
- data/VERSION +1 -1
- data/bin/sensible-cinema +62 -42
- data/{create new sensible cinema decision list files.bat → create or edit sensible cinema decision list files.bat} +0 -0
- data/lib/edl_parser.rb +1 -1
- data/sensible-cinema.gemspec +4 -3
- data/spec/edl_parser.spec.rb +1 -1
- data/spec/mencoder_wrapper.spec.rb +5 -3
- data/spec/sensible_cinema_gui.spec.rb +57 -18
- data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +19 -0
- data/zamples/edit_decision_lists/example_edit_decision_list.txt +1 -1
- metadata +5 -4
data/README
CHANGED
@@ -158,6 +158,8 @@ If it says "audio problem try pcm" then you can add
|
|
158
158
|
"audio_codec" => "lavc"
|
159
159
|
to your EDL and try again.
|
160
160
|
|
161
|
+
Also if your DVD playback has no audio, try the "lavc" setting, above. And report it (see feedback).
|
162
|
+
|
161
163
|
== Feedback ==
|
162
164
|
|
163
165
|
Feedback, including feature requests, comments, etc. welcome.
|
data/Rakefile
CHANGED
@@ -63,8 +63,11 @@ task 'bundle_dependencies' => 'gemspec' do
|
|
63
63
|
dependencies = spec.runtime_dependencies
|
64
64
|
dependencies = (dependencies + get_transitive_dependencies(dependencies)).uniq
|
65
65
|
Gem.loaded_specs.select{|name, spec| name == 'os'}
|
66
|
-
Dir['vendor/cache
|
67
|
-
|
66
|
+
Dir['vendor/cache/*'].each{|f|
|
67
|
+
unless f =~ /jruby.*jar/ # that one takes too long to download...
|
68
|
+
FileUtils.rm_rf f
|
69
|
+
raise 'unable to delete ' + f if File.exist?(f)
|
70
|
+
end
|
68
71
|
}
|
69
72
|
FileUtils.mkdir_p 'vendor/cache'
|
70
73
|
Dir.chdir 'vendor/cache' do
|
data/TODO
CHANGED
@@ -4,30 +4,18 @@
|
|
4
4
|
|
5
5
|
simplify/de-bugify
|
6
6
|
|
7
|
-
that button shows up? (issue 10)
|
8
|
-
|
9
|
-
EDL for blender movie...
|
10
|
-
re-run latest preview -> auto play in smplayer
|
11
|
-
move that one button *out* ...
|
12
7
|
only pick a drive once per session
|
13
8
|
only pick output filename once per session...
|
9
|
+
does this allow me to kill that other button?
|
10
|
+
if not: re-run latest preview -> auto play in smplayer
|
14
11
|
kill mencoder instances.
|
15
12
|
|
16
|
-
calculating disk's unique id...
|
17
|
-
F:\, Roger's Wedding, a2e3ece630251e4a785218ce71a20ce1
|
18
|
-
got fatal exception
|
19
|
-
D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/pack_wedding_2007-03-03.txt:12: syntax error, unexpected tSTRING_BEG
|
20
|
-
|
21
|
-
"disk_unique_id" => "a2e3ece630251e4a785218ce71a20ce1",
|
22
|
-
^
|
23
|
-
D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/pack_wedding_2007-03-03.txt:1:in `parse_string'
|
24
|
-
during "initial create rip" can watch it (unedited) while it's still ripping (mplayer)
|
25
|
-
|
26
13
|
assert that at least one drive has a DVD in it...maybe loop refuse with message until this?
|
27
|
-
disallow choosing empty drive? fail cleaner? (issue 11)
|
28
14
|
|
29
15
|
== slightly lower than that, somewhat ordered ==
|
30
16
|
|
17
|
+
disallow choosing empty drive? fail cleaner? (issue 11)
|
18
|
+
make them acknowledge "just because it lacks profanity...does not immediately make it an inspiring experience."
|
31
19
|
compare computer DVD timings with physical player...
|
32
20
|
|
33
21
|
mpeg is lossy (at least my current one pass one is)
|
@@ -44,11 +32,13 @@ D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/p
|
|
44
32
|
play a bigger noise when totally done...(dvd flick'ish...)
|
45
33
|
note that this can corrupt your soul!
|
46
34
|
don't watch it if it's dark! come on!
|
35
|
+
dove.org, your kids will find the originals!
|
47
36
|
does ffdshow let WMP playback the audio on those files?
|
48
37
|
|
49
38
|
== DVD backlog (unordered, some very low prio, basically never do) ==
|
50
39
|
|
51
|
-
|
40
|
+
@mplayer you *die* with edl's on many DVD's...
|
41
|
+
with "preview segment" can't you preview it once it has passed that segment?
|
52
42
|
can pull from imdb at package time [?]
|
53
43
|
delete fulli file
|
54
44
|
except if it's a specific scene run...
|
@@ -68,6 +58,7 @@ D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/p
|
|
68
58
|
advertise in christian places
|
69
59
|
alternative.to
|
70
60
|
blogs that have ever mentioned clearplay :P
|
61
|
+
free google adwords (?)
|
71
62
|
LLC before ever pay anyone, if I ever do
|
72
63
|
@DVD flick: support multi-track audio/subtitles (if they're already in the streams...)
|
73
64
|
note the mplayer/smplayer as a player fast forward feature...
|
@@ -77,7 +68,6 @@ D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/p
|
|
77
68
|
provide link for cheap DVD decoder if absent [ffdshow?] :)
|
78
69
|
"round conservatively, write no file" playback
|
79
70
|
mplayer batch (playlist?)
|
80
|
-
can generate mplayer EDL's and play them...hmm...smplayer them?
|
81
71
|
"round conservatively, yes write file"
|
82
72
|
then I guess they could play it back immediately...?
|
83
73
|
get half-way through (rip, start writing edited copy), then start playing back as writing edited full copy
|
@@ -125,6 +115,9 @@ D:\dev\sensible-cinema-never-commit-from-here\zamples\edit_decision_lists\dvds/p
|
|
125
115
|
@VLC: hard crash when ripping that one DVD...long one, about the constitution...
|
126
116
|
in general, fine tune burning with various things...
|
127
117
|
|
118
|
+
|
119
|
+
@rspec: it appears to *undo* my stub's after the test, so background threads choke (take out after...)
|
120
|
+
|
128
121
|
make sure can work with very large DVD's...
|
129
122
|
can use a fast temp drive, save through it to another :P
|
130
123
|
(when they have two...)
|
@@ -147,6 +140,9 @@ Note to people: clean your disks!
|
|
147
140
|
|
148
141
|
@mencoder: cannot rip from dvd with -ovc copy -oac copy (tearing)
|
149
142
|
|
143
|
+
@ffmpeg: rip to fulli mpeg -> ffmpeg -ovc copy -oac copy out.mpg -> no audio!
|
144
|
+
and to .avi sometimes works, sometimes it results in static!
|
145
|
+
|
150
146
|
burnable to DVD/CD/multi DVD automagically... (auto-burn insert your new disk!)
|
151
147
|
can *re-use* original navigation stuffs, less the profanity (is that possible? VobBlanker help, perhaps?)
|
152
148
|
can lop off sections to save space (?)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.
|
1
|
+
0.18.3
|
data/bin/sensible-cinema
CHANGED
@@ -78,7 +78,7 @@ module SensibleSwing
|
|
78
78
|
def initialize
|
79
79
|
super "Sensible-Cinema"
|
80
80
|
version = File.read(File.dirname(__FILE__) + "/../VERSION")
|
81
|
-
|
81
|
+
puts "v. " + version.strip
|
82
82
|
if !(Storage['main_license_accepted'] == version)
|
83
83
|
show_blocking_license_accept_dialog 'Sensible Cinema', 'gplv3', 'http://www.gnu.org/licenses/gpl.html'
|
84
84
|
show_blocking_license_accept_dialog 'Sensible Cinema', 'LICENSE file', File.expand_path(File.dirname(__FILE__) + "/../LICENSE.TXT"), 'LICENSE file', 'I acknowledge that I have read the LICENSE file.'
|
@@ -105,26 +105,24 @@ module SensibleSwing
|
|
105
105
|
do_copy_dvd_to_hard_drive false
|
106
106
|
}
|
107
107
|
|
108
|
-
@
|
109
|
-
@
|
108
|
+
@mplayer_edl = new_jbutton( "Watch DVD on computer edited realtime", false )
|
109
|
+
@mplayer_edl.on_clicked {
|
110
110
|
drive, dvd_volume_name, md5sum, edl_path, descriptors = choose_dvd_and_edl_for_it
|
111
111
|
temp_dir = Dir.tmpdir
|
112
112
|
temp_file = temp_dir + '/mplayer.temp.edl'
|
113
113
|
edl_contents = MplayerEdl.convert_to_edl descriptors
|
114
114
|
File.write(temp_file, edl_contents)
|
115
|
-
|
116
|
-
# oh the insanity...
|
115
|
+
title_track = get_title_track(descriptors)
|
116
|
+
# oh the insanity of the console UI...LODO more user friendly player
|
117
117
|
popup = NonBlockingDialog.new("Running mplayer. To control it, use space for pause.\n
|
118
118
|
Also right and left arrows to seek, F key for full screen,
|
119
119
|
q to quit.")
|
120
120
|
# LODO dry up mplayer opts...
|
121
|
-
|
122
|
-
|
123
|
-
p command
|
124
|
-
system_non_blocking command
|
121
|
+
command = "mplayer dvdnav://#{title_track} -nocache -alang en -sid 1000 -edl #{File.expand_path temp_file} -dvd-device #{drive}"
|
122
|
+
Thread.new { system_blocking command; popup.dispose }
|
125
123
|
}
|
126
124
|
|
127
|
-
@watch_unedited = new_jbutton("Watch
|
125
|
+
@watch_unedited = new_jbutton("Watch a DVD unedited (while grabbing to hard drive)", true)
|
128
126
|
@watch_unedited.on_clicked {
|
129
127
|
path = RubyWhich.new.which('smplayer')
|
130
128
|
path2 = RubyWhich.new.which('mplayer')
|
@@ -144,21 +142,13 @@ module SensibleSwing
|
|
144
142
|
on_success.call
|
145
143
|
else
|
146
144
|
Thread.new {
|
147
|
-
sleep 5; on_success.call # start it anyway
|
145
|
+
sleep 5; on_success.call # start it anyway, a bit delayed to let it start spooling to disk...
|
148
146
|
}
|
149
147
|
#@after_success_once = on_success # shenanigans to be able to let that thread run...
|
150
148
|
end
|
151
149
|
end
|
152
150
|
}
|
153
151
|
|
154
|
-
@open_list = new_jbutton("Open/Edit a pre-existing DVD Edit List", true)
|
155
|
-
@open_list.on_clicked {
|
156
|
-
dialog = FileDialog.new(self, "Pick file to edit")
|
157
|
-
dialog.set_directory EDL_DIR
|
158
|
-
filename = dialog.go
|
159
|
-
open_file_to_edit_it filename if filename
|
160
|
-
}
|
161
|
-
|
162
152
|
@preview_section = new_jbutton( "Preview a certain time frame (edited)", true )
|
163
153
|
@preview_section.on_clicked {
|
164
154
|
success_no_run, wrote_to_here_fulli = do_copy_dvd_to_hard_drive true
|
@@ -172,12 +162,20 @@ module SensibleSwing
|
|
172
162
|
end
|
173
163
|
}
|
174
164
|
|
175
|
-
@rerun_preview = new_jbutton( "Re-run most recently watched preview time", true )
|
165
|
+
@rerun_preview = new_jbutton( "Re-run most recently watched preview time frame", true )
|
176
166
|
@rerun_preview.on_clicked {
|
177
167
|
repeat_last_copy_dvd_to_hard_drive
|
178
168
|
}
|
179
169
|
|
180
|
-
@
|
170
|
+
@open_list = new_jbutton("Open/Edit a pre-existing DVD Edit List", true)
|
171
|
+
@open_list.on_clicked {
|
172
|
+
dialog = FileDialog.new(self, "Pick file to edit")
|
173
|
+
dialog.set_directory EDL_DIR
|
174
|
+
filename = dialog.go
|
175
|
+
open_file_to_edit_it filename if filename
|
176
|
+
}
|
177
|
+
|
178
|
+
@create_new_edl_for_current_dvd = new_jbutton("Create new Edit Decision List for a DVD", true)
|
181
179
|
@create_new_edl_for_current_dvd.on_clicked do
|
182
180
|
drive, volume, md5 = choose_dvd_drive
|
183
181
|
name = get_user_input("Enter DVD name for #{volume}")
|
@@ -193,11 +191,12 @@ module SensibleSwing
|
|
193
191
|
"00:03:00.0" , "00:04:00.0", "violence", "of some sort",
|
194
192
|
],
|
195
193
|
|
196
|
-
"name" => "#{name}"
|
194
|
+
"name" => "#{name}",
|
197
195
|
"disk_unique_id" => "#{md5}",
|
198
196
|
|
199
|
-
# "dvd_title_track" => "1", # most DVD's use title 1. Yours might not. If it
|
197
|
+
# "dvd_title_track" => "1", # most DVD's use title 1. Yours might not. If it plays anything except the main title, see http://goo.gl/QHLIF
|
200
198
|
# "not edited out stuff" => "",
|
199
|
+
# "closing thoughts" => "still a fairly dark movie",
|
201
200
|
|
202
201
|
EOL
|
203
202
|
filename = EDL_DIR + "\\" + name.gsub(' ', '_') + '.txt'
|
@@ -207,7 +206,7 @@ EOL
|
|
207
206
|
|
208
207
|
end
|
209
208
|
|
210
|
-
@display_unique = new_jbutton( "
|
209
|
+
@display_unique = new_jbutton( "Display a DVD's unique ID", true ).on_clicked {
|
211
210
|
drive, volume, md5 = choose_dvd_drive
|
212
211
|
# display it, allow them to copy and paste it out
|
213
212
|
get_user_input("#{drive} #{volume} for your copying+pasting pleasure (highlight, then ctrl+c to copy) \n
|
@@ -305,7 +304,11 @@ EOL
|
|
305
304
|
def single_edit_list_matches_dvd md5
|
306
305
|
return unless md5 # ignore nil searches, where it wasn't set in the .txt file
|
307
306
|
matching = Dir[EDL_DIR + '/*.txt'].select{|file|
|
308
|
-
|
307
|
+
begin
|
308
|
+
parse_edl(file)["disk_unique_id"] == md5
|
309
|
+
rescue SyntaxError
|
310
|
+
# ignore
|
311
|
+
end
|
309
312
|
}
|
310
313
|
if matching.length == 1
|
311
314
|
file = matching[0]
|
@@ -335,6 +338,10 @@ EOL
|
|
335
338
|
start_time = JOptionPane.showInputDialog(message, default)
|
336
339
|
end
|
337
340
|
|
341
|
+
def parse_edl path
|
342
|
+
EdlParser.parse_file path
|
343
|
+
end
|
344
|
+
|
338
345
|
def choose_dvd_and_edl_for_it
|
339
346
|
drive, dvd_volume_name, md5sum = choose_dvd_drive
|
340
347
|
puts "#{drive}, #{dvd_volume_name}, #{md5sum}"
|
@@ -346,14 +353,26 @@ EOL
|
|
346
353
|
edit_list_path = fc.go
|
347
354
|
end
|
348
355
|
raise 'cancelled' unless edit_list_path
|
349
|
-
descriptors =
|
356
|
+
descriptors = nil
|
357
|
+
while(!descriptors)
|
358
|
+
begin
|
359
|
+
descriptors = parse_edl edit_list_path
|
360
|
+
rescue SyntaxError => e
|
361
|
+
puts e
|
362
|
+
show_blocking_message_dialog("syntax error: " + edit_list_path + " " + e)
|
363
|
+
end
|
364
|
+
end
|
350
365
|
return drive, dvd_volume_name, md5sum, edit_list_path, descriptors
|
351
366
|
end
|
367
|
+
|
368
|
+
def get_title_track descriptors
|
369
|
+
descriptors["dvd_title_track"] || "1"
|
370
|
+
end
|
352
371
|
|
353
|
-
def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times,
|
372
|
+
def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times, want_fulli_name = false
|
354
373
|
drive, dvd_volume_name, md5sum, edit_list_path, descriptors = choose_dvd_and_edl_for_it
|
355
374
|
|
356
|
-
dvd_title = descriptors['
|
375
|
+
dvd_title = descriptors['name'] || dvd_volume_name
|
357
376
|
|
358
377
|
fc = new_filechooser
|
359
378
|
|
@@ -362,13 +381,13 @@ EOL
|
|
362
381
|
if should_prompt_for_start_and_end_times
|
363
382
|
show_blocking_message_dialog("Ok, let's preview just a portion of it. \nNote that you'll want to preview a section that wholly includes an edit decision in it\n For example, if it mutes from second 1 to second 10, you'll want to play from 00:00 to 00:12 or what not.\nAlso note that the first time you preview a section of a video, it will take like 20 minutes as it sets up the video for previewing.\nSubsequent previews will be faster, though, as long as you use the same filename.", "Preview")
|
364
383
|
start_time = get_user_input("At what point in the video would you like to start your preview? (like 01:00 for starting at 1 minute)", Storage['start_time'])
|
365
|
-
Storage['start_time'] = start_time if start_time
|
366
384
|
end_time = get_user_input("At what point in the video would you like to finish your preview? (like 02:00 for ending at the 2 minute mark)", Storage['end_time'])
|
367
|
-
Storage['end_time'] = end_time if end_time
|
368
385
|
unless start_time and end_time
|
369
386
|
JOptionPane.showMessageDialog(nil, " Please choose start and end", "Failed", JOptionPane::ERROR_MESSAGE)
|
370
387
|
return
|
371
388
|
end
|
389
|
+
Storage['start_time'] = start_time
|
390
|
+
Storage['end_time'] = end_time
|
372
391
|
end
|
373
392
|
|
374
393
|
fc.set_title "Pick where to save #{dvd_title} edited to"
|
@@ -380,19 +399,20 @@ EOL
|
|
380
399
|
a = File.open(File.dirname(save_to) + "/test_file_to_see_if_we_have_permission_to_write_to_this_folder", "w")
|
381
400
|
a.close
|
382
401
|
File.delete a.path
|
383
|
-
|
384
|
-
# how does save_to map to fulli?
|
402
|
+
|
385
403
|
fulli = MencoderWrapper.calculate_final_filename save_to
|
386
|
-
if
|
387
|
-
# make it create a dummy response file for us :)
|
388
|
-
start_time = "00:00"
|
389
|
-
end_time = "00:01"
|
404
|
+
if want_fulli_name
|
390
405
|
if File.exist? fulli + ".done"
|
391
406
|
# just return the full path early...
|
392
407
|
return [true, fulli]
|
393
408
|
end
|
409
|
+
# make it create a dummy response file for us :)
|
410
|
+
start_time = "00:00"
|
411
|
+
end_time = "00:01"
|
394
412
|
end
|
395
|
-
|
413
|
+
|
414
|
+
dvd_title_track = get_title_track(descriptors)
|
415
|
+
generate_and_run_bat_file save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
|
396
416
|
[false, fulli] # false means it's running in a background thread :P
|
397
417
|
end
|
398
418
|
|
@@ -400,13 +420,13 @@ EOL
|
|
400
420
|
DriveInfo.get_drive_with_most_space_with_slash
|
401
421
|
end
|
402
422
|
|
403
|
-
def get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
423
|
+
def get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
404
424
|
MencoderWrapper.get_bat_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
405
425
|
end
|
406
426
|
|
407
|
-
def generate_and_run_bat_file save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
|
408
|
-
Storage['last_params'] = [save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
|
409
|
-
commands = get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
427
|
+
def generate_and_run_bat_file save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
|
428
|
+
Storage['last_params'] = [save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track]
|
429
|
+
commands = get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
410
430
|
temp_dir = Dir.tmpdir
|
411
431
|
temp_file = temp_dir + '/vlc.temp.bat'
|
412
432
|
File.write(temp_file, commands)
|
@@ -467,7 +487,7 @@ EOL
|
|
467
487
|
# returns e:\, volume, md5sum
|
468
488
|
def choose_dvd_drive
|
469
489
|
opticals = DriveInfo.get_dvd_drives_as_win32ole
|
470
|
-
names = opticals.map{|d| d.Name + "\\" + " (" + (d.VolumeName || 'Insert DVD
|
490
|
+
names = opticals.map{|d| d.Name + "\\" + " (" + (d.VolumeName || 'Insert DVD and re-select') + ")"}
|
471
491
|
|
472
492
|
if opticals.length != 1
|
473
493
|
dialog = GetDisk.new(self, names)
|
File without changes
|
data/lib/edl_parser.rb
CHANGED
@@ -60,7 +60,7 @@ class EdlParser
|
|
60
60
|
# two digits, then whatever else you see, that's not a digit...
|
61
61
|
out = from_this.shift(2)
|
62
62
|
out.each{|d|
|
63
|
-
raise 'non timestamp? ' + d unless d =~ TimeStamp
|
63
|
+
raise SyntaxError.new('non timestamp? ' + d) unless d =~ TimeStamp
|
64
64
|
}
|
65
65
|
while(from_this[0] && from_this[0] !~ TimeStamp)
|
66
66
|
out << from_this.shift
|
data/sensible-cinema.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sensible-cinema}
|
8
|
-
s.version = "0.18.
|
8
|
+
s.version = "0.18.3"
|
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-17}
|
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"]
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"VERSION",
|
31
31
|
"bin/sensible-cinema",
|
32
32
|
"bin/sensible-cinema-cli",
|
33
|
-
"create
|
33
|
+
"create or edit sensible cinema decision list files.bat",
|
34
34
|
"experimental_readme.txt",
|
35
35
|
"ext/mkrf_conf.rb",
|
36
36
|
"gplv3.txt",
|
@@ -127,6 +127,7 @@ Gem::Specification.new do |s|
|
|
127
127
|
"zamples/edit_decision_lists/category descriptions.txt",
|
128
128
|
"zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt",
|
129
129
|
"zamples/edit_decision_lists/dvds/Harry Potter 2.txt",
|
130
|
+
"zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt",
|
130
131
|
"zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt",
|
131
132
|
"zamples/edit_decision_lists/dvds/bobs_big_plan.txt",
|
132
133
|
"zamples/edit_decision_lists/dvds/happiest baby on the block.txt",
|
data/spec/edl_parser.spec.rb
CHANGED
@@ -56,7 +56,7 @@ describe EdlParser do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
it "should raise if the first two aren't digits" do
|
59
|
-
proc { EdlParser.extract_entry!(["a"])}.should raise_exception
|
59
|
+
proc { EdlParser.extract_entry!(["a"])}.should raise_exception(SyntaxError)
|
60
60
|
end
|
61
61
|
|
62
62
|
it "should detect timestamps well" do
|
@@ -99,15 +99,17 @@ describe MencoderWrapper do
|
|
99
99
|
end
|
100
100
|
|
101
101
|
it "should have what looks like a working ffmpeg style split commands" do
|
102
|
-
|
103
|
-
|
104
|
-
|
102
|
+
@out.should match(/ffmpeg -i to_here.fulli_unedited.tmp.mpg -vcodec copy -acodec .*-ss.*-t/)
|
103
|
+
# phreaky audio [at least necessary for the big bunny fella...]
|
104
|
+
# @out.should match(/-acodec ac3 -ar 48000 -ac 2/)
|
105
|
+
# lodo investigate
|
105
106
|
end
|
106
107
|
|
107
108
|
it "should accomodate for mutes the ffmpeg way" do
|
108
109
|
# mutes by silencing...seems reasonable, based on the Family Law fella
|
109
110
|
@out.should match(/ -vcodec copy -acodec ac3 -vol 0 /)
|
110
111
|
@out.should_not match(/-vcodec copy.*-target ntsc-dvd/)
|
112
|
+
@out.should_not match(/acodec copy.*vol 0/)
|
111
113
|
end
|
112
114
|
|
113
115
|
it "should use avi extension" do
|
@@ -32,7 +32,32 @@ module SensibleSwing
|
|
32
32
|
it "should not auto-select if you pass it nil" do
|
33
33
|
MainWindow.new.single_edit_list_matches_dvd(nil).should be nil
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
|
+
it "should not die if you choose a poorly formed edl" do
|
37
|
+
time_through = 0
|
38
|
+
@subject.stub!(:single_edit_list_matches_dvd) {
|
39
|
+
'fake filename doesnt even matter because we fake the parsing of it later'
|
40
|
+
}
|
41
|
+
|
42
|
+
@subject.stub!(:parse_edl) {
|
43
|
+
if time_through == 0
|
44
|
+
time_through += 1
|
45
|
+
eval("a-----") # throws Syntax Error first time
|
46
|
+
else
|
47
|
+
"stuff"
|
48
|
+
end
|
49
|
+
}
|
50
|
+
@subject.choose_dvd_and_edl_for_it
|
51
|
+
@show_blocking_message_dialog_last_args.should_not be nil
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should not select a file if poorly formed" do
|
55
|
+
@subject.stub!(:parse_edl) {
|
56
|
+
eval("a----")
|
57
|
+
}
|
58
|
+
@subject.single_edit_list_matches_dvd 'fake md5'
|
59
|
+
end
|
60
|
+
|
36
61
|
it "should prompt if two EDL's match a DVD title" do
|
37
62
|
old_edl = MainWindow::EDL_DIR
|
38
63
|
begin
|
@@ -64,7 +89,7 @@ module SensibleSwing
|
|
64
89
|
["mock_dvd_drive", "Volume", "19d121ae8dc40cdd70b57ab7e8c74f76"] # happiest baby on the block
|
65
90
|
}
|
66
91
|
@subject.stub!(:get_mencoder_commands) { |*args|
|
67
|
-
args[-
|
92
|
+
args[-4].should match(/abc/)
|
68
93
|
@args = args
|
69
94
|
'sleep 0.1'
|
70
95
|
}
|
@@ -74,7 +99,9 @@ module SensibleSwing
|
|
74
99
|
@subject.stub!(:get_drive_with_most_space_with_slash) {
|
75
100
|
"e:\\"
|
76
101
|
}
|
77
|
-
@subject.stub!(:show_blocking_message_dialog) {
|
102
|
+
@subject.stub!(:show_blocking_message_dialog) { |*args|
|
103
|
+
@show_blocking_message_dialog_last_args = args
|
104
|
+
}
|
78
105
|
@subject.stub!(:get_user_input) {'01:00'}
|
79
106
|
@subject.stub!(:system_non_blocking) { |command|
|
80
107
|
@command = command
|
@@ -82,6 +109,10 @@ module SensibleSwing
|
|
82
109
|
}
|
83
110
|
@subject.stub!(:open_file_to_edit_it) {}
|
84
111
|
end
|
112
|
+
|
113
|
+
after do
|
114
|
+
@subject.background_thread.join if @subject.background_thread
|
115
|
+
end
|
85
116
|
|
86
117
|
class FakeFileChooser
|
87
118
|
def set_title x
|
@@ -93,12 +124,22 @@ module SensibleSwing
|
|
93
124
|
end
|
94
125
|
end
|
95
126
|
|
127
|
+
# name like :@rerun_previous
|
128
|
+
def click_button(name)
|
129
|
+
@subject.instance_variable_get(name).simulate_click
|
130
|
+
end
|
131
|
+
|
96
132
|
it "should be able to do a normal copy to hard drive, edited" do
|
133
|
+
@subject.system_non_blocking "ls"
|
97
134
|
@subject.do_copy_dvd_to_hard_drive(false).should == [false, "abc.fulli_unedited.tmp.mpg"]
|
98
135
|
File.exist?('test_file_to_see_if_we_have_permission_to_write_to_this_folder').should be false
|
99
136
|
end
|
100
137
|
|
101
|
-
it "should have a good default title of 1"
|
138
|
+
it "should have a good default title of 1" do
|
139
|
+
@subject.get_title_track({}).should == "1"
|
140
|
+
descriptors = {"dvd_title_track" => "3"}
|
141
|
+
@subject.get_title_track(descriptors).should == "3"
|
142
|
+
end
|
102
143
|
|
103
144
|
it "should call through to explorer for the full thing" do
|
104
145
|
@subject.do_copy_dvd_to_hard_drive(false)
|
@@ -117,16 +158,16 @@ module SensibleSwing
|
|
117
158
|
it "should call explorer for the we can't reach this path of opening a partial without telling it what to do with it" do
|
118
159
|
@subject.do_copy_dvd_to_hard_drive(true).should == [false, "abc.fulli_unedited.tmp.mpg"]
|
119
160
|
@subject.background_thread.join
|
120
|
-
@args[-
|
121
|
-
@args[-
|
161
|
+
@args[-1].should == 1
|
162
|
+
@args[-2].should == "01:00"
|
122
163
|
@command.should match /explorer/
|
123
164
|
@command.should_not match /fulli/
|
124
165
|
end
|
125
166
|
|
126
167
|
def prompt_for_start_and_end_times
|
127
168
|
@subject.instance_variable_get(:@preview_section).simulate_click
|
128
|
-
@args[-
|
129
|
-
@args[-
|
169
|
+
@args[-1].should == 1
|
170
|
+
@args[-2].should == "01:00"
|
130
171
|
@subject.background_thread.join
|
131
172
|
@command.should match /smplayer/
|
132
173
|
end
|
@@ -135,15 +176,16 @@ module SensibleSwing
|
|
135
176
|
prompt_for_start_and_end_times
|
136
177
|
end
|
137
178
|
|
138
|
-
it "should be able to
|
179
|
+
it "should be able to rerun the latest start and end times with the rerun button" do
|
139
180
|
prompt_for_start_and_end_times
|
140
181
|
old_args = @args
|
182
|
+
old_args.should_not == nil
|
141
183
|
@args = nil
|
142
|
-
|
184
|
+
click_button(:@rerun_preview).join
|
143
185
|
@args.should == old_args
|
186
|
+
@command.should match(/smplayer/)
|
144
187
|
end
|
145
188
|
|
146
|
-
|
147
189
|
it "if the .done file exists, it should directly call smplayer" do
|
148
190
|
FileUtils.touch "abc.fulli_unedited.tmp.mpg.done"
|
149
191
|
@subject.instance_variable_get(:@watch_unedited).simulate_click
|
@@ -152,10 +194,10 @@ module SensibleSwing
|
|
152
194
|
end
|
153
195
|
|
154
196
|
it "if the .done file does not exist, it should call smplayer ja" do
|
155
|
-
@subject.stub!(:sleep) {} # speed this up...
|
197
|
+
@subject.stub!(:sleep) {} # speed this test up...
|
156
198
|
@subject.instance_variable_get(:@watch_unedited).simulate_click.join
|
157
199
|
@subject.after_success_once.should == nil
|
158
|
-
@command.should_not == nil # scary timing spec
|
200
|
+
@command.should_not == nil # scary timing spec!
|
159
201
|
end
|
160
202
|
|
161
203
|
it "should create a new file for ya" do
|
@@ -166,7 +208,6 @@ module SensibleSwing
|
|
166
208
|
begin
|
167
209
|
File.exist?( out ).should be_true
|
168
210
|
content = File.read(out)
|
169
|
-
p content
|
170
211
|
content.should_not include("\"title\"")
|
171
212
|
content.should include("disk_unique_id")
|
172
213
|
content.should include("dvd_title_track")
|
@@ -179,12 +220,10 @@ module SensibleSwing
|
|
179
220
|
@subject.instance_variable_get(:@display_unique).simulate_click.should == "01:00"
|
180
221
|
end
|
181
222
|
|
182
|
-
it "should create an edl" do
|
183
|
-
@subject.instance_variable_get(:@
|
184
|
-
|
223
|
+
it "should create an edl and pass it through to mplayer" do
|
224
|
+
@subject.instance_variable_get(:@mplayer_edl).simulate_click
|
185
225
|
@command.should match(/mplayer.*-edl/)
|
186
226
|
@command.should match(/-dvd-device /)
|
187
|
-
p @command
|
188
227
|
end
|
189
228
|
|
190
229
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# big buck bunny DVD EDL
|
2
|
+
|
3
|
+
"mutes" => [
|
4
|
+
#
|
5
|
+
],
|
6
|
+
|
7
|
+
"blank_outs" => [
|
8
|
+
"00:00:00.0" , "00:00:33.5", "skip intro",
|
9
|
+
"01:23" , "01:25", "don't kill the nice butterfly!",
|
10
|
+
"03:15.5" , "03:29", "don't kill the nice butterfly 2!",
|
11
|
+
"9:53", "9:58", "pooping"
|
12
|
+
],
|
13
|
+
|
14
|
+
"audio_codec" => "lavc", # weird compatibility issues...
|
15
|
+
"name" => "Big Buck Bunny DVD",
|
16
|
+
"disk_unique_id" => "ef3d471d35022da32d444e7897e0c87c",
|
17
|
+
"url" => "http://www.bigbuckbunny.org/",
|
18
|
+
"dvd_title_track" => "2",
|
19
|
+
"closing thoughts" => "feels more adult than a kids movie, but probably ok edited"
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"blank_outs" => [
|
24
24
|
# this first one blanks (by overlaying *over* the video, a black window)
|
25
25
|
# from one hour one minute to one hour two minutes, like:
|
26
|
-
"01:01:00" , "01:02:00", "nudity", "
|
26
|
+
"01:01:00" , "01:02:00", "nudity", "...",
|
27
27
|
# you can also always optionally use decimals, like 3 minutes 3 seconds and a half to 3 minutes 4 seconds and a half (one second blank out):
|
28
28
|
"00:03:03.5", "00:03:04.5",
|
29
29
|
],
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 18
|
8
|
-
-
|
9
|
-
version: 0.18.
|
8
|
+
- 3
|
9
|
+
version: 0.18.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Roger Pack
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-17 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -168,7 +168,7 @@ files:
|
|
168
168
|
- VERSION
|
169
169
|
- bin/sensible-cinema
|
170
170
|
- bin/sensible-cinema-cli
|
171
|
-
- create
|
171
|
+
- create or edit sensible cinema decision list files.bat
|
172
172
|
- experimental_readme.txt
|
173
173
|
- ext/mkrf_conf.rb
|
174
174
|
- gplv3.txt
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- zamples/edit_decision_lists/category descriptions.txt
|
266
266
|
- zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt
|
267
267
|
- zamples/edit_decision_lists/dvds/Harry Potter 2.txt
|
268
|
+
- zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt
|
268
269
|
- zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt
|
269
270
|
- zamples/edit_decision_lists/dvds/bobs_big_plan.txt
|
270
271
|
- zamples/edit_decision_lists/dvds/happiest baby on the block.txt
|