sensible-cinema 0.23.3 → 0.23.4
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.TXT +3 -1
- data/TODO +19 -13
- data/VERSION +1 -1
- data/bin/sensible-cinema +107 -82
- data/change_log_with_feature_list.txt +4 -0
- data/documentation/README.TXT +40 -0
- data/documentation/troubleshooting.txt +27 -0
- data/history_and_related_works_list.txt +2 -0
- data/lib/drive_info.rb +1 -1
- data/lib/media_info_parser.rb +27 -0
- data/sensible-cinema.gemspec +8 -3
- data/spec/media_info_parser.spec.rb +29 -0
- data/spec/notes +4 -0
- data/spec/sensible_cinema_gui.spec.rb +72 -35
- data/spec/tsmuxer.output +33 -0
- data/vendor/tsmuxer_1.10.6/licence.txt +42 -0
- metadata +8 -3
- data/spec/how_to +0 -13
data/LICENSE.TXT
CHANGED
@@ -13,6 +13,8 @@ Ffmpeg is included, under the GPLv2: http://www.ffmpeg.org/legal.html http://www
|
|
13
13
|
|
14
14
|
unzip.exe is herein included, under the info-zip license: http://www.info-zip.org/license.html
|
15
15
|
|
16
|
-
|
16
|
+
Some binary builds of dvdid are also distributed here. See http://www.srcf.ucam.org/~cjk32/dvdid
|
17
|
+
|
18
|
+
TsMuxer binaries are included, with their own license, see vendor/tsmuxer1.10.6/licence.txt (it allows for redistribution).
|
17
19
|
|
18
20
|
See first also the file "documentation/is_it_legal_to_copy_dvds.txt" for more information on legal implications in your country.
|
data/TODO
CHANGED
@@ -17,6 +17,8 @@
|
|
17
17
|
== high prio like blocking bugs ==
|
18
18
|
|
19
19
|
== under next release specific items: ==
|
20
|
+
latest dir "conflict" for grabbing sintel from file
|
21
|
+
can I just use ffmpeg for -> ts ? http://eotmsnotes.wordpress.com/2011/04/25/tsmuxer-notes/
|
20
22
|
cheap minimize demo "fake auto" :)
|
21
23
|
friday 2: http://www.youtube.com/watch?v=SDeLjcTxMaM&feature=player_profilepage
|
22
24
|
cheap static-ify demo for mutes
|
@@ -44,32 +46,33 @@
|
|
44
46
|
Almost overnight, competitors to CleanFlicks popped up with twists on the CleanFlicks brand -- CleanFilms, Clean Flix, Clean-Flicks, Family Focus Films
|
45
47
|
family flix
|
46
48
|
http://theeditedmovieencyclopedia.blogspot.com/2008/08/clean-play-dvds-grand-opening-e-mail.html has grande list
|
49
|
+
movie mask
|
47
50
|
next timing thing (notes file)
|
48
51
|
|
49
52
|
== yes do, un-ordered currently, from the various future release options ==
|
53
|
+
bring to top after a conversion--we get hidden!
|
54
|
+
ascertain how accurate mplayer EDL is...I guess compared to...umm...something?
|
55
|
+
fix discrepancy between EDL mplayer and ffmpeg...maybe a new button "accurate EDL playback"?
|
50
56
|
don't use eval!
|
57
|
+
can auto-use tsmuxer at all
|
58
|
+
add buttons for "convert 4945 to x" and vice versa...
|
51
59
|
warn/redirect if wrong looking file extension...
|
60
|
+
mac just die with instructions to use tsmuxer first...
|
52
61
|
add the "create .edl file for xbmc et al" button
|
53
62
|
add a "watch edited from file" option...don't *force* too...?
|
54
63
|
check if some other buttons are outdated...
|
55
64
|
unit tests (all)
|
56
|
-
if they disdain to choose a save to filename the whole thing exits.
|
57
|
-
tell them "to edit easily..."
|
58
65
|
double check--are my ffmpeg splits really really really the same as mplayer's EDL DVD splits? really?
|
59
|
-
"you could watch it under mplayer with the OSD turned on"
|
60
|
-
[+ button for same?]
|
61
66
|
can I avoid requiring use of tsmuxer first?
|
62
|
-
auto tsmuxer/mediainfo [yikes]?
|
63
|
-
MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500 V_MPEG-2, "G:\Video\c\title00.mkv", fps=23.976, ar=As source, track=1, lang=eng A_AC3, "G:\Video\c\title00.mkv", track=2, lang=eng
|
64
67
|
check with blu-ray...do they match timing-wise? sub-title wise?
|
65
|
-
donate tsmuxer, makemkv, http://ffmpeg.zeranoe.com/builds, mulder [?] smplayer
|
68
|
+
donate tsmuxer, makemkv, http://ffmpeg.zeranoe.com/builds, mulder [?] smplayer menumeter
|
66
69
|
add an mencoder convert with mplayer_breaks button :P
|
67
|
-
can I just use mencoder -hr-edl-seek (off mpeg) to avoid the fulli phase? please? does it work super-accurately,
|
70
|
+
can I just use mencoder -hr-edl-seek (off mpeg) to avoid the fulli phase? please? does it work super-accurately, though, off fulli? off other?
|
68
71
|
maybe just under an "advanced" window...
|
69
72
|
youtube/hulu timings
|
70
73
|
split LLC's website+consumer
|
71
74
|
get LLC before a "real" domain name
|
72
|
-
always
|
75
|
+
always don't use auto file hashes to discourage piracy
|
73
76
|
upconverter
|
74
77
|
employee instructions: watch @ realtime after profanity filter first pass :P
|
75
78
|
clear runnings
|
@@ -91,7 +94,7 @@
|
|
91
94
|
can come out of full screen more easily :P
|
92
95
|
note pay for XP http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins search for the cheapest
|
93
96
|
note to them windows vista/7: use ac3filter [?]
|
94
|
-
donate menumeter $
|
97
|
+
donate menumeter $
|
95
98
|
reate the "play previously created edited file for current DVD" button
|
96
99
|
note better to previewer "you are about to preview these specific edits..." ?
|
97
100
|
ask for more beta testers for use, ask for more beta testers for creation, too
|
@@ -106,10 +109,11 @@
|
|
106
109
|
ppc dvdid?
|
107
110
|
app store mplayer perhaps?
|
108
111
|
bundle a copy of smplayer locally?
|
112
|
+
can use a working copy of tsmuxer with instructions :)
|
109
113
|
typically delete unedited.fulli file automatically
|
110
114
|
except if it's a specific scene run test...
|
111
115
|
the final "edited.avi" really "could/should" be playable in WMP...if possible
|
112
|
-
generic/consumer EDL run through should be through smplayer...do I need
|
116
|
+
generic/consumer EDL run through should be through smplayer...do I need/want straight mplayer option too though?
|
113
117
|
|
114
118
|
== other lists ==
|
115
119
|
|
@@ -117,10 +121,11 @@
|
|
117
121
|
todo.inventionzy
|
118
122
|
open_edl_list_org_todo.txt file
|
119
123
|
todo.build_library
|
120
|
-
todo.subtitle
|
124
|
+
todo.subtitle
|
121
125
|
|
122
126
|
== DVD decide later to move up or down ==
|
123
|
-
|
127
|
+
add button "fast preview one" (from file)
|
128
|
+
add button "fast preview one" (from dvd)
|
124
129
|
|
125
130
|
== DVD-realtime backlog once do, now not do, unordered ==
|
126
131
|
investigate boxee edl (just fer fun...maybe possible?) http://getsatisfaction.com/boxee/topics/commercial_skipping_edl_support
|
@@ -143,6 +148,7 @@
|
|
143
148
|
investigate dvdrsbvdl (windows media center edl plugin)
|
144
149
|
|
145
150
|
== DVD/DVD-realtime backlog (totally unordered, some very low prio, basically all never do) ==
|
151
|
+
"media browser" plugin?
|
146
152
|
@makemkv: show us the title numbers, and number them *by those*
|
147
153
|
@macports: set notestxt \
|
148
154
|
13 "The MPlayer developers do not believe in making regular releases. \
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.23.
|
1
|
+
0.23.4
|
data/bin/sensible-cinema
CHANGED
@@ -145,13 +145,13 @@ module SensibleSwing
|
|
145
145
|
|
146
146
|
## BUTTONS ##
|
147
147
|
|
148
|
-
@mplayer_edl = new_jbutton( "Watch DVD edited on computer (realtime -- mplayer EDL)", false)
|
149
|
-
@mplayer_edl.tool_tip = "This will watch your DVD in realtime
|
148
|
+
@mplayer_edl = new_jbutton( "Watch DVD/file edited on computer (realtime -- mplayer EDL)", false)
|
149
|
+
@mplayer_edl.tool_tip = "This will watch your DVD in realtime from your computer while skipping/muting the questionable scenes."
|
150
150
|
@mplayer_edl.on_clicked {
|
151
151
|
do_mplayer_edl
|
152
152
|
}
|
153
153
|
|
154
|
-
@create = new_jbutton( "Create edited copy of a DVD file on Your Hard Drive", false)
|
154
|
+
@create = new_jbutton( "Create edited copy of a DVD's file on Your Hard Drive", false)
|
155
155
|
@create.tool_tip = <<-EOL
|
156
156
|
This grabs from your DVD and creates a new file on your hard disk like dvd_name_edited.mpg for you to watch later.
|
157
157
|
The file you create will contain the whole movie edited.
|
@@ -175,10 +175,8 @@ module SensibleSwing
|
|
175
175
|
|
176
176
|
@open_list = new_jbutton("Open/Edit a previously created Delete List", true, "If your DVD has a previously existing EDL for it, you can open it to edit it with this button.")
|
177
177
|
@open_list.on_clicked {
|
178
|
-
|
179
|
-
|
180
|
-
filename = dialog.go
|
181
|
-
open_file_to_edit_it filename if filename
|
178
|
+
filename = new_existing_file_selector_and_select_file( "Pick file to edit", EDL_DIR)
|
179
|
+
open_file_to_edit_it filename
|
182
180
|
}
|
183
181
|
|
184
182
|
@play_smplayer = new_jbutton( "Watch full DVD unedited (realtime smplayer)", true)
|
@@ -216,7 +214,7 @@ module SensibleSwing
|
|
216
214
|
@display_unique = new_jbutton( "Display current DVD's unique ID", true )
|
217
215
|
@display_unique.tool_tip = "This is useful to setup a DVD's 'unique ID' within an EDL for it. \nIf your EDL doesn't have a line like disk_unique_id => \"...\" then you will want to run this to be able to add that line in."
|
218
216
|
@display_unique.on_clicked {
|
219
|
-
drive, volume, dvd_id =
|
217
|
+
drive, volume, dvd_id = choose_dvd_drive_or_file true
|
220
218
|
# display it, allow them to copy and paste it out
|
221
219
|
show_copy_pastable_string("#{drive} #{volume} for your copying+pasting pleasure (highlight, then ctrl+c to copy)\n
|
222
220
|
This is USED to identify a disk to match it to its EDL, later.", "\"disk_unique_id\" => \"#{dvd_id}\",")
|
@@ -252,15 +250,7 @@ module SensibleSwing
|
|
252
250
|
Once you download the zip, unzip it, and then compare the timestamps in it with those on the DVD (see the button "Watch DVD unedited (realtime mplayer)")
|
253
251
|
EOL
|
254
252
|
@parse_srt.on_clicked {
|
255
|
-
|
256
|
-
fc.set_title "Pick srt file:"
|
257
|
-
if old_dir = Storage['old_srt_dir']
|
258
|
-
fc.set_current_directory JFile.new(old_dir)
|
259
|
-
end
|
260
|
-
filename = fc.go
|
261
|
-
Storage['old_srt_dir'] = fc.get_current_directory.to_s
|
262
|
-
Storage['start_time']
|
263
|
-
|
253
|
+
filename = new_existing_file_selector_and_select_file("Pick srt file:")
|
264
254
|
parsed = SubtitleProfanityFinder.edl_output [filename]
|
265
255
|
File.write(EdlTempFile, "# add these into your mute section if they apply\n" + parsed)
|
266
256
|
open_file_to_edit_it EdlTempFile
|
@@ -361,13 +351,11 @@ module SensibleSwing
|
|
361
351
|
new_prefs = old_prefs.gsub(/mplayer_additional_options=.*/, "mplayer_additional_options=#{to_this}")
|
362
352
|
FileUtils.mkdir_p File.dirname(smplayer_prefs_file) # case it doesn't exist'
|
363
353
|
File.write(smplayer_prefs_file, new_prefs)
|
364
|
-
p 'wrote', new_prefs.length, smplayer_prefs_file, to_this
|
365
|
-
# no worky doze File.write(File.expand_path('~/.mplayer/config'), to_this)
|
366
354
|
smplayer_prefs_file
|
367
355
|
end
|
368
356
|
|
369
357
|
def create_brand_new_edl
|
370
|
-
drive, volume, dvd_id =
|
358
|
+
drive, volume, dvd_id = choose_dvd_drive_or_file true
|
371
359
|
english_name = get_user_input("Enter a human readable DVD description for #{volume}", volume.gsub('_', ' ').downcase)
|
372
360
|
input = <<-EOL
|
373
361
|
# comments can go after a # on any line, for example this one.
|
@@ -454,7 +442,7 @@ module SensibleSwing
|
|
454
442
|
def play_dvd_smplayer_unedited use_mplayer_instead = false
|
455
443
|
# LODO really even if there are 2 it should still pick out the title track...hmm...on demand :P
|
456
444
|
# lodo mac os x 'ify'
|
457
|
-
drive, dvd_volume_name, dvd_id, edl_path_maybe_nil, descriptors_maybe_nil =
|
445
|
+
drive, dvd_volume_name, dvd_id, edl_path_maybe_nil, descriptors_maybe_nil = choose_dvd_or_file_and_edl_for_it false
|
458
446
|
if descriptors_maybe_nil
|
459
447
|
title_track_maybe_nil = get_title_track(descriptors_maybe_nil, false)
|
460
448
|
end
|
@@ -479,14 +467,14 @@ module SensibleSwing
|
|
479
467
|
EdlTempFile = Dir.tmpdir + '/mplayer.temp.edl'
|
480
468
|
|
481
469
|
def do_mplayer_edl play_this_mplayer = nil, add_secs_end = 0, add_secs_beginning = 0.5
|
482
|
-
|
470
|
+
drive_or_file, dvd_volume_name, dvd_id, edl_path, descriptors = choose_dvd_or_file_and_edl_for_it
|
471
|
+
if dvd_id == NonDvd
|
472
|
+
play_this_mplayer ||= "mplayer \"#{drive_or_file}\"" # play the file instead...
|
473
|
+
end
|
483
474
|
descriptors = EdlParser.parse_file edl_path
|
484
475
|
splits = descriptors['mplayer_dvd_splits']
|
485
476
|
if splits == nil && !play_this_mplayer
|
486
|
-
|
487
|
-
if !play_this_mplayer
|
488
|
-
show_blocking_message_dialog("warning: delete list does not contain mplayer replay information [mplayer_dvd_splits] so edits past a certain time period might not won't work ( http://goo.gl/yMfqX ).")
|
489
|
-
end
|
477
|
+
show_blocking_message_dialog("warning: delete list does not contain mplayer replay information [mplayer_dvd_splits] so edits past a certain time period might not won't work ( http://goo.gl/yMfqX ).")
|
490
478
|
splits = []
|
491
479
|
end
|
492
480
|
splits.map!{|s| EdlParser.translate_string_to_seconds(s) }
|
@@ -494,7 +482,7 @@ module SensibleSwing
|
|
494
482
|
File.write(EdlTempFile, edl_contents)
|
495
483
|
title_track = get_title_track(descriptors)
|
496
484
|
# oh the insanity of the console UI...LODO more user friendly player
|
497
|
-
@popup ||= show_non_blocking_message_dialog("About to run mplayer
|
485
|
+
@popup ||= show_non_blocking_message_dialog("About to run mplayer EDL. To control it, use\n space for pause,\n f for full screen,\n arrow keys to seek.")
|
498
486
|
# LODO dry up mplayer dvd opts...
|
499
487
|
if OS.windows?
|
500
488
|
play_this_mplayer ||= "mplayer -nocache dvdnav://#{title_track} "
|
@@ -507,11 +495,16 @@ module SensibleSwing
|
|
507
495
|
play_this_mplayer += " -vo direct3d "
|
508
496
|
play_this_mplayer += " -font #{ENV['SystemRoot']}\\fonts\\ARIAL.TTF"
|
509
497
|
end
|
510
|
-
command = "#{play_this_mplayer} -framedrop -alang en -sid 1000 -edl #{File.expand_path EdlTempFile} -dvd-device #{
|
498
|
+
command = "#{play_this_mplayer} -framedrop -alang en -sid 1000 -edl #{File.expand_path EdlTempFile} -dvd-device #{drive_or_file}"
|
511
499
|
# -hardframedrop might help but hurts just too much
|
512
500
|
p command
|
513
501
|
Thread.new { system_blocking command; @popup.dispose }
|
514
502
|
end
|
503
|
+
|
504
|
+
def show_assert_dialog message
|
505
|
+
returned = JOptionPane.showConfirmDialog self, message, message, JOptionPane::YES_NO_CANCEL_OPTION
|
506
|
+
assert_confirmed_dialog returned
|
507
|
+
end
|
515
508
|
|
516
509
|
def require_blocking_license_accept_dialog program, license_name, license_url_should_also_be_embedded_by_you_in_message,
|
517
510
|
title = 'Confirm Acceptance of License Agreement', message = nil
|
@@ -529,7 +522,14 @@ module SensibleSwing
|
|
529
522
|
separate program, with its own distribution, license, ownership and copyright.
|
530
523
|
You agree that you are responsible for the download and use of this program, within sensible cinema or otherwise."
|
531
524
|
|
532
|
-
returned = JOptionPane.showConfirmDialog
|
525
|
+
returned = JOptionPane.showConfirmDialog self, message, title, JOptionPane::YES_NO_CANCEL_OPTION
|
526
|
+
assert_confirmed_dialog returned
|
527
|
+
p 'confirmed license noted: ' + license_name
|
528
|
+
throw unless returned == 0
|
529
|
+
old.each{|name, old_setting| UIManager.put(name, old_setting)}
|
530
|
+
end
|
531
|
+
|
532
|
+
def assert_confirmed_dialog returned
|
533
533
|
# 1 is view button was clicked
|
534
534
|
# 0 is accept
|
535
535
|
# 2 is cancel
|
@@ -546,10 +546,8 @@ module SensibleSwing
|
|
546
546
|
p 'license exited early...exiting'
|
547
547
|
System.exit 1
|
548
548
|
end
|
549
|
-
p 'confirmed license noted: ' + license_name
|
550
|
-
throw unless returned == 0
|
551
|
-
old.each{|name, old_setting| UIManager.put(name, old_setting)}
|
552
549
|
end
|
550
|
+
|
553
551
|
|
554
552
|
def print *args
|
555
553
|
Kernel.print *args # avoid bin\sensible-cinema.rb:83:in `system_blocking': cannot convert instance of class org.jruby.RubyString to class java.awt.Graphics (TypeError)
|
@@ -657,8 +655,9 @@ module SensibleSwing
|
|
657
655
|
generate_and_run_bat_file *Storage['last_params']
|
658
656
|
end
|
659
657
|
|
660
|
-
def
|
658
|
+
def new_nonexisting_filechooser title = nil, default_dir = nil
|
661
659
|
out = JFileChooser.new
|
660
|
+
out.set_title title
|
662
661
|
if default_dir
|
663
662
|
out.set_current_directory JFile.new(default_dir)
|
664
663
|
end
|
@@ -696,22 +695,31 @@ module SensibleSwing
|
|
696
695
|
JFile.new(File.dirname(path)).get_usable_space
|
697
696
|
end
|
698
697
|
|
699
|
-
def
|
700
|
-
|
701
|
-
|
698
|
+
def new_existing_file_selector_and_select_file title, dir=nil
|
699
|
+
out = FileDialog.new(self)
|
700
|
+
out.set_title title
|
701
|
+
dir ||= Storage[caller.inspect]
|
702
|
+
out.set_directory dir
|
703
|
+
got = out.go
|
704
|
+
raise 'cancelled choosing existing file' unless got # I think we always want to raise here...
|
705
|
+
Storage[caller.inspect] = File.dirname(got) # I think these work...
|
706
|
+
got
|
707
|
+
end
|
708
|
+
|
709
|
+
def choose_dvd_or_file_and_edl_for_it force_choose_edl_file = true
|
710
|
+
drive_or_file, dvd_volume_name, dvd_id = choose_dvd_drive_or_file false
|
711
|
+
|
712
|
+
unless @_edit_list_path # cache file selection...
|
702
713
|
edit_list_path = single_edit_list_matches_dvd(dvd_id)
|
703
|
-
if !edit_list_path &&
|
704
|
-
|
705
|
-
fc.set_title "Please pick a DVD Delete List File (none found that seem to match #{dvd_volume_name})--or create one for it"
|
706
|
-
fc.set_directory EDL_DIR
|
707
|
-
edit_list_path = fc.go
|
714
|
+
if !edit_list_path && force_choose_edl_file
|
715
|
+
edit_list_path = new_existing_file_selector_and_select_file("Please pick a DVD Delete List File (none were found that seem to match #{dvd_volume_name})--may need to create one for it", EDL_DIR)
|
708
716
|
raise 'cancelled choosing an EDL' unless edit_list_path
|
709
717
|
end
|
710
718
|
@_edit_list_path = edit_list_path
|
711
719
|
end
|
712
720
|
|
713
721
|
if @_edit_list_path
|
714
|
-
# reload it just in case it has changed on disk
|
722
|
+
# reload it every time just in case it has changed on disk
|
715
723
|
descriptors = nil
|
716
724
|
while(!descriptors)
|
717
725
|
begin
|
@@ -722,7 +730,7 @@ module SensibleSwing
|
|
722
730
|
end
|
723
731
|
end
|
724
732
|
end
|
725
|
-
[
|
733
|
+
[drive_or_file, dvd_volume_name, dvd_id, @_edit_list_path, descriptors]
|
726
734
|
end
|
727
735
|
|
728
736
|
def get_title_track descriptors, use_default_of_one = true
|
@@ -734,19 +742,14 @@ module SensibleSwing
|
|
734
742
|
def get_import_from_filename dvd_title, dvd_title_track
|
735
743
|
@_get_import_from_filename ||=
|
736
744
|
begin
|
737
|
-
|
738
|
-
file_from_chooser.set_title "Please choose the file that is your ripped version of #{dvd_title} title ##{dvd_title_track} (.mpg or .ts--see documentation/how_to_get_files_from_dvd.txt file)"
|
739
|
-
outgoing = file_from_chooser.go
|
740
|
-
Storage['get_import_from_filename_dir'] = File.dirname(outgoing)
|
741
|
-
outgoing
|
745
|
+
new_existing_file_selector_and_select_file "Please choose the file that is your ripped version of #{dvd_title} title ##{dvd_title_track} (.mpg or .ts--see documentation/how_to_get_files_from_dvd.txt file)"
|
742
746
|
end
|
743
747
|
end
|
744
748
|
|
745
749
|
def get_save_to_filename dvd_title
|
746
750
|
@_get_save_to_filename ||=
|
747
751
|
begin
|
748
|
-
fc =
|
749
|
-
fc.set_title "Pick where to save #{dvd_title} edited version as"
|
752
|
+
fc = new_nonexisting_filechooser "Pick where to save #{dvd_title} edited version as"
|
750
753
|
save_to_file_name = dvd_title + ' edited version'
|
751
754
|
save_to_file_name = save_to_file_name.gsub(' ', '_').gsub( /\W/, '') # no punctuation or spaces for now...
|
752
755
|
fc.set_file(get_drive_with_most_space_with_slash + save_to_file_name)
|
@@ -765,7 +768,7 @@ module SensibleSwing
|
|
765
768
|
end
|
766
769
|
|
767
770
|
def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times, exit_early_if_fulli_exists = false, watch_unedited = false
|
768
|
-
|
771
|
+
drive_or_file, dvd_volume_name, dvd_id, edit_list_path, descriptors = choose_dvd_or_file_and_edl_for_it
|
769
772
|
|
770
773
|
descriptors = parse_edl(edit_list_path)
|
771
774
|
if watch_unedited
|
@@ -799,10 +802,14 @@ module SensibleSwing
|
|
799
802
|
Storage['end_time'] = end_time
|
800
803
|
end
|
801
804
|
dvd_friendly_name = descriptors['name']
|
802
|
-
raise 'no name?' unless dvd_friendly_name
|
805
|
+
raise 'no dvd name in EDL?' unless dvd_friendly_name
|
803
806
|
|
804
807
|
dvd_title_track = get_title_track(descriptors)
|
805
|
-
|
808
|
+
if dvd_id == NonDvd
|
809
|
+
file_from = drive_or_file
|
810
|
+
else
|
811
|
+
file_from = get_import_from_filename dvd_friendly_name, dvd_title_track # we don't even care about the drive letter anymore...
|
812
|
+
end
|
806
813
|
save_to_edited = get_save_to_filename dvd_friendly_name
|
807
814
|
fulli = MencoderWrapper.calculate_fulli_filename save_to_edited
|
808
815
|
if exit_early_if_fulli_exists
|
@@ -861,7 +868,10 @@ module SensibleSwing
|
|
861
868
|
|
862
869
|
if !start_time
|
863
870
|
# assume a full run..
|
864
|
-
popup_message +=
|
871
|
+
popup_message += <<-EOL
|
872
|
+
NB that the created file will be playable only with VLC (possibly also with smplayer),
|
873
|
+
but probably not with windows media player.
|
874
|
+
EOL
|
865
875
|
end
|
866
876
|
|
867
877
|
popup = show_non_blocking_message_dialog(popup_message, "OK")
|
@@ -913,44 +923,59 @@ module SensibleSwing
|
|
913
923
|
show_blocking_message_dialog("Failed--please examine console output and report back!\nAlso consult the troubleshooting section of the README file.", "Failed", JOptionPane::ERROR_MESSAGE)
|
914
924
|
end
|
915
925
|
end
|
926
|
+
|
927
|
+
def get_disk_chooser_window names
|
928
|
+
GetDisk.new(self, names)
|
929
|
+
end
|
930
|
+
|
931
|
+
NonDvd = 'non dvd has no dvdid'
|
916
932
|
|
917
|
-
# returns e:\,
|
918
|
-
|
933
|
+
# returns e:\, volume_name, dvd_id
|
934
|
+
# or full_path.mkv, filename, ''
|
935
|
+
def choose_dvd_drive_or_file force_choose_only_dvd_drive
|
919
936
|
opticals = DriveInfo.get_dvd_drives_as_openstruct
|
920
937
|
if @saved_opticals == opticals
|
921
|
-
# memoize...
|
922
|
-
return @
|
938
|
+
# memoize...if disks haven't changed :)
|
939
|
+
return @_choose_dvd_drive_or_file
|
923
940
|
end
|
924
|
-
|
941
|
+
has_at_least_one_dvd_inserted = opticals.find{|d| d.VolumeName }
|
942
|
+
if !has_at_least_one_dvd_inserted && force_choose_only_dvd_drive
|
925
943
|
show_blocking_message_dialog 'insert a dvd first'
|
926
|
-
|
944
|
+
raise 'no dvd found'
|
927
945
|
end
|
928
946
|
names = opticals.map{|d| d.Name + "\\" + " (" + (d.VolumeName || 'Insert DVD to use') + ")"}
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
dialog.show
|
941
|
-
selected_idx = dialog.selected_idx
|
942
|
-
end
|
947
|
+
if !force_choose_only_dvd_drive && !has_at_least_one_dvd_inserted
|
948
|
+
names += ['No DVD so choose Local File']
|
949
|
+
used_local_file_option = true
|
950
|
+
end
|
951
|
+
|
952
|
+
count = 0
|
953
|
+
opticals.each{|d| count += 1 if d.VolumeName}
|
954
|
+
if count == 1 && force_choose_only_dvd_drive
|
955
|
+
# just choose it if there's only one disk available..
|
956
|
+
p 'selecting only disk present in the various DVD drives'
|
957
|
+
selected_idx = opticals.index{|d| d.VolumeName}
|
943
958
|
else
|
944
|
-
|
945
|
-
|
959
|
+
dialog = get_disk_chooser_window names
|
960
|
+
dialog.setSize 200, 125
|
961
|
+
dialog.show
|
962
|
+
selected_idx = dialog.selected_idx
|
946
963
|
end
|
947
|
-
|
964
|
+
|
948
965
|
if selected_idx
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
966
|
+
if used_local_file_option
|
967
|
+
raise unless selected_idx == 0 # it was our only option...
|
968
|
+
filename = new_existing_file_selector_and_select_file("Select yer previously grabbed from DVD file")
|
969
|
+
show_assert_dialog "Do you certify you own the DVD this came of and have it in your possession?"
|
970
|
+
@_choose_dvd_drive_or_file = [filename, File.basename(filename), NonDvd]
|
971
|
+
else
|
972
|
+
disk = opticals[selected_idx]
|
973
|
+
dvd_id = DriveInfo.md5sum_disk(disk.MountPoint)
|
974
|
+
@_choose_dvd_drive_or_file = [disk.MountPoint, opticals[selected_idx].VolumeName, dvd_id]
|
975
|
+
end
|
976
|
+
@saved_opticals = opticals # save currently mounted disk list, so we know if we should re-select later...
|
977
|
+
# is this ok for os x?
|
978
|
+
return @_choose_dvd_drive_or_file
|
954
979
|
else
|
955
980
|
raise 'did not select a drive...'
|
956
981
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
These files contain instructions on how to do various things.
|
2
|
+
|
3
|
+
See also the real project "README" file in the root folder of the project (the parent folder to the one containing this file)
|
4
|
+
for description and installation instructions, etc.
|
5
|
+
|
6
|
+
There is also more "advanced" documentation in the root of the project.
|
7
|
+
It contains the LICENSE file, gplv3.txt, change_log_with_feature_list.txt, developer_how_to_contribute_to_the_project.txt file,
|
8
|
+
experimental_online_player_ocr_readme.txt file, history_and_related_works_list.txt file.
|
9
|
+
|
10
|
+
== Contact ==
|
11
|
+
|
12
|
+
contact: http://groups.google.com/group/sensible-cinema
|
13
|
+
or email to sensible-cinema@googlegroups.com
|
14
|
+
|
15
|
+
== Troubleshooting ==
|
16
|
+
|
17
|
+
If you run into some snag, try cleaning your DVD and starting over (delete all files, start again).
|
18
|
+
Baking soda toothpaste might help with cleaning it.
|
19
|
+
If it still errs, report it, along with a screen snapshot and steps of
|
20
|
+
how to reproduce the problem, preferably. See the feedback section.
|
21
|
+
|
22
|
+
It can fail also because a deletion is past end of DVD, or
|
23
|
+
Also make sure you aren't out of disk space.
|
24
|
+
|
25
|
+
Try playback in "VLC Media Player"
|
26
|
+
|
27
|
+
You try to play back a sensible cinema-ized video file and it plays back without
|
28
|
+
audio or video (example: windows media player)?
|
29
|
+
|
30
|
+
This probably means you're using windows media player, and don't have "codecs" installed
|
31
|
+
to handle this type of audio. Not to fear, just download the "ffdshow tryouts" (google for it)
|
32
|
+
and, when it gives you the option, be sure to check "mpeg2 video" and then
|
33
|
+
it should "just work." You could also optionally just play the file in VLC Media Player or smplayer
|
34
|
+
(there's a button for that). Installing "AC3Filter" may help if you can hear no audio.
|
35
|
+
Really VLC Media Player is your best bet though.
|
36
|
+
|
37
|
+
If the end result picture is too grainy/pixelated or if the overall process is too slow, let me know and I'll work on
|
38
|
+
making it better. No really, I have some ideas, but want to see if there's need first for improvement in those areas.
|
39
|
+
|
40
|
+
Finally, report back! If there are problems that arise, I want to hear about them so we can help you through it.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
== Troubleshooting ==
|
2
|
+
|
3
|
+
If you run into some snag, try cleaning your DVD and starting over (delete all files, start again).
|
4
|
+
Baking soda toothpaste might help with cleaning it.
|
5
|
+
If it still errs, report it, along with a screen snapshot and steps of
|
6
|
+
how to reproduce the problem, preferably.
|
7
|
+
|
8
|
+
It can fail also because a deletion is past end of DVD, or
|
9
|
+
Also make sure you aren't out of disk space.
|
10
|
+
|
11
|
+
Try your playback in "VLC Media Player".
|
12
|
+
|
13
|
+
You try to play back a sensible cinema-ized video file and it plays back without
|
14
|
+
audio or video (example: windows media player)?
|
15
|
+
|
16
|
+
This probably means you're using windows media player, and don't have "codecs" installed
|
17
|
+
to handle this type of audio. Not to fear, just download the "ffdshow tryouts" (google for it)
|
18
|
+
and, when it gives you the option, be sure to check "mpeg2 video" and then
|
19
|
+
it should "just work." You could also optionally just play the file in VLC Media Player or smplayer
|
20
|
+
(there's a button for that). Installing "AC3Filter" may help if you can hear no audio.
|
21
|
+
Really VLC Media Player is your best bet though.
|
22
|
+
|
23
|
+
If the end result picture is too grainy/pixelated or if the overall process is too slow, let me know and I'll work on
|
24
|
+
making it better. No really, I have some ideas, but want to see if there's need first for improvement in those areas.
|
25
|
+
|
26
|
+
Finally, report back! If there are problems that arise, I want to hear about them so we can help you through it.
|
27
|
+
See README for contact info
|
@@ -91,3 +91,5 @@ AviSynth can script dvd playback http://forum.doom9.org/archive/index.php/t-1095
|
|
91
91
|
ps3 media server has edl support: https://github.com/chocolateboy/PMS-EDL maybe would work with DVD's dunno
|
92
92
|
Anydvd HD's "magic file replacement" for DVD's/blu-ray's
|
93
93
|
RiffTrax allows for an audio "overlay" to a DVD playback, have their own player to coordinate the two.
|
94
|
+
dove.org worked with New Line Cinemas to release edited versions of a few films (the mask etc.) http://betterlogic.com/roger/2011/06/dove-edited-films/
|
95
|
+
Avatar DVD was released with an audio track that was "euphemized" of the profanity.
|
data/lib/drive_info.rb
CHANGED
@@ -29,7 +29,7 @@ class DriveInfo
|
|
29
29
|
command = "#{__DIR__}/../vendor/dvdid.exe #{dir}"
|
30
30
|
end
|
31
31
|
output = `#{command}`
|
32
|
-
|
32
|
+
raise 'dvdid command failed?' + command unless $?.exitstatus == 0
|
33
33
|
output.strip
|
34
34
|
end
|
35
35
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module MediaInfoParser
|
2
|
+
def self.parse_with_convert_command media_info, filename
|
3
|
+
video = audio = nil
|
4
|
+
media_info.split("Track ID").each{ |section|
|
5
|
+
section =~ /:(\W+)(\d+)/
|
6
|
+
id = $2
|
7
|
+
section =~ /Stream ID: (\S+)/ # like V_MPEG-2
|
8
|
+
stream_type = $1
|
9
|
+
if stream_type
|
10
|
+
raise unless id
|
11
|
+
if section =~ /Frame rate/ && !video
|
12
|
+
section =~ /Frame rate: ([\d\.]+)/
|
13
|
+
fps = $1
|
14
|
+
raise unless fps
|
15
|
+
raise unless section =~ /lang: eng/ # expect...
|
16
|
+
video = "#{stream_type}, \"#{filename}\", fps=#{fps}, track=#{id}, lang=eng"
|
17
|
+
elsif section =~ /Channels:/ && !audio
|
18
|
+
raise unless section =~ /lang: eng/ # hope english audio track comes first...
|
19
|
+
# A_AC3, "G:\Video\Sintel_NTSC\title01.mkv", track=2, lang=eng
|
20
|
+
audio = "#{stream_type}, \"#{filename}\", track=#{id}, lang=eng"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
}
|
24
|
+
raise unless video && audio
|
25
|
+
return "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500\n#{video}\n#{audio}"
|
26
|
+
end
|
27
|
+
end
|
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.23.
|
8
|
+
s.version = "0.23.4"
|
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{2011-06-
|
12
|
+
s.date = %q{2011-06-30}
|
13
13
|
s.email = %q{rogerdpack@gmail.com}
|
14
14
|
s.executables = ["sensible-cinema", "sensible-cinema-cli"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -29,9 +29,11 @@ Gem::Specification.new do |s|
|
|
29
29
|
"business_ideas.txt",
|
30
30
|
"change_log_with_feature_list.txt",
|
31
31
|
"developer_how_to_contribute_to_the_project.txt",
|
32
|
+
"documentation/README.TXT",
|
32
33
|
"documentation/how_to_create_your_own_delete_lists.txt",
|
33
34
|
"documentation/how_to_get_files_from_dvd.txt",
|
34
35
|
"documentation/is_it_legal_to_copy_dvds.txt",
|
36
|
+
"documentation/troubleshooting.txt",
|
35
37
|
"experimental_online_player_ocr_readme.txt",
|
36
38
|
"go.bat",
|
37
39
|
"go.sh",
|
@@ -53,6 +55,7 @@ Gem::Specification.new do |s|
|
|
53
55
|
"lib/file_chooser.rb",
|
54
56
|
"lib/frame_accurate.rb",
|
55
57
|
"lib/keyboard_input.rb",
|
58
|
+
"lib/media_info_parser.rb",
|
56
59
|
"lib/mencoder_wrapper.rb",
|
57
60
|
"lib/mouse.rb",
|
58
61
|
"lib/mouse_forever.rb",
|
@@ -80,8 +83,8 @@ Gem::Specification.new do |s|
|
|
80
83
|
"spec/edl_parser.spec.rb",
|
81
84
|
"spec/frame_accurate.spec.rb",
|
82
85
|
"spec/go_line.bat",
|
83
|
-
"spec/how_to",
|
84
86
|
"spec/keyboard_input.spec.rb",
|
87
|
+
"spec/media_info_parser.spec.rb",
|
85
88
|
"spec/mencoder_wrapper.spec.rb",
|
86
89
|
"spec/mouse.spec.rb",
|
87
90
|
"spec/mplayer_edl.spec.rb",
|
@@ -94,6 +97,7 @@ Gem::Specification.new do |s|
|
|
94
97
|
"spec/subtitle_profanity_finder.spec.rb",
|
95
98
|
"spec/swing_helpers.spec.rb",
|
96
99
|
"spec/test_yaml.yml",
|
100
|
+
"spec/tsmuxer.output",
|
97
101
|
"spec/vlc_programmer.spec.rb",
|
98
102
|
"template_bats/RUN SENSIBLE CINEMA CLICK HERE.bat",
|
99
103
|
"template_bats/advanced--create or edit sensible cinema delete list files.bat",
|
@@ -113,6 +117,7 @@ Gem::Specification.new do |s|
|
|
113
117
|
"vendor/mac_dvdid/lib/libdvdid.la",
|
114
118
|
"vendor/monkey.png",
|
115
119
|
"vendor/readme.txt",
|
120
|
+
"vendor/tsmuxer_1.10.6/licence.txt",
|
116
121
|
"www/index.html",
|
117
122
|
"zamples/edit_decision_lists/category descriptions.txt",
|
118
123
|
"zamples/edit_decision_lists/dvds/Harry Potter 2.txt",
|
@@ -0,0 +1,29 @@
|
|
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
|
18
|
+
require File.dirname(__FILE__) + "/common"
|
19
|
+
require_relative '../lib/media_info_parser'
|
20
|
+
|
21
|
+
describe MediaInfoParser do
|
22
|
+
|
23
|
+
it "should parse" do
|
24
|
+
out = MediaInfoParser.parse_with_convert_command(File.read('tsmuxer.output'), "G:\\Video\\Sintel_NTSC\\title01.mkv")
|
25
|
+
out.should == "MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500\nV_MPEG-2, \"G:\\Video\\Sintel_NTSC\\title01.mkv\", fps=29.97, track=1, lang=eng\nA_AC3, \"G:\\Video\\Sintel_NTSC\\title01.mkv\", track=2, lang=eng"
|
26
|
+
print out
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
data/spec/notes
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
up next:
|
2
2
|
lighning exact frame to compare the two fulli's...
|
3
3
|
|
4
|
+
== WMC ==
|
5
|
+
apparently mymovies can use power dvd, which seems an external app... http://www.mymovies.dk/forum.aspx?g=posts&m=127771#127771
|
6
|
+
|
7
|
+
|
4
8
|
== EDL plugins ==
|
5
9
|
|
6
10
|
http://forum.xbmc.org/showthread.php?t=28795 XBMC doesn't support real-time DVD EDL playback at all <sniff> oh wait maybe it does now... http://forum.xbmc.org/archive/index.php/t-69388.html
|
@@ -52,7 +52,7 @@ module SensibleSwing
|
|
52
52
|
"stuff"
|
53
53
|
end
|
54
54
|
}
|
55
|
-
@subject.
|
55
|
+
@subject.choose_dvd_or_file_and_edl_for_it
|
56
56
|
@show_blocking_message_dialog_last_arg.should_not be nil
|
57
57
|
end
|
58
58
|
|
@@ -115,7 +115,7 @@ module SensibleSwing
|
|
115
115
|
|
116
116
|
before do
|
117
117
|
@subject = MainWindow.new
|
118
|
-
@subject.stub!(:
|
118
|
+
@subject.stub!(:choose_dvd_drive_or_file) {
|
119
119
|
["mock_dvd_drive", "Volume", Test_DVD_ID] # happiest baby on the block
|
120
120
|
}
|
121
121
|
@subject.stub!(:get_mencoder_commands) { |*args|
|
@@ -123,7 +123,10 @@ module SensibleSwing
|
|
123
123
|
@get_mencoder_commands_args = args
|
124
124
|
'fake get_mencoder_commands'
|
125
125
|
}
|
126
|
-
@subject.stub!(:
|
126
|
+
@subject.stub!(:new_existing_file_selector_and_select_file) {
|
127
|
+
'abc'
|
128
|
+
}
|
129
|
+
@subject.stub!(:new_nonexisting_filechooser) {
|
127
130
|
FakeFileChooser.new
|
128
131
|
}
|
129
132
|
@subject.stub!(:get_drive_with_most_space_with_slash) {
|
@@ -186,13 +189,18 @@ module SensibleSwing
|
|
186
189
|
File.exist?('test_file_to_see_if_we_have_permission_to_write_to_this_folder').should be false
|
187
190
|
end
|
188
191
|
|
189
|
-
it "should prompt twice for filenames--once for the 'to' filename, once for the 'from' filename" do
|
192
|
+
it "should only prompt twice for filenames--once for the 'save to' filename, once for the 'from' filename" do
|
190
193
|
count = 0
|
191
|
-
@subject.stub!(:
|
194
|
+
@subject.stub!(:new_nonexisting_filechooser) {
|
192
195
|
count += 1
|
193
196
|
FakeFileChooser.new
|
194
197
|
}
|
198
|
+
@subject.stub!(:new_existing_file_selector_and_select_file) {
|
199
|
+
count += 1
|
200
|
+
'abc'
|
201
|
+
}
|
195
202
|
@subject.do_copy_dvd_to_hard_drive(false).should == [false, "abc.fulli_unedited.tmp.mpg"]
|
203
|
+
3.times { @subject.do_copy_dvd_to_hard_drive(false) }
|
196
204
|
count.should == 2
|
197
205
|
end
|
198
206
|
|
@@ -343,15 +351,15 @@ module SensibleSwing
|
|
343
351
|
def should_allow_for_changing_file corrupt_the_file = false
|
344
352
|
with_clean_edl_dir_as 'temp' do
|
345
353
|
File.binwrite('temp/a.txt', "\"disk_unique_id\" => \"abcdef1234\"")
|
346
|
-
@subject.stub!(:
|
354
|
+
@subject.stub!(:choose_dvd_drive_or_file) {
|
347
355
|
["mock_dvd_drive", "Volume", "abcdef1234"]
|
348
356
|
}
|
349
|
-
@subject.
|
357
|
+
@subject.choose_dvd_or_file_and_edl_for_it[4]['mutes'].should == []
|
350
358
|
new_file_contents = '"disk_unique_id" => "abcdef1234","mutes"=>["0:33", "0:34"]'
|
351
359
|
new_file_contents = '"a syntax error' if corrupt_the_file
|
352
360
|
File.binwrite('temp/a.txt', new_file_contents)
|
353
361
|
# file has been modified!
|
354
|
-
@subject.
|
362
|
+
@subject.choose_dvd_or_file_and_edl_for_it[4]['mutes'].should_not == []
|
355
363
|
end
|
356
364
|
end
|
357
365
|
|
@@ -368,17 +376,7 @@ module SensibleSwing
|
|
368
376
|
@got_here.should == true
|
369
377
|
end
|
370
378
|
|
371
|
-
|
372
|
-
count = 0
|
373
|
-
@subject.stub!(:new_filechooser) {
|
374
|
-
count += 1
|
375
|
-
FakeFileChooser.new
|
376
|
-
}
|
377
|
-
3.times { @subject.do_copy_dvd_to_hard_drive(false) }
|
378
|
-
count.should == 2 # else would have been 6...
|
379
|
-
end
|
380
|
-
|
381
|
-
describe 'with unstubbed choose_dvd_drive' do
|
379
|
+
describe 'with unstubbed choose_dvd_drive_or_file' do
|
382
380
|
before do
|
383
381
|
DriveInfo.stub!(:get_dvd_drives_as_openstruct) {
|
384
382
|
a = OpenStruct.new
|
@@ -386,28 +384,61 @@ module SensibleSwing
|
|
386
384
|
a.Name = 'a path location'
|
387
385
|
[a]
|
388
386
|
}
|
389
|
-
@subject.unstub!(:
|
387
|
+
@subject.unstub!(:choose_dvd_drive_or_file)
|
390
388
|
end
|
391
|
-
|
392
|
-
|
389
|
+
|
390
|
+
def yo select_a_dvd
|
393
391
|
count = 0
|
394
392
|
DriveInfo.stub!(:md5sum_disk) {
|
395
393
|
count += 1
|
396
394
|
Test_DVD_ID
|
397
395
|
}
|
398
|
-
|
399
|
-
|
400
|
-
|
396
|
+
if !select_a_dvd
|
397
|
+
DriveInfo.stub!(:get_dvd_drives_as_openstruct) { [] } # no DVD disks inserted...
|
398
|
+
end
|
399
|
+
@subject.stub(:get_disk_chooser_window) {|names|
|
400
|
+
a = OpenStruct.new
|
401
|
+
def a.setSize x,y; end
|
402
|
+
a.stub(:selected_idx) { 0 } # first entry is either DVD name *or* file, and is apparently "0" weird weird weird
|
403
|
+
# ruby bug [?] always return nil
|
404
|
+
# def a.selected_idx; p 'returning', select_this_idx; select_this_idx; end
|
405
|
+
a
|
406
|
+
}
|
407
|
+
@subject.stub(:new_nonexisting_filechooser) {|a, b|
|
408
|
+
a = ''
|
409
|
+
def a.go; 'selected_filename'; end
|
410
|
+
a
|
411
|
+
}
|
412
|
+
@subject.stub(:new_existing_file_selector_and_select_file) {
|
413
|
+
'selected_edl'
|
414
|
+
}
|
415
|
+
FileUtils.touch 'selected_edl' # blank file is ok :P
|
416
|
+
@subject.choose_dvd_or_file_and_edl_for_it
|
417
|
+
@subject.choose_dvd_or_file_and_edl_for_it
|
418
|
+
count
|
419
|
+
end
|
420
|
+
|
421
|
+
it "should only prompt for disk selection once" do
|
422
|
+
yo( true ).should == 1 # choose the 'a dvd name' DVD
|
423
|
+
end
|
424
|
+
|
425
|
+
it "should only prompt for file selection once" do
|
426
|
+
prompted = false
|
427
|
+
@subject.stub(:show_assert_dialog) {
|
428
|
+
prompted = true
|
429
|
+
}
|
430
|
+
yo( false ).should == 0 # choose a file, so never dvdid any dvd...
|
431
|
+
assert prompted
|
401
432
|
end
|
402
433
|
|
403
434
|
it "should prompt you if you need to insert a dvd" do
|
404
435
|
DriveInfo.stub!(:get_dvd_drives_as_openstruct) {
|
405
436
|
a = OpenStruct.new
|
406
|
-
#a.VolumeName = 'a dvd name' # we "don't have
|
437
|
+
#a.VolumeName = 'a dvd name' # we "don't have a disk in" for this test...
|
407
438
|
a.Name = 'a path location'
|
408
|
-
[a]
|
439
|
+
[a]
|
409
440
|
}
|
410
|
-
proc {@subject.
|
441
|
+
proc {@subject.choose_dvd_drive_or_file true}.should raise_error(/no dvd found/)
|
411
442
|
@show_blocking_message_dialog_last_arg.should_not be nil
|
412
443
|
end
|
413
444
|
end
|
@@ -431,7 +462,7 @@ module SensibleSwing
|
|
431
462
|
it "should warn if there are no DVD splits and you try to use EDL" do
|
432
463
|
with_clean_edl_dir_as 'temp' do
|
433
464
|
File.binwrite('temp/a.txt', "\"disk_unique_id\" => \"abcdef1234\"")
|
434
|
-
@subject.stub!(:
|
465
|
+
@subject.stub!(:choose_dvd_drive_or_file) {
|
435
466
|
["mock_dvd_drive", "mockVolume", "abcdef1234"]
|
436
467
|
}
|
437
468
|
@subject.do_mplayer_edl(nil, 0, 0)
|
@@ -440,12 +471,8 @@ module SensibleSwing
|
|
440
471
|
end
|
441
472
|
|
442
473
|
it "should be able to parse an srt for ya" do
|
443
|
-
@subject.stub!(:
|
444
|
-
|
445
|
-
fc.stub!(:go) {
|
446
|
-
'spec/dragon.srt'
|
447
|
-
}
|
448
|
-
fc
|
474
|
+
@subject.stub!(:new_existing_file_selector_and_select_file) {
|
475
|
+
'spec/dragon.srt'
|
449
476
|
}
|
450
477
|
file = SensibleSwing::MainWindow::EdlTempFile
|
451
478
|
FileUtils.rm_rf file
|
@@ -453,6 +480,16 @@ module SensibleSwing
|
|
453
480
|
assert File.read(file).contain? "deitys"
|
454
481
|
end
|
455
482
|
|
483
|
+
it "should have a created play unedited smplayer button" do
|
484
|
+
@subject.stub(:show_non_blocking_message_dialog) {
|
485
|
+
# don't display the popup message...
|
486
|
+
}
|
487
|
+
@subject.stub(:single_edit_list_matches_dvd) {
|
488
|
+
nil
|
489
|
+
}
|
490
|
+
click_button(:@play_smplayer)
|
491
|
+
end
|
492
|
+
|
456
493
|
end # describe MainWindow
|
457
494
|
|
458
495
|
end
|
data/spec/tsmuxer.output
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
|
2
|
+
Track ID: 1
|
3
|
+
Stream type: MPEG-2
|
4
|
+
Stream ID: V_MPEG-2
|
5
|
+
Stream info: Profile: Main@8. Resolution: 720:480i. Frame rate: 29.97
|
6
|
+
Stream lang: eng
|
7
|
+
Track ID: 2
|
8
|
+
Stream type: AC3
|
9
|
+
Stream ID: A_AC3
|
10
|
+
Stream info: Bitrate: 448Kbps Sample Rate: 48KHz Channels: 6
|
11
|
+
Stream lang: eng
|
12
|
+
Track ID: 3
|
13
|
+
Can't detect stream type
|
14
|
+
Track ID: 4
|
15
|
+
Can't detect stream type
|
16
|
+
Track ID: 5
|
17
|
+
Can't detect stream type
|
18
|
+
Track ID: 6
|
19
|
+
Can't detect stream type
|
20
|
+
Track ID: 7
|
21
|
+
Can't detect stream type
|
22
|
+
Track ID: 8
|
23
|
+
Can't detect stream type
|
24
|
+
Track ID: 9
|
25
|
+
Can't detect stream type
|
26
|
+
Track ID: 10
|
27
|
+
Can't detect stream type
|
28
|
+
Track ID: 11
|
29
|
+
Can't detect stream type
|
30
|
+
|
31
|
+
Marks: 00:00:00.000 00:01:42.669 00:02:29.215 00:05:50.383 00:07:14.967
|
32
|
+
Marks: 00:11:19.979 00:12:24.276 00:14:17.389
|
33
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
(c) SmartLabs LLC, 2008-2009
|
2
|
+
|
3
|
+
Freeware Licence Agreement
|
4
|
+
This licence agreement only applies to the free version of this software.
|
5
|
+
|
6
|
+
Terms and Conditions
|
7
|
+
BY DOWNLOADING, INSTALLING, USING, TRANSMITTING, DISTRIBUTING OR COPYING THIS SOFTWARE ("THE SOFTWARE"), YOU AGREE TO THE TERMS OF THIS AGREEMENT (INCLUDING THE SOFTWARE LICENCE AND DISCLAIMER OF WARRANTY) WITH SmartLabs LLC (with the business address at 72, Oktyabrskata str., 127521 Moscow, Russia) THE OWNER OF ALL RIGHTS IN RESPECT OF THE SOFTWARE.
|
8
|
+
|
9
|
+
PLEASE READ THIS DOCUMENT CAREFULLY BEFORE USING THE SOFTWARE.
|
10
|
+
|
11
|
+
IF YOU DO NOT AGREE TO ANY OF THE TERMS OF THIS LICENCE THEN DO NOT DOWNLOAD, INSTALL, USE, TRANSMIT, DISTRIBUTE OR COPY THE SOFTWARE.
|
12
|
+
|
13
|
+
THIS DOCUMENT CONSTITUES A LICENCE TO USE THE SOFTWARE ON THE TERMS AND CONDITIONS APPEARING BELOW.
|
14
|
+
|
15
|
+
The Software is licensed to you without charge for use only upon the terms of this licence, and SmartLabs LLC reserves all rights not expressly granted to you. SmartLabs LLC retains ownership of all copies of the Software.
|
16
|
+
|
17
|
+
1. Licence
|
18
|
+
You may use the Software without charge.
|
19
|
+
|
20
|
+
You may distribute exact copies of the Software to anyone.
|
21
|
+
|
22
|
+
2. Restrictions
|
23
|
+
SmartLabs LLC reserves the right to revoke the above distribution right at any time, for any or no reason.
|
24
|
+
|
25
|
+
YOU MAY NOT MODIFY, ADAPT, TRANSLATE, RENT, LEASE, LOAN, SELL, REQUEST DONATIONS OR CREATE DERIVATE WORKS BASED UPON THE SOFTWARE OR ANY PART THEREOF.
|
26
|
+
|
27
|
+
The Software contains trade secrets and to protect them you may not decompile, reverse engineer, disassemble or otherwise reduce the Software to a humanly perceivable form. You agree not to divulge, directly or indirectly, until such trade secrets cease to be confidential, for any reason not your own fault.
|
28
|
+
|
29
|
+
3. Termination
|
30
|
+
This licence is effective until terminated. The Licence will terminate automatically without notice from SmartLabs LLC if you fail to comply with any provision of this Licence. Upon termination you must destroy the Software and all copies thereof. You may terminate this Licence at any time by destroying the Software and all copies thereof. Upon termination of this licence for any reason you shall continue to be bound by the provisions of Section 2 above. Termination will be without prejudice to any rights SmartLabs LLC may have as a result of this agreement.
|
31
|
+
|
32
|
+
4. Disclaimer of Warranty, Limitation of Remedies
|
33
|
+
TO THE FULL EXTENT PERMITTED BY LAW, SmartLabs LLC HEREBY EXCLUDES ALL CONDITIONS AND WARRANTIES, WHETHER IMPOSED BY STATUTE OR BY OPERATION OF LAW OR OTHERWISE, NOT EXPRESSLY SET OUT HEREIN. THE SOFTWARE, AND ALL ACCOMPANYING FILES, DATA AND MATERIALS ARE DISTRIBUTED "AS IS" AND WITH NO WARRANTIES OF ANY KIND, WHETHER EXPRESS OR IMPLIED. SmartLabs LLC DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE, OR THE RESULTS OF THE USE, OF THE SOFTWARE WITH RESPECT TO ITS CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK OF USING THE SOFTWARE IS ASSUMED BY YOU. SmartLabs LLC MAKES NO EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE SOFTWARE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY SmartLabs LLC, IT'S DISTRIBUTORS, AGENTS OR EMPLOYEES SHALL CREATE A WARRANTY, AND YOU MAY NOT RELY ON ANY SUCH INFORMATION OR ADVICE.
|
34
|
+
|
35
|
+
IMPORTANT NOTE: Nothing in this Agreement is intended or shall be construed as excluding or modifying any statutory rights, warranties or conditions which by virtue of any national or state Fair Trading, Trade Practices or other such consumer legislation may not be modified or excluded. If permitted by such legislation, however, SmartLabs LLC' liability for any breach of any such warranty or condition shall be and is hereby limited to the supply of the Software licensed hereunder again as SmartLabs LLC at its sole discretion may determine to be necessary to correct the said breach.
|
36
|
+
|
37
|
+
IN NO EVENT SHALL SmartLabs LLC BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, AND THE LOSS OF BUSINESS INFORMATION OR COMPUTER PROGRAMS), EVEN IF SmartLabs LLC OR ANY SmartLabs LLC REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ADDITION, IN NO EVENT DOES SmartLabs LLC AUTHORISE YOU TO USE THE SOFTWARE IN SITUATIONS WHERE FAILURE OF THE SOFTWARE TO PERFORM CAN REASONABLY BE EXPECTED TO RESULT IN A PHYSICAL INJURY, OR IN LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU AGREE TO HOLD SmartLabs LLC HARMLESS FROM ANY CLAIMS OR LOSSES RELATING TO SUCH UNAUTHORISED USE.
|
38
|
+
|
39
|
+
5. General
|
40
|
+
All rights of any kind in the Software which are not expressly granted in this Agreement are entirely and exclusively reserved to and by SmartLabs LLC.
|
41
|
+
|
42
|
+
This agreement contains the entire Agreement between the parties hereto with respect to the subject matter hereof, and supersedes all prior agreements and/or understandings (oral or written). Failure or delay by SmartLabs LLC in enforcing any right or provision hereof shall not be deemed a waiver of such provision or right with respect to the instant or any subsequent breach. If any provision of this Agreement shall be held by a court of competent jurisdiction to be contrary to law, that provision will be enforced to the maximum extent permissible, and the remaining provisions of this Agreement will remain in force and effect.
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sensible-cinema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.23.
|
5
|
+
version: 0.23.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Roger Pack
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-30 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -223,9 +223,11 @@ files:
|
|
223
223
|
- business_ideas.txt
|
224
224
|
- change_log_with_feature_list.txt
|
225
225
|
- developer_how_to_contribute_to_the_project.txt
|
226
|
+
- documentation/README.TXT
|
226
227
|
- documentation/how_to_create_your_own_delete_lists.txt
|
227
228
|
- documentation/how_to_get_files_from_dvd.txt
|
228
229
|
- documentation/is_it_legal_to_copy_dvds.txt
|
230
|
+
- documentation/troubleshooting.txt
|
229
231
|
- experimental_online_player_ocr_readme.txt
|
230
232
|
- go.bat
|
231
233
|
- go.sh
|
@@ -247,6 +249,7 @@ files:
|
|
247
249
|
- lib/file_chooser.rb
|
248
250
|
- lib/frame_accurate.rb
|
249
251
|
- lib/keyboard_input.rb
|
252
|
+
- lib/media_info_parser.rb
|
250
253
|
- lib/mencoder_wrapper.rb
|
251
254
|
- lib/mouse.rb
|
252
255
|
- lib/mouse_forever.rb
|
@@ -274,8 +277,8 @@ files:
|
|
274
277
|
- spec/edl_parser.spec.rb
|
275
278
|
- spec/frame_accurate.spec.rb
|
276
279
|
- spec/go_line.bat
|
277
|
-
- spec/how_to
|
278
280
|
- spec/keyboard_input.spec.rb
|
281
|
+
- spec/media_info_parser.spec.rb
|
279
282
|
- spec/mencoder_wrapper.spec.rb
|
280
283
|
- spec/mouse.spec.rb
|
281
284
|
- spec/mplayer_edl.spec.rb
|
@@ -288,6 +291,7 @@ files:
|
|
288
291
|
- spec/subtitle_profanity_finder.spec.rb
|
289
292
|
- spec/swing_helpers.spec.rb
|
290
293
|
- spec/test_yaml.yml
|
294
|
+
- spec/tsmuxer.output
|
291
295
|
- spec/vlc_programmer.spec.rb
|
292
296
|
- template_bats/RUN SENSIBLE CINEMA CLICK HERE.bat
|
293
297
|
- template_bats/advanced--create or edit sensible cinema delete list files.bat
|
@@ -307,6 +311,7 @@ files:
|
|
307
311
|
- vendor/mac_dvdid/lib/libdvdid.la
|
308
312
|
- vendor/monkey.png
|
309
313
|
- vendor/readme.txt
|
314
|
+
- vendor/tsmuxer_1.10.6/licence.txt
|
310
315
|
- www/index.html
|
311
316
|
- zamples/edit_decision_lists/category descriptions.txt
|
312
317
|
- zamples/edit_decision_lists/dvds/Harry Potter 2.txt
|
data/spec/how_to
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
grab:
|
2
|
-
vlc --qt-start-minimized dvdsimple://d:\@1 --sout "#standard{access=file,mux=ts,dst=dvdout.%1.mpg}" vlc://quit
|
3
|
-
|
4
|
-
split:
|
5
|
-
ffmpeg -i dvdout.8.mpg -vcodec copy -acodec copy -ss 3595 -t 10 ffmpegdvdout.8.mpeg
|
6
|
-
mencoder1 -hr-edl-seek -ss 3595 -endpos 10 -oac copy -ovc copy dvdoutmplayer.mpg -o mencoder.dvdoutmplayer.mpg
|
7
|
-
|
8
|
-
fulli:
|
9
|
-
|
10
|
-
mencoder filename.whatever -of mpeg -mpegopts format=dvd:tsaf -alang en -nocache -sid 1000 -oac copy -vf scale=720:480,harddup -ovc lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=1:vstrict=0:acodec=ac3:abitrate=192:autoaspect -ofps 30000/1001 -o output.mpeg
|
11
|
-
|
12
|
-
|
13
|
-
$ mplayer dvd://1 -dumpstream -dumpfile c.mpg -dvd-device e:
|