sensible-cinema 0.24.3 → 0.24.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -1
- data/TODO +59 -46
- data/VERSION +1 -1
- data/bin/sensible-cinema +158 -82
- data/change_log_with_feature_list.txt +13 -1
- data/developer_how_to_contribute_to_the_project.txt +18 -24
- data/documentation/is_it_legal_to_copy_dvds.txt +12 -15
- data/history_and_related_works_list.txt +6 -3
- data/lib/ruby_clip.rb +2 -2
- data/lib/subtitle_profanity_finder.rb +10 -6
- data/spec/notes +2 -0
- data/template_bats/mac/RUN SENSIBLE CINEMA CLICK HERE.sh +4 -0
- data/template_bats/mac/advanced--create or edit sensible cinema edit list files.sh +1 -0
- data/template_bats/mac/advanced--run-upconverting-video-player.sh +1 -0
- data/todo.propaganda +2 -0
- data/todo.subtitle +2 -9
- data/todo.upconvert +3 -12
- data/www/index.html +36 -25
- data/www/monkey.png +0 -0
- data/zamples/edit_decision_lists/dvds/Harry Potter 2.txt b/data/zamples/edit_decision_lists/dvds/Harry Potter 2 chamber of → secrets.txt +0 -0
- data/zamples/edit_decision_lists/dvds/{edls_being_edited/bambi.txt → bambi.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/court_jester.txt +26 -0
- data/zamples/edit_decision_lists/dvds/{harry_potter_prisoner_of_azkaban.txt → harry_potter_3_prisoner_of_azkaban.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/{edls_being_edited/hitchhiker's_guide_to_the_galaxy.txt → hitchhiker's_guide_to_the_galaxy.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/{edls_being_edited/iq.txt → iq.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/kung_fu_panda_1.txt +17 -17
- data/zamples/edit_decision_lists/dvds/{pack_wedding_2007-03-03.txt → pack_jackson_wedding_2007-03-03.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/{sintel_open_source_blender.txt → sintel_open_source_blender_ntsc_dvd.txt} +0 -0
- data/zamples/edit_decision_lists/dvds/{edls_being_edited/snow_white_and_the_7_dwarfs_1937.txt → snow_white_and_the_7_dwarfs_1937.txt} +0 -0
- metadata +15 -10
data/Rakefile
CHANGED
@@ -63,7 +63,7 @@ def get_transitive_dependencies dependencies
|
|
63
63
|
transitive_deps = dependency_spec.runtime_dependencies
|
64
64
|
new_dependencies << transitive_deps
|
65
65
|
}
|
66
|
-
new_dependencies.flatten
|
66
|
+
new_dependencies.flatten.uniq
|
67
67
|
end
|
68
68
|
|
69
69
|
task 'clear_and_copy_vendor_cache' do
|
@@ -81,6 +81,7 @@ task 'rebundle_copy_in_dependencies' => 'gemspec' do
|
|
81
81
|
spec = eval File.read('sensible-cinema.gemspec')
|
82
82
|
dependencies = spec.runtime_dependencies
|
83
83
|
dependencies = (dependencies + get_transitive_dependencies(dependencies)).uniq
|
84
|
+
FileUtils.mkdir_p 'vendor/cache'
|
84
85
|
Dir.chdir 'vendor/cache' do
|
85
86
|
dependencies.each{|d|
|
86
87
|
system("#{OS.ruby_bin} -S gem unpack #{d.name}")
|
@@ -102,6 +103,7 @@ task 'create_distro_dir' => :gemspec do # depends on gemspec...
|
|
102
103
|
FileUtils.cp_r(existing, dir_out) # copies files, subdirs in
|
103
104
|
# these belong in the parent dir, by themselves.
|
104
105
|
FileUtils.cp(Dir["#{dir_out}/template_bats/*.bat"], "#{dir_out}/..")
|
106
|
+
FileUtils.cp_r(dir_out + '/template_bats/mac', dir_out)
|
105
107
|
p 'created (still need to zip it) ' + dir_out
|
106
108
|
FileUtils.rm_rf Dir[dir_out + '/**/{spec}'] # don't need to distribute those..save 3M!
|
107
109
|
end
|
data/TODO
CHANGED
@@ -11,23 +11,31 @@
|
|
11
11
|
LLC
|
12
12
|
if...back off to just the ffmpeg (plus an "[A,B]" viewer) only...but for now stick with just DVD playback [?] until people want more...
|
13
13
|
no propaganda...
|
14
|
-
|
14
|
+
no auto subtitle downloads...
|
15
15
|
fix VLC dvdnav itself +- mplayer DVD EDL
|
16
16
|
|
17
17
|
== high prio like blocking bugs ==
|
18
18
|
|
19
19
|
== under next release specific items: ==
|
20
|
-
|
20
|
+
a "half mute" demo, using volume downs/ups
|
21
|
+
plus one that also overlays an extra audio LOL
|
21
22
|
cheap minimize via (probably minimize foreground window/windows API)
|
22
23
|
url -> url inference [hopefully this is cake...]
|
23
24
|
can handle multiple dvdid's et al
|
24
|
-
|
25
|
+
VLC "insert foreign missing scene" demo, overlay section with image (mplayer?)
|
26
|
+
|
25
27
|
== yes do ordered in conjunction with the above probably ==
|
26
|
-
|
28
|
+
m4m: the play button, "regenerate" admin button, "click here x other arrangements of this hymn"
|
29
|
+
does a released version work in mac?
|
30
|
+
mac court jester upconvert: without -nocache, with aggressive sync....
|
31
|
+
jester at home...still laggy at end?
|
27
32
|
unit tests
|
28
|
-
|
29
|
-
|
33
|
+
subs: if at beginning, add extra offset...hmm...why not?
|
34
|
+
release at some point...Jon? urug?
|
35
|
+
after check mac coiso...
|
36
|
+
|
30
37
|
consistency for flight of nav. srt? huh?
|
38
|
+
consistency of others, also "DVD reported full-time versus ts time" for others...
|
31
39
|
lightning strike from various outlets...
|
32
40
|
try buy edit lists from all x,y,z [?] maybe ask for them for free first? ()
|
33
41
|
http://www.familysafemovies.com
|
@@ -46,21 +54,31 @@
|
|
46
54
|
make it load faster! this is cuh-razy! or splash screen! yes!
|
47
55
|
|
48
56
|
== yes do, un-ordered currently, from the various future release options ==
|
57
|
+
facebook survey :)
|
58
|
+
"--developer" mode
|
59
|
+
export JSON command line, note it in the docu, show it in --developer mode, no new bat file for developer mode
|
60
|
+
dialog on button aborted, see if I like it :)
|
61
|
+
fan editor (after C player ?? though I suppose we could bring back batch mplayer to also do this...)
|
62
|
+
"fan editor" .bat file LOL
|
63
|
+
|
64
|
+
new button "auto-test" a subtitles file for timing :)
|
65
|
+
new upconv button: take some snapshots (just to straight mjpeg or jpeg or the what not)
|
66
|
+
auto-update website on release.
|
67
|
+
publish a ripped raw big bunny
|
68
|
+
update development howto
|
69
|
+
@jruby scan court jester is *so* slow...what the...
|
49
70
|
urug again?
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
complain if times looks wrong...
|
55
|
-
complain [accomodate option] if start time looks off...600
|
71
|
+
after works in mac. Why not?
|
72
|
+
netflix upconverter
|
73
|
+
if 2 EDL's, still choose a title track, playback
|
74
|
+
add largest title to the generator EDL
|
75
|
+
complain if times looks wrong...on playback? sum time
|
56
76
|
"1:07:5.718" , "1:07:10.447", "profanity", "ba.....", "Faraday that [ba.....] That ba He's gonna wish he never met us",
|
57
77
|
tighten splits
|
58
78
|
"save to" -> same dir as "get from" yeah
|
59
79
|
open EDL can have a rememberable DIR
|
60
80
|
@instructions "this is great for comparing srt's, except...when it isn't, then you have to..."
|
61
|
-
@instructions: full srt how-to
|
62
|
-
can I just use ffmpeg for an initial -> ts ? http://eotmsnotes.wordpress.com/2011/04/25/tsmuxer-notes/
|
63
|
-
add dvd_title_time option
|
81
|
+
@instructions: full srt how-to document instead of tooltip [?]
|
64
82
|
volume_name => dvd_volume_name
|
65
83
|
why is the Sintel's EDL seemingly off?
|
66
84
|
ascertain how accurate mplayer EDL is...I guess compared to...umm...something?
|
@@ -72,28 +90,23 @@
|
|
72
90
|
don't have to use eval!
|
73
91
|
EDL with JSON on top, full timestamps.
|
74
92
|
setpriority for several :)
|
75
|
-
bring to top after a conversion, and
|
93
|
+
bring to top after a conversion, and before prompts...
|
76
94
|
can auto-use tsmuxer at all [?]
|
77
95
|
mac just die with instructions to use tsmuxer first...
|
78
|
-
check if some
|
79
|
-
unit tests (all pass)
|
80
|
-
upconvert: a file
|
81
|
-
can I avoid requiring use of tsmuxer first? hmm...
|
96
|
+
check if some buttons are now outdated...
|
82
97
|
check with blu-ray...do they match timing-wise? sub-title wise?
|
83
|
-
donate tsmuxer,
|
98
|
+
donate tsmuxer, mplayer, http://ffmpeg.zeranoe.com/builds, mulder +- [?] smplayer menumeter http://instantitunes.wordpress.com/2010/02/26/use-tsmuxer-on-snow-leopard/
|
99
|
+
already donated: unlocker, mac fan thing, open office, many sourceforge tops, 7zip, VLC, cannot donate: ffmpeg
|
84
100
|
youtube/hulu timings
|
85
|
-
@mplayer do you want a demo disk of how it fails edl dvdnav?
|
86
101
|
split LLC's website+consumer
|
87
102
|
get LLC before a "real" domain name
|
88
|
-
upconverter
|
89
|
-
check gl mac
|
90
|
-
check permutations
|
91
103
|
employee instructions: watch @ realtime after profanity filter first pass :P
|
92
104
|
@makemkv: timing feels broken weird-like!
|
105
|
+
try out libdvdcss + handbrake on the one that was totally broken...is it better?
|
93
106
|
clear runnings
|
94
107
|
have ben and chris test it out, have it work, then ask about video quality
|
95
108
|
me try
|
96
|
-
try disney digital copy
|
109
|
+
try out disney digital copy
|
97
110
|
C player:
|
98
111
|
folder, look for title.edl
|
99
112
|
use DVD navigator
|
@@ -110,25 +123,22 @@
|
|
110
123
|
can come out of full screen more easily :P
|
111
124
|
note pay for XP http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins search for the cheapest
|
112
125
|
note to them windows vista/7: use ac3filter [?]
|
113
|
-
[A,B]
|
114
|
-
create the "play previously created edited file for current DVD" button
|
126
|
+
[A,B]
|
115
127
|
note better to previewer "you are about to preview these specific edits..." ?
|
116
128
|
ask for more beta testers for use, ask for more beta testers for creation, too
|
117
|
-
|
129
|
+
rinse and repeat with various ppl
|
118
130
|
create a semi-accurate phantom edit EDL
|
119
131
|
http://www.chefelf.com/forums/index.php?showtopic=6176
|
120
|
-
karlie?
|
121
132
|
inventionzy: blu-ray stuff from todo.inventionzy
|
122
133
|
|
123
|
-
port to mac OS X
|
124
|
-
|
125
|
-
use mplayerx well [?] like wrap it...
|
134
|
+
port to mac OS X
|
135
|
+
ppc dvdid?
|
126
136
|
the final "edited.avi" really "could/should" be playable in WMP...if possible
|
127
|
-
do I need tsmuxer?
|
128
|
-
auto-"guess" the best title...
|
129
137
|
add button "fast preview segment" (from dvd)
|
138
|
+
add button "fast preview one" (from file) smplayer
|
130
139
|
upconvert research/compare various options
|
131
|
-
investigate WMC "call out to smplayer EDL" or the like...
|
140
|
+
investigate WMC "call out to smplayer + EDL" or the like...
|
141
|
+
add to docu
|
132
142
|
|
133
143
|
== other lists ==
|
134
144
|
|
@@ -140,9 +150,9 @@
|
|
140
150
|
todo.subtitle
|
141
151
|
|
142
152
|
== DVD decide later to move up or down ==
|
143
|
-
add button "fast preview one" (from file)
|
144
153
|
|
145
154
|
== DVD-realtime backlog once yes do, now not do, unordered ==
|
155
|
+
can I just use ffmpeg for an initial -> ts ? http://eotmsnotes.wordpress.com/2011/04/25/tsmuxer-notes/
|
146
156
|
investigate xbmc dvd edl how do you do that? [+- real dvd]
|
147
157
|
fast preview: change it to be aggressive sometimes yes, other times no
|
148
158
|
fast preview mode: watch for modifications to file, kill mplayer instances for them on change :)
|
@@ -153,7 +163,11 @@
|
|
153
163
|
investigate: can I use zoomplayer max?
|
154
164
|
|
155
165
|
== DVD+-DVD-realtime backlog (totally unordered, some very low prio, basically all never do) ==
|
156
|
-
|
166
|
+
@ffmpeg: bounty/plz multi-thread the lanczos filter? plz?
|
167
|
+
@ffmpeg: super video enhancer filter. plz? LOL [bounty?]
|
168
|
+
use mplayerx well [?] like wrap it...
|
169
|
+
could for files, not for dvd's yet tho...
|
170
|
+
try to team up with fanedit.org ?
|
157
171
|
slow cpu: mater tall tales: are my av sync values better or worse than smplayer defaults, with/without upsampling, blacky?
|
158
172
|
investigate boxee edl (just fer fun...maybe possible?) http://getsatisfaction.com/boxee/topics/commercial_skipping_edl_support
|
159
173
|
mplayer EDL allow this:
|
@@ -164,6 +178,8 @@
|
|
164
178
|
test with cars-ws (at work), mac (to make sure volume name doesn't have spaces)
|
165
179
|
investigate dvdrsbvdl (windows media center edl plugin)
|
166
180
|
the distro could be made smaller yet [at least not as many gem deps needed...maybe more possible...]
|
181
|
+
@mplayer: chooses wrong language ts from jester...sigh
|
182
|
+
@mplayer: crash: http://betterlogic.com/roger/2011/07/mplayer-mac-os-x-woe/
|
167
183
|
@mplayer: crash IQ nav, keys dont' work in windows, prolly dvdcss doesn't cache in windows, can't pass parameter in windows LOL
|
168
184
|
@mplayer: could you umm...go ahead and support avisynth input pleaz, assuming you don't?
|
169
185
|
@mplayer: dvdnav:///e: should play the *menu* please? please? [???]
|
@@ -192,6 +208,7 @@
|
|
192
208
|
some way to hide spoilers, like soundtrack adds that ruin the movie for ya...
|
193
209
|
decide on "community" -- should it be all my own community? mymovies community?
|
194
210
|
the auto-matcher filename to subtitles [?]
|
211
|
+
auto-downloader based on filename/dvd name/md5 ?
|
195
212
|
"media browser" plugin?
|
196
213
|
@makemkv: show us the title numbers, and number them *by those*
|
197
214
|
@macports: set notestxt \
|
@@ -208,13 +225,12 @@
|
|
208
225
|
create an XBMC plugin that auto-searches for...ummm...uh...filters for you? huh? some type of plugin?
|
209
226
|
just create the side by side .EDL for various files for people.
|
210
227
|
make a mymovies plugin to auto-use EDL's somehow... ?
|
211
|
-
auto download subtitles from opensubtitles somehow err other...
|
212
228
|
an almost rifftrax that...says "here overlay x, change normal volume to 50% during that time..."
|
213
229
|
check if tmdb needs some type of upload...hmm...to save them... ask that one guy if I can bribe him into doing it? dvdxml? dvdid.info?
|
214
|
-
allow for
|
230
|
+
allow for filtered subtitles, a la "always skip" [?]
|
215
231
|
allow for AAF or OMF export, as well as EDL (?)
|
216
|
-
C specific portion [A,B] player
|
217
232
|
also edit the playback of trailers et al [?] hmm...
|
233
|
+
allow for mplayer too? hmm...
|
218
234
|
@mplayer: double click default to full screen! :) and enter default to dvdnav select!
|
219
235
|
add button "play from exactly here to here" in [mplayer uh guess?] :P
|
220
236
|
what does mplayer do with -ss big_number past the end of an end [monster's inc]?
|
@@ -233,8 +249,6 @@
|
|
233
249
|
research the gplv3, add terms. Maybe want real lawyer, even?
|
234
250
|
sons of provo "music video" EDL
|
235
251
|
it can "slow certain sections down" that might look way cool! LOL
|
236
|
-
how does this one download subtitles? http://www.pcworld.com/article/227465/freebie_splayer_plays_almost_any_video_fileand_looks_good_doing_it.html
|
237
|
-
also xbmc has a plugin
|
238
252
|
script powerdvd via keystrokes
|
239
253
|
VLC: suggest uservoice
|
240
254
|
can I just use mencoder with an EDL parameter to possibly split/join more quickly or something?
|
@@ -265,9 +279,9 @@
|
|
265
279
|
machine learning for video analysis [?]
|
266
280
|
figure out how to auto-crop after grab?
|
267
281
|
figure out some way to work with cable providers/iphones/gphones?
|
268
|
-
@
|
282
|
+
@mplayer: why do you sometimes start with subtitles enabled?
|
269
283
|
don't need to include in package rdp-win32screenshot et al for just DVD work...
|
270
|
-
bring
|
284
|
+
bring back batch file mplayer :)
|
271
285
|
make my website slightly more "pictures-zy"
|
272
286
|
check why out of sync my turn on earth on blacky MPH-HC
|
273
287
|
does it with other players...?
|
@@ -299,7 +313,6 @@
|
|
299
313
|
http://themoviedb.lighthouseapp.com/projects/17044-themoviedborg/tickets/142
|
300
314
|
their mkv player probably does some lookup 'er other...maybe...for dvd's
|
301
315
|
I really need to tell tvdb to allow for discid, and/or themoviedb to allow for series'
|
302
|
-
@themoviedb: allow for series, also allow for subtitles?
|
303
316
|
@mplayer: some way to not have to use phreaky phreaky pipes in doze ("+1")
|
304
317
|
@ffmpeg: gop 12 for ntsc-dvd?
|
305
318
|
can watch conference like a music video :)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.24.
|
1
|
+
0.24.4
|
data/bin/sensible-cinema
CHANGED
@@ -31,21 +31,30 @@ raise 'need newer jruby!' unless RUBY_DESCRIPTION >= 'jruby 1.6.0' # may not nee
|
|
31
31
|
|
32
32
|
alias system_original system
|
33
33
|
require 'fileutils'
|
34
|
-
require_relative '../lib/mencoder_wrapper'
|
35
|
-
require_relative '../lib/storage'
|
36
|
-
require_relative '../lib/edl_parser'
|
37
|
-
require_relative '../lib/mplayer_edl'
|
38
|
-
require_relative '../lib/play_audio'
|
39
|
-
require_relative '../lib/subtitle_profanity_finder'
|
40
|
-
require_relative '../lib/convert_thirty_fps'
|
41
|
-
require_relative '../lib/ruby_clip'
|
42
34
|
|
43
|
-
|
35
|
+
class String
|
36
|
+
def snake_case
|
37
|
+
self.gsub(/::/, '/').
|
38
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
39
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
40
|
+
tr("-", "_").
|
41
|
+
downcase
|
42
|
+
end
|
43
|
+
end
|
44
44
|
require_relative '../lib/swing_helpers'
|
45
|
-
|
45
|
+
|
46
|
+
for kls in [:MencoderWrapper, :EdlParser, :MplayerEdl, :PlayAudio, :SubtitleProfanityFinder, :ConvertThirtyFps, :RubyClip, :DriveInfo]
|
47
|
+
autoload kls, "./lib/#{kls.to_s.snake_case}"
|
48
|
+
end
|
49
|
+
|
50
|
+
# a few I'll need...
|
51
|
+
require_relative '../lib/storage'
|
52
|
+
require 'tmpdir'
|
46
53
|
require 'whichr'
|
47
54
|
require 'os'
|
48
|
-
|
55
|
+
unless OS.mac?
|
56
|
+
autoload :WMI, 'ruby-wmi'
|
57
|
+
end
|
49
58
|
|
50
59
|
vendor_cache = File.expand_path(File.dirname(__FILE__)) + '/../vendor/cache'
|
51
60
|
|
@@ -119,7 +128,7 @@ module SensibleSwing
|
|
119
128
|
end
|
120
129
|
|
121
130
|
LocalStorage = Storage.new("sensible_cinema_storage")
|
122
|
-
LocalStorage.set_default('
|
131
|
+
LocalStorage.set_default('screen_multiples', 2)
|
123
132
|
|
124
133
|
def setup_upconvert_buttons
|
125
134
|
|
@@ -127,25 +136,29 @@ module SensibleSwing
|
|
127
136
|
warn_if_no_upconvert_options_currently_selected
|
128
137
|
filename_mpg = new_existing_file_selector_and_select_file( "pick movie file (like moviename.mpg)")
|
129
138
|
play_mplayer_edl [filename_mpg, nil]
|
130
|
-
end
|
139
|
+
end.tool_tip= "This plays back a movie file, like moviefile.mpg, using your current upconverter settings.\nTo playback a file edited upconverted, set upconvert options here first, then run them using sensible cinema main--it will automatically use your new upconverting options." # LODO
|
131
140
|
|
132
|
-
@
|
141
|
+
@watch_dvd_upconvert = new_jbutton( "Watch a DVD upconverted (unedited)") do
|
133
142
|
warn_if_no_upconvert_options_currently_selected
|
134
143
|
play_dvd_smplayer_unedited false, false
|
135
144
|
end
|
145
|
+
@watch_dvd_upconvert.tool_tip = "Plays back the currently inserted DVD, using your current upconverter settings.\nIf it fails (dies immediately, blank screen, etc.), try setting upconvert options to a smaller screen resolution multiple.\nOr try playing the DVD with VLC first, then it might work.\nTo playback a DVD edited upconverted, set upconvert options here first, then run them using sensible cinema main--it will automatically use your new upconverting options."
|
136
146
|
|
137
147
|
@upconv_line = add_text_line ''
|
138
148
|
change_upconvert_line_to_current
|
139
149
|
|
140
150
|
add_text_line ''
|
141
|
-
|
142
|
-
@show_upconvert_options = new_jbutton( "Change/Set upconvert options" ) do
|
143
|
-
add_setup_upconvert_options
|
144
|
-
end
|
151
|
+
add_change_upconvert_options_button
|
145
152
|
add_text_line "Note that sensible cinema will also upconvert when it plays back edited DVD's/files."
|
146
153
|
add_text_line ''
|
147
154
|
|
148
155
|
end
|
156
|
+
|
157
|
+
def add_change_upconvert_options_button
|
158
|
+
@show_upconvert_options = new_jbutton( "Change/Set upconverting playback options" ) do
|
159
|
+
add_setup_upconvert_options
|
160
|
+
end.tool_tip= "Allows you to set your upconvert options.\nUpconverting attempts to playback your movie with higher quality on high resolution monitors."
|
161
|
+
end
|
149
162
|
|
150
163
|
def warn_if_no_upconvert_options_currently_selected
|
151
164
|
if !LocalStorage[UpConvertEnglish]
|
@@ -191,28 +204,59 @@ module SensibleSwing
|
|
191
204
|
LocalStorage[UpConvertEnglish] = "experimental"
|
192
205
|
display_current_upconvert_setting
|
193
206
|
}
|
194
|
-
|
207
|
+
add_text_line "Multiple factor screen widths (higher is better, but uses more cpu, 2x is good)."
|
208
|
+
add_text_line "If mplayer just dies or if it displays only a blank screen then lower this."
|
195
209
|
slider = JSlider.new
|
196
|
-
slider.setBorder(BorderFactory.createTitledBorder("
|
210
|
+
slider.setBorder(BorderFactory.createTitledBorder("Screen resolution multiple"));
|
211
|
+
|
212
|
+
# I want tick for 1x, 1.5x, 2x, 2.5x, 3x
|
213
|
+
# so let's do 10 -> 30 ...
|
214
|
+
|
215
|
+
labelTable = java.util.Hashtable.new
|
216
|
+
i = java.lang.Integer
|
217
|
+
l = JLabel
|
218
|
+
|
219
|
+
# allow for 0.75 too, if you have a large monitor, slower cpu...
|
220
|
+
local_minimum = (720.0/get_current_max_width_resolution)*100 # allow 1024 to use upscaling to 860 LOL
|
221
|
+
# => 70 for 1024 monitor, so we'll then allow for the 75 below...
|
222
|
+
label_minimum = nil
|
223
|
+
(0..300).step(25) do |n|
|
224
|
+
if n > local_minimum
|
225
|
+
label_minimum ||= n
|
226
|
+
if (n % 100 == 0)
|
227
|
+
labelTable.put(i.new(n), l.new("#{n/100}x")) # 1x
|
228
|
+
elsif n == label_minimum # just for the bottom label, rest too chatty
|
229
|
+
labelTable.put(i.new(n), l.new("#{n/100.0}x")) # 1.5x
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
slider.setLabelTable( labelTable )
|
197
234
|
|
198
|
-
slider.maximum=
|
199
|
-
slider.minimum=
|
200
|
-
slider.setMajorTickSpacing(
|
235
|
+
slider.maximum=300
|
236
|
+
slider.minimum=label_minimum
|
237
|
+
slider.setMajorTickSpacing(100)
|
238
|
+
slider.setMinorTickSpacing(25)
|
201
239
|
slider.setPaintTicks(true)
|
202
240
|
slider.setPaintLabels(true)
|
203
241
|
slider.snap_to_ticks=true
|
204
242
|
|
205
|
-
slider.set_value LocalStorage['
|
243
|
+
slider.set_value LocalStorage['screen_multiples'] * 100
|
206
244
|
|
207
245
|
slider.add_change_listener { |event|
|
208
|
-
if slider.
|
209
|
-
|
210
|
-
LocalStorage['
|
211
|
-
|
212
|
-
|
246
|
+
if !slider.value_is_adjusting
|
247
|
+
# they released their hold on it...
|
248
|
+
old_value = LocalStorage['screen_multiples']
|
249
|
+
new_value = slider.value/100.0
|
250
|
+
LocalStorage['screen_multiples'] = new_value
|
251
|
+
if new_value != old_value
|
252
|
+
display_current_upconvert_setting
|
253
|
+
if slider.value == label_minimum
|
254
|
+
show_blocking_message_dialog "Setting it too low like that might make it not really do much upconverting!"
|
255
|
+
end
|
256
|
+
end
|
213
257
|
end
|
214
258
|
}
|
215
|
-
slider.set_bounds(44, @starting_button_y, @button_width,
|
259
|
+
slider.set_bounds(44, @starting_button_y, @button_width, 66)
|
216
260
|
2.times {increment_button_location}
|
217
261
|
@panel.add(slider)
|
218
262
|
end
|
@@ -220,20 +264,24 @@ module SensibleSwing
|
|
220
264
|
def display_current_upconvert_setting
|
221
265
|
change_upconvert_line_to_current
|
222
266
|
show_blocking_message_dialog get_current_upconvert_as_phrase
|
267
|
+
p get_current_upconvert_as_phrase
|
223
268
|
end
|
224
269
|
|
225
270
|
def get_current_upconvert_as_phrase
|
226
271
|
settings = LocalStorage[UpConvertEnglish]
|
227
|
-
"Upconvert options currently #{ settings ? "are set to #{settings} style" : "are NOT SET"}."
|
272
|
+
"Upconvert options currently #{ settings ? "are set to #{settings} style" : "are NOT SET"} (screen multiplier #{LocalStorage['screen_multiples']})."
|
273
|
+
end
|
274
|
+
|
275
|
+
def get_current_max_width_resolution
|
276
|
+
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment.getScreenDevices.map{|gd| gd.display_mode.width}.max.to_i
|
228
277
|
end
|
229
278
|
|
230
279
|
def get_upconvert_vf_settings
|
231
280
|
template = LocalStorage[UpConvertKey]
|
232
281
|
if template
|
233
282
|
# choose width of widest monitor (why would they display it on the other?)
|
234
|
-
|
235
|
-
screen_multiple
|
236
|
-
template.gsub('SCREEN_X', (screen_x*screen_multiple).to_i.to_s) # has to be an integer...
|
283
|
+
screen_multiple = LocalStorage['screen_multiples']
|
284
|
+
template.gsub('SCREEN_X', (get_current_max_width_resolution*screen_multiple).to_i.to_s) # has to be an integer...
|
237
285
|
else
|
238
286
|
nil
|
239
287
|
end
|
@@ -251,6 +299,7 @@ module SensibleSwing
|
|
251
299
|
"If your DVD doesn't have an EDL created for it, this will be your first step--create an EDL file for it.")
|
252
300
|
@create_new_edl_for_current_dvd.on_clicked do
|
253
301
|
create_brand_new_edl
|
302
|
+
@display_unique.simulate_click # for now...
|
254
303
|
end
|
255
304
|
|
256
305
|
@open_list = new_jbutton("Open/Edit a previously created EDL file", "If your DVD has a previously existing EDL for it, you can open it to edit it with this button.")
|
@@ -269,7 +318,7 @@ module SensibleSwing
|
|
269
318
|
version (which includes an updated version of mplayer that fixes some bugs in EDL playback)
|
270
319
|
EOL
|
271
320
|
@create_dot_edl.on_clicked {
|
272
|
-
|
321
|
+
choose_file_and_edl_and_create_sxs_or_play true
|
273
322
|
}
|
274
323
|
|
275
324
|
@play_smplayer = new_jbutton( "Watch full DVD unedited (realtime smplayer)")
|
@@ -351,12 +400,23 @@ module SensibleSwing
|
|
351
400
|
Basically download it from opensubtitles.org (possibly from other sites, too),
|
352
401
|
(enter dvd name in the search box, click a result, click one from the list with an English flag, then click 'Download(zip)')
|
353
402
|
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)")
|
403
|
+
NB that you'll first want/need to *carefully* double check your subtitle
|
404
|
+
file with the actual DVD. (ex: smplayer, hit the 'o' button to display
|
405
|
+
the current timestamp, then go to the end, stop at some point with text
|
406
|
+
and hit the '.' key until a subtitle very first displays.
|
407
|
+
Next convert that number to 29.97 fps (using the button given).
|
408
|
+
The numbers should match precisely. If they don't, edit this file
|
409
|
+
so that it will have some offsets given.
|
354
410
|
EOL
|
411
|
+
|
355
412
|
@parse_srt.on_clicked do
|
356
|
-
filename = new_existing_file_selector_and_select_file("Pick srt file:")
|
357
|
-
|
358
|
-
|
413
|
+
filename = new_existing_file_selector_and_select_file("Pick srt file to scan for profanity:")
|
414
|
+
add_to_beginning = get_user_input("How much time to subtract from the beginning of each subtitle entry (ex: 1:00 -> 1:01 becomes 0:59 -> 1:01)", "0.0")
|
415
|
+
add_to_end = get_user_input("How much time to add to the end of each subtitle entry (ex: 1:00 -> 1:01 becomes 1:00 -> 1:02)", "0.0")
|
416
|
+
parsed = SubtitleProfanityFinder.edl_output filename, {}, add_to_beginning.to_f, add_to_end.to_f # flight: TODO necessary typically ??? 0.35, 0.25
|
417
|
+
File.write(EdlTempFile, "# add these into your mute section if you deem them mute-worthy\n" + parsed)
|
359
418
|
open_file_to_edit_it filename, true
|
419
|
+
sleep 0.3 if OS.mac? # add delay...
|
360
420
|
open_file_to_edit_it EdlTempFile
|
361
421
|
end
|
362
422
|
|
@@ -407,7 +467,7 @@ module SensibleSwing
|
|
407
467
|
end # advanced buttons
|
408
468
|
|
409
469
|
def setup_normal_buttons
|
410
|
-
|
470
|
+
|
411
471
|
@mplayer_edl = new_jbutton( "Watch DVD edited (realtime)")
|
412
472
|
@mplayer_edl.tool_tip = "This will watch your DVD in realtime from your computer while skipping/muting questionable scenes."
|
413
473
|
@mplayer_edl.on_clicked {
|
@@ -424,21 +484,25 @@ module SensibleSwing
|
|
424
484
|
do_copy_dvd_to_hard_drive_via_file false
|
425
485
|
}
|
426
486
|
|
427
|
-
# @watch_created_file = new_jbutton( "Watch the edited version of DVD file", false).on_clicked {
|
428
|
-
# play_mplayer_edl # LODO
|
429
|
-
# }
|
430
|
-
|
431
487
|
@watch_file_edl = new_jbutton( "Watch movie file edited (realtime)" ) do
|
432
|
-
|
433
|
-
end
|
488
|
+
choose_file_and_edl_and_create_sxs_or_play false
|
489
|
+
end
|
434
490
|
|
435
491
|
@open_help_file = new_jbutton("View Sensible Cinema Documentation") do
|
436
492
|
show_in_explorer __DIR__ + "/../documentation"
|
437
|
-
end
|
493
|
+
end
|
438
494
|
|
495
|
+
if LocalStorage[UpConvertEnglish]
|
496
|
+
@upconv_line = add_text_line " #{get_current_upconvert_as_phrase}"
|
497
|
+
else
|
498
|
+
@upconv_line = add_text_line ''
|
499
|
+
end
|
500
|
+
|
501
|
+
add_change_upconvert_options_button
|
502
|
+
|
439
503
|
end
|
440
504
|
|
441
|
-
def
|
505
|
+
def choose_file_and_edl_and_create_sxs_or_play just_create_dot_edl_file_instead_of_play
|
442
506
|
filename_mpg = new_existing_file_selector_and_select_file( "pick moviefile (like moviename.mpg)")
|
443
507
|
edl_filename = new_existing_file_selector_and_select_file( "Pick an EDL file to use with it", EDL_DIR)
|
444
508
|
assert_ownership_dialog
|
@@ -447,10 +511,9 @@ module SensibleSwing
|
|
447
511
|
# LODO these timings...DRY up...plus is XBMC the same? what about on a slower computer?
|
448
512
|
# NB these are just for the SxS EDL!
|
449
513
|
|
450
|
-
|
514
|
+
#add_secs_end = 0
|
451
515
|
#add_secs_beginning = 0.5 # LODO are these accurate for file based, as well? slow cpu versus fast?
|
452
516
|
|
453
|
-
# TODO do I want these added at file create time, not use time!
|
454
517
|
edl_contents = MplayerEdl.convert_to_edl descriptors, add_secs_end = MplayerEndBuffer, MplayerBeginingBuffer, splits = []
|
455
518
|
output_file = filename_mpg.gsub(/\.[^\.]+$/, '') + '.edl' # sanitize...
|
456
519
|
File.write(output_file, edl_contents)
|
@@ -531,6 +594,7 @@ module SensibleSwing
|
|
531
594
|
end
|
532
595
|
|
533
596
|
def run_smplayer_blocking play_this, extra_options, force_use_mplayer
|
597
|
+
extra_options += " -alang en " # for those that put french first...
|
534
598
|
extra_options += " -mouse-movements #{get_upconvert_secondary_settings} " # just in case smplayer also needs -mouse-movements... :)
|
535
599
|
extra_options += " -lavdopts threads=#{OS.cpu_count} " # just in case this helps [supposed to with H.264] :)
|
536
600
|
if OS.mac? || force_use_mplayer
|
@@ -543,6 +607,8 @@ module SensibleSwing
|
|
543
607
|
extra_options += " -slang en "
|
544
608
|
extra_options += " -font #{ENV['SystemRoot']}\\fonts\\ARIAL.TTF " # would need EXTRA ESCAPING FOR SMPLAYER USE
|
545
609
|
conf_file = conf_file[2..-1] # strip off drive letter, which it doesn't like no sir
|
610
|
+
else
|
611
|
+
extra_options += " -font /Library/Fonts/Arial.ttf "
|
546
612
|
end
|
547
613
|
extra_options += " -fs " # full screen
|
548
614
|
c = "mplayer #{extra_options} #{"-vf " + get_upconvert_vf_settings if get_upconvert_vf_settings} -input conf=\"#{conf_file}\" -mouse-movements \"#{play_this}\" "
|
@@ -553,7 +619,7 @@ module SensibleSwing
|
|
553
619
|
config_path = set_smplayer_opts extra_options
|
554
620
|
c = "smplayer_portable \"#{play_this}\" -fullscreen -config-path \"#{File.dirname config_path}\" -close-at-end "
|
555
621
|
end
|
556
|
-
|
622
|
+
p c # for debugging...
|
557
623
|
system_blocking c
|
558
624
|
end
|
559
625
|
|
@@ -596,13 +662,15 @@ module SensibleSwing
|
|
596
662
|
|
597
663
|
"volume_name" => "#{volume}",
|
598
664
|
"disk_unique_id" => "#{dvd_id}",
|
599
|
-
"dvd_title_track" => "1", # the show info button will tell you title
|
600
|
-
# "
|
601
|
-
# "
|
665
|
+
"dvd_title_track" => "1", # the "show DVD info" button will tell you title lengths (typically longest title is the title track)
|
666
|
+
# "dvd_title_track_length" => "6095", # sum length, on the DVD, use the show DVD info button to retrieve it.
|
667
|
+
# "opensubtitles_number" => "1234567",
|
668
|
+
# "not edited out stuff" => "some violence left in...",
|
669
|
+
# "closing thoughts" => "only did the...",
|
602
670
|
# "mplayer_dvd_splits" => ["59:59", "1:04:59"], # or [] if there are none. Additive currently. 12345.6 ok. In mplayer, the DVD timestamp "resets" to zero for some reason, so you need to specify when if you want to use mplayer DVD realtime playback, or use mencoder -edl to split your file. See http://goo.gl/yMfqX
|
603
671
|
EOL
|
604
|
-
#
|
605
|
-
filename = EDL_DIR + "
|
672
|
+
# TODO auto-ify above, move docs to a file in documentation.
|
673
|
+
filename = EDL_DIR + "/edls_being_edited/" + english_name.gsub(' ', '_') + '.txt'
|
606
674
|
filename.downcase!
|
607
675
|
File.write(filename, input) unless File.exist?(filename) # lodo let them choose name (?)
|
608
676
|
open_file_to_edit_it filename
|
@@ -687,26 +755,38 @@ module SensibleSwing
|
|
687
755
|
'o' key: turn on on-screen-display timestamps (note: the OSD timestamps [upper left] are 30 fps so will need to be converted to use).
|
688
756
|
'v' key: turn off subtitles.
|
689
757
|
'.' key: step one frame.
|
758
|
+
# key: switch audio language track
|
690
759
|
EOL
|
691
760
|
end
|
692
761
|
|
693
762
|
MplayerBeginingBuffer = 1.0
|
694
763
|
MplayerEndBuffer = 0.0
|
695
764
|
|
696
|
-
def play_mplayer_edl
|
765
|
+
def play_mplayer_edl optional_file_with_edl_path = nil
|
697
766
|
extra_mplayer_commands = []
|
698
|
-
if
|
699
|
-
drive_or_file, edl_path =
|
700
|
-
dvd_id = NonDvd # fake it out...LODO
|
767
|
+
if optional_file_with_edl_path
|
768
|
+
drive_or_file, edl_path = optional_file_with_edl_path
|
769
|
+
dvd_id = NonDvd # fake it out...LODO a bit smelly
|
701
770
|
else
|
702
771
|
drive_or_file, dvd_volume_name, dvd_id, edl_path, descriptors = choose_dvd_or_file_and_edl_for_it
|
703
772
|
end
|
773
|
+
start_add_this_to_all_ts = 0
|
704
774
|
if dvd_id == NonDvd
|
705
775
|
play_this = drive_or_file # play straight file...
|
776
|
+
# check if starts offset...
|
777
|
+
all = `ffmpeg -i "#{play_this}" 2>&1`
|
778
|
+
# Duration: 01:35:49.59, start: 600.000000
|
779
|
+
all =~ /Duration.*start: ([\d\.]+)/
|
780
|
+
start = $1.to_f
|
781
|
+
if start > 0
|
782
|
+
show_non_blocking_message_dialog "Warning: file seems to start at an extra offset, adding it to the timestamps... #{start}
|
783
|
+
maybe not compatible with XBMC, if that's what you use, and you probably don't" # TODO test it XBMC...
|
784
|
+
start_add_this_to_all_ts = start
|
785
|
+
end
|
706
786
|
else
|
707
787
|
using_dvd = true
|
708
788
|
title_track = get_title_track(descriptors)
|
709
|
-
extra_mplayer_commands << "
|
789
|
+
extra_mplayer_commands << "-nocache -dvd-device #{drive_or_file}"
|
710
790
|
play_this = "dvdnav://#{title_track}"
|
711
791
|
end
|
712
792
|
if edl_path
|
@@ -715,7 +795,6 @@ module SensibleSwing
|
|
715
795
|
descriptors = {}
|
716
796
|
end
|
717
797
|
if using_dvd
|
718
|
-
p descriptors
|
719
798
|
splits = descriptors['mplayer_dvd_splits']
|
720
799
|
if splits == nil
|
721
800
|
show_blocking_message_dialog("warning: edit 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 ).")
|
@@ -725,23 +804,18 @@ module SensibleSwing
|
|
725
804
|
else
|
726
805
|
splits = []
|
727
806
|
end
|
728
|
-
edl_contents =
|
729
|
-
begin
|
730
|
-
edl_contents = MplayerEdl.convert_to_edl descriptors, add_secs_end = MplayerEndBuffer, MplayerBeginingBuffer, splits #, 600 TODOS # add a sec to mutes to accomodate for mplayer's oddness...
|
731
|
-
rescue SyntaxError => e # overlaps et al
|
732
|
-
show_blocking_message_dialog 'fail:' + e.to_s
|
733
|
-
raise e
|
734
|
-
end
|
807
|
+
edl_contents = MplayerEdl.convert_to_edl descriptors, add_secs_end = MplayerEndBuffer, MplayerBeginingBuffer, splits, start_add_this_to_all_ts # add a sec to mutes to accomodate for mplayer's oddness..
|
735
808
|
File.write(EdlTempFile, edl_contents)
|
736
809
|
|
737
810
|
# -framedrop is for slow CPU's
|
738
811
|
# same with -autosync to try and help it stay in sync... -mc 0.03 is to A/V correct 1s audio per 2s video
|
739
812
|
# -hardframedrop might help but hurts just too much
|
740
|
-
extra_mplayer_commands << "-framedrop
|
741
|
-
# ?? extra_mplayer_commands << "
|
813
|
+
extra_mplayer_commands << "-framedrop"
|
814
|
+
# ?? extra_mplayer_commands << "-mc 0.016" ??
|
815
|
+
extra_mplayer_commands << "-autosync 15"
|
742
816
|
|
743
|
-
# prefer english, attempt to disable subtitles,
|
744
|
-
extra_mplayer_commands << "-alang en -nosub -noautosub -forcedsubsonly -sid 1000 -edl #{File.expand_path EdlTempFile}"
|
817
|
+
# prefer english, attempt to disable subtitles, pass in edl...
|
818
|
+
extra_mplayer_commands << "-alang en -nosub -noautosub -forcedsubsonly -sid 1000 -edl #{File.expand_path EdlTempFile}"
|
745
819
|
|
746
820
|
run_smplayer_non_blocking play_this, extra_mplayer_commands.join(' '), false
|
747
821
|
end
|
@@ -839,13 +913,7 @@ module SensibleSwing
|
|
839
913
|
end
|
840
914
|
|
841
915
|
def check_for_various_dependencies
|
842
|
-
if we_are_in_create_mode
|
843
|
-
ffmpeg_exe_loc = File.expand_path('vendor/cache/ffmpeg/ffmpeg.exe')
|
844
|
-
if !check_for_exe(ffmpeg_exe_loc, 'ffmpeg')
|
845
|
-
require_blocking_license_accept_dialog 'ffmpeg', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: ffmpeg."
|
846
|
-
download_zip_file_and_extract "ffmpeg (5MB)", "http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-1929807-win32-shared.7z", "ffmpeg"
|
847
|
-
end
|
848
|
-
|
916
|
+
if we_are_in_create_mode
|
849
917
|
if !check_for_exe('vendor/cache/mencoder/mencoder.exe', 'mencoder')
|
850
918
|
require_blocking_license_accept_dialog 'mplayer', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: mplayer with mencoder."
|
851
919
|
download_zip_file_and_extract "Mplayer/mencoder (6MB)", "http://downloads.sourceforge.net/project/mplayer-win32/MPlayer%20and%20MEncoder/revision%2033574/MPlayer-rtm-svn-33574.7z", "mencoder"
|
@@ -853,6 +921,11 @@ module SensibleSwing
|
|
853
921
|
end
|
854
922
|
|
855
923
|
# runtime dependencies, at least today...
|
924
|
+
ffmpeg_exe_loc = File.expand_path('vendor/cache/ffmpeg/ffmpeg.exe')
|
925
|
+
if !check_for_exe(ffmpeg_exe_loc, 'ffmpeg')
|
926
|
+
require_blocking_license_accept_dialog 'ffmpeg', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: ffmpeg."
|
927
|
+
download_zip_file_and_extract "ffmpeg (5MB)", "http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-git-1929807-win32-shared.7z", "ffmpeg"
|
928
|
+
end
|
856
929
|
if OS.mac?
|
857
930
|
check_for_exe("mplayer", "mplayer") # mencoder and mplayer are separate for mac... [this checks for mac's mplayerx, too]
|
858
931
|
else
|
@@ -886,7 +959,7 @@ module SensibleSwing
|
|
886
959
|
system_non_blocking "notepad \"#{filename}\""
|
887
960
|
end
|
888
961
|
else
|
889
|
-
system_non_blocking "
|
962
|
+
system_non_blocking "open -a TextEdit \"#{filename}\""
|
890
963
|
end
|
891
964
|
end
|
892
965
|
|
@@ -939,7 +1012,7 @@ module SensibleSwing
|
|
939
1012
|
|
940
1013
|
def get_user_input(message, default = '', cancel_ok = false)
|
941
1014
|
received = JOptionPane.showInputDialog(message, default)
|
942
|
-
raise 'user
|
1015
|
+
raise 'user cancelled' unless received unless cancel_ok
|
943
1016
|
received
|
944
1017
|
end
|
945
1018
|
|
@@ -1319,11 +1392,14 @@ end
|
|
1319
1392
|
|
1320
1393
|
if $0 == __FILE__
|
1321
1394
|
if ARGV.index('-h') || ARGV.index('--help')
|
1322
|
-
puts 'syntax: [--create-mode]'
|
1395
|
+
puts 'syntax: [ --create-mode | --upconvert-mode ]'
|
1323
1396
|
else
|
1324
1397
|
a = SensibleSwing::MainWindow.new
|
1325
1398
|
a.set_visible true
|
1326
1399
|
puts 'Please use the Sensible Cinema GUI window popup...'
|
1400
|
+
if ARGV.index('--exit-immediately')
|
1401
|
+
a.dispose
|
1402
|
+
end
|
1327
1403
|
end
|
1328
1404
|
end
|
1329
1405
|
|