sensible-cinema 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +24 -25
- data/Rakefile +5 -10
- data/TODO +32 -29
- data/VERSION +1 -1
- data/bin/sensible-cinema +216 -102
- data/change_log_with_feature_list.txt +5 -0
- data/go.sh +1 -1
- data/how_to_get_files_from_dvd.txt +24 -0
- data/is_it_legal_to_copy_dvds.txt +12 -12
- data/lib/drive_info.rb +11 -8
- data/lib/edl_parser.rb +9 -8
- data/lib/file_chooser.rb +1 -3
- data/lib/mencoder_wrapper.rb +6 -6
- data/lib/subtitle_profanity_finder.rb +0 -4
- data/lib/swing_helpers.rb +17 -6
- data/sensible-cinema.gemspec +8 -4
- data/spec/edl_parser.spec.rb +5 -6
- data/spec/mencoder_wrapper.spec.rb +6 -5
- data/spec/notes +7 -1
- data/spec/sensible_cinema_gui.spec.rb +62 -29
- data/todo.inventionzy.txt +1 -0
- data/todo.open_edl_list_org.txt +2 -0
- data/todo.propaganda +1 -0
- data/www/index.html +2 -1
- data/zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt b/data/zamples/edit_decision_lists/dvds/cool → runnings.txt +0 -0
- data/zamples/edit_decision_lists/dvds/edl_for_unit_tests.txt +19 -0
- data/zamples/edit_decision_lists/dvds/sintel_open_source_blender.txt +3 -3
- data/zamples/edit_decision_lists/{netflix → netflix_instant}/greatest_story_ever_told_netflix.txt +0 -0
- metadata +43 -31
- data/lib/edl_converter.rb +0 -34
data/README
CHANGED
|
@@ -13,19 +13,21 @@ It will pop up some windows where you choose what to do.
|
|
|
13
13
|
Note: please install from the zip files at https://sourceforge.net/projects/sensible-cinema/files/
|
|
14
14
|
and not from github's "download" button. See the "install" section, below, for finer grained details.
|
|
15
15
|
|
|
16
|
-
Sensible cinema basically allows you to create an edited video version of the DVD, onto your hard drive,
|
|
16
|
+
Sensible cinema basically allows you to create an edited video version of the DVD, onto your hard drive,
|
|
17
|
+
and you can watch it there. It also has some realtime playback support via the use of EDL playback in some
|
|
18
|
+
popular video players.
|
|
17
19
|
|
|
18
20
|
How? Sensible cinema basically takes the original DVD, slices out the bad parts, then combines it back
|
|
19
21
|
into a new file and gives you the result.
|
|
20
|
-
It is
|
|
22
|
+
It is essentially a linear editor [1] that applies Edit Decision Lists [2] to videos. It wraps
|
|
21
23
|
a few freely available open source programs [3] to accomplish the editing for you.
|
|
22
|
-
|
|
24
|
+
Note that the process can take several hours, so budget some time for it.
|
|
25
|
+
It also has a few "realtime viewing" options available, again based on some freely available
|
|
26
|
+
open source software [3].
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
I'd suggest carefully evaluating your real values, and going with those.
|
|
28
|
-
Sensible cinema does not a clean movie make of a dirty one. Don't watch it if it's not wholesome! Be nice to yourself!
|
|
28
|
+
On a more moral note, just because an edited video lacks profanity/sex scenes...does not immediately make it an inspiring experience.
|
|
29
|
+
I'd suggest carefully evaluating your real values/motives, and going with those.
|
|
30
|
+
Sensible cinema does not a clean movie make of a dirty one. Don't watch it if it's not uplifting! Be nice to yourself!
|
|
29
31
|
|
|
30
32
|
dove.org and common sense media are good references for discovering the "uplifting" level of movies [4].
|
|
31
33
|
kids-in-mind.com is also a good reference for profanity levels, though sometimes it misses profanities,
|
|
@@ -106,12 +108,10 @@ so it doesn't work for many casual users.
|
|
|
106
108
|
Their filters sometimes don't cut out all undesired content (ex: Saints and
|
|
107
109
|
Soldiers left several profanities in...which wasn't what I had
|
|
108
110
|
expected). If your standards differ from theirs, you're out of luck.
|
|
109
|
-
|
|
110
|
-
are slightly mismatched so that it will end up muting sections just previous to profanity, while
|
|
111
|
-
not muting the profanity itself, or so I've heard. Clearplay apparently also runs a rather
|
|
111
|
+
Clearplay apparently also runs a rather
|
|
112
112
|
confusing subscription policy, or so I'm told [1], and their DVD players that
|
|
113
113
|
are a bit weak at times [2]. Their DVD players aren't quite as readily accessible (read:
|
|
114
|
-
can't buy at walmart), nor as cheap to buy as some others.
|
|
114
|
+
can't buy them at walmart), nor as cheap to buy as some others.
|
|
115
115
|
Clearplay also has little community collaboration/review (though you can email them feedback).
|
|
116
116
|
They also did't have filters for all movies that I, at times, wanted to watch edited (Condorman and Tron
|
|
117
117
|
lacking last time I checked...probably because they are too
|
|
@@ -182,7 +182,7 @@ realtime tracking, so I also included this ability.
|
|
|
182
182
|
The playlist option is disabled in later releases, as it was deemed too user-non-friendly, and because VLC timing
|
|
183
183
|
is "different" than standard DVD players, so I decided to just use standardized timing, though it worked fine
|
|
184
184
|
for VLC playbacks.
|
|
185
|
-
I replaced it with support for mplayer's EDL format
|
|
185
|
+
I replaced it with support for mplayer's EDL format, which works better, and has consistent timing, though is still a bit buggy.
|
|
186
186
|
|
|
187
187
|
You can see a full list of other features that have been published and demonstrated
|
|
188
188
|
in the accompanying file change_log_with_feature_list.txt. Each feature mentioned works
|
|
@@ -206,6 +206,7 @@ Normal DVD's versus "directors cut" versions of movies (one is at times preferab
|
|
|
206
206
|
http://en.wikipedia.org/wiki/Edit_decision_list (it's a linear editing tool, after all--so see the vast list of those)
|
|
207
207
|
Clean Flicks (used to) sell edited movies
|
|
208
208
|
http://www.videoredo.com/en/index.htm lets you "cut out" offensive content (commercials et al) and burn DVD's from mpeg's/h264 streams
|
|
209
|
+
http://www.microsoft.com/windows/windowsmedia/howto/articles/device_control.aspx Windows Media Encoder supports EDL's by timestamp
|
|
209
210
|
http://www.mplayerhq.hu/DOCS/HTML/en/edl.html
|
|
210
211
|
http://www.sharewareconnection.com/fast-compress-content-and-anti-profanity.htm replaces profanity in web pages with euphemized content.
|
|
211
212
|
http://www.oreillynet.com/sysadmin/blog/2005/06/make_your_own_phantom_edit_wit.html (mplayer has had this ability for awhile, with no complaints).
|
|
@@ -223,6 +224,7 @@ http://code.google.com/p/movie-content-editor (player written in Python, control
|
|
|
223
224
|
http://forums.gbpvr.com/showthread.php?10606-Automated-Cutting-and-Transcoding-Guide-Using-Mencoder/page45
|
|
224
225
|
http://www.imdb.com/swiki/special?ParentalGuideHelp (search for "scene description")
|
|
225
226
|
http://www.mythtv.org/wiki/Removing_Commercials
|
|
227
|
+
showanalyzer http://www.dragonglobal.biz/showanalyzer.html and comskip analyze videos to look for "segments to cut out" automatically (commercials, in this case, but the principle still applies)
|
|
226
228
|
Old-school: using the remote control with the pause, mute, stop, fast forward, and play buttons, along with previous knowledge of "questionable" scene locations
|
|
227
229
|
The scissors and old VHS tapes (Clean Flicks' origin, if I remember correctly). http://www.familysafemedia.com/home_movie_editor.html (was a helper kit for cutting VHS tape)
|
|
228
230
|
Windows Movie Maker. Allows for users to cut and copy scenes of movies. Really any editor can do this.
|
|
@@ -232,6 +234,7 @@ Microsoft's built-in magnifier basically copies DVD's screen output if mouse is
|
|
|
232
234
|
http://superuser.com/questions/85278/how-can-i-cut-scenes-out-of-a-dvd
|
|
233
235
|
http://blog.josephhall.com/2008/09/command-line-dvd-authoring-part-1.html
|
|
234
236
|
AviSynth can script dvd playback http://forum.doom9.org/archive/index.php/t-109558.html
|
|
237
|
+
ps3 media server has edl support: https://github.com/chocolateboy/PMS-EDL maybe would work with DVD's dunno
|
|
235
238
|
Anydvd HD's "magic file replacement" for DVD's/blu-ray's
|
|
236
239
|
RiffTrax allows for an audio "overlay" to a DVD playback, have their own player to coordinate the two.
|
|
237
240
|
|
|
@@ -246,23 +249,15 @@ See first also the file "is_it_legal_to_copy_dvds.txt" for more information on l
|
|
|
246
249
|
|
|
247
250
|
== Troubleshooting ==
|
|
248
251
|
|
|
249
|
-
If you run into some snag,
|
|
250
|
-
Try cleaning your DVD and starting over (delete all files, start again).
|
|
252
|
+
If you run into some snag, try cleaning your DVD and starting over (delete all files, start again).
|
|
251
253
|
Baking soda toothpaste might help with cleaning it.
|
|
252
254
|
If it still errs, report it, along with a screen snapshot and steps of
|
|
253
255
|
how to reproduce the problem, preferably. See the feedback section.
|
|
254
256
|
|
|
255
257
|
It can fail also because a deletion is past end of DVD, or
|
|
256
|
-
Also note that if your DVD has scratches that cause it to skip, the time signatures will be off after that point,
|
|
257
|
-
so clean your discs and try again!
|
|
258
|
-
"DVDNAV stream read error!"
|
|
259
|
-
this typically means a dirty or scratched DVD.
|
|
260
|
-
|
|
261
258
|
Also make sure you aren't out of disk space.
|
|
262
259
|
|
|
263
|
-
Try playback in VLC Media Player
|
|
264
|
-
|
|
265
|
-
Also you could try another computer (desktop computers' DVD drives seem to work better at times than laptops')
|
|
260
|
+
Try playback in "VLC Media Player"
|
|
266
261
|
|
|
267
262
|
You try to play back a sensible cinema-ized video file and it plays back without
|
|
268
263
|
audio or video (example: windows media player)?
|
|
@@ -271,17 +266,21 @@ You try to play back a sensible cinema-ized video file and it plays back without
|
|
|
271
266
|
to handle this type of audio. Not to fear, just download the "ffdshow tryouts" (google for it)
|
|
272
267
|
and, when it gives you the option, be sure to check "mpeg2 video" and then
|
|
273
268
|
it should "just work." You could also optionally just play the file in VLC Media Player or smplayer
|
|
274
|
-
(there's a button for that). Installing "AC3Filter" may help if you
|
|
269
|
+
(there's a button for that). Installing "AC3Filter" may help if you can hear no audio.
|
|
270
|
+
Really VLC Media Player is your best bet though.
|
|
275
271
|
|
|
276
272
|
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
|
|
277
273
|
making it better. No really, I have some ideas, but want to see if there's need first for improvement in those areas.
|
|
278
274
|
|
|
275
|
+
Finally, report back! If there are problems that arise, I want to hear about them so we can help you through it.
|
|
276
|
+
|
|
279
277
|
== Thanks ==
|
|
280
278
|
|
|
281
279
|
Thanks to Jarmo for the win32-screenshot gem, the mini_magick gem authors, jruby guys, etc.
|
|
282
280
|
The combination of these tools made programming this actually something of a pleasure,
|
|
283
281
|
and a breeze cross platform.
|
|
284
|
-
Sensible Cinema leverages code from lots of other projects (see LICENSE.TXT)--many thanks to
|
|
282
|
+
Sensible Cinema leverages code from lots of other projects (see LICENSE.TXT)--many thanks to
|
|
283
|
+
the authors and maintainers of said libraries, and anybody else I forgot to mention.
|
|
285
284
|
|
|
286
285
|
== Feedback/Development ==
|
|
287
286
|
|
data/Rakefile
CHANGED
|
@@ -9,8 +9,9 @@ Jeweler::Tasks.new do |s|
|
|
|
9
9
|
s.email = "rogerdpack@gmail.com"
|
|
10
10
|
s.homepage = "http://github.com/rdp"
|
|
11
11
|
s.authors = ["Roger Pack"]
|
|
12
|
+
s.add_dependency 'os', '>= 0.9.3'
|
|
12
13
|
s.add_dependency 'sane', '>= 0.22.0'
|
|
13
|
-
s.add_dependency 'rdp-win32screenshot', '>= 0.0.7.3'
|
|
14
|
+
s.add_dependency 'rdp-win32screenshot', '>= 0.0.7.3'
|
|
14
15
|
s.add_dependency 'mini_magick', '>= 3.1' # for ocr...
|
|
15
16
|
s.add_dependency 'whichr', '>= 0.3.6'
|
|
16
17
|
s.add_dependency 'jruby-win32ole'
|
|
@@ -124,19 +125,13 @@ end
|
|
|
124
125
|
task 'deploy' do
|
|
125
126
|
name = 'sensible-cinema-' + cur_ver + ".zip"
|
|
126
127
|
p 'copying to ilab'
|
|
127
|
-
sys
|
|
128
|
+
sys "scp #{name} rdp@ilab1.cs.byu.edu:~/incoming"
|
|
128
129
|
p 'creating sf dir'
|
|
130
|
+
sys "ssh rdp@ilab1.cs.byu.edu 'ssh -t rogerdpack,sensible-cinema@shell.sourceforge.net create'" # needed for the next command to work.
|
|
129
131
|
sys "ssh rdp@ilab1.cs.byu.edu 'ssh rogerdpack,sensible-cinema@shell.sourceforge.net \"mkdir /home/frs/project/s/se/sensible-cinema/#{cur_ver}\"'"
|
|
130
132
|
p 'copying into sf'
|
|
131
133
|
sys "ssh rdp@ilab1.cs.byu.edu 'scp ~/incoming/#{name} rogerdpack,sensible-cinema@frs.sourceforge.net:/home/frs/project/s/se/sensible-cinema/#{cur_ver}/#{name}'"
|
|
132
|
-
p '
|
|
133
|
-
# ugh ugh ughly
|
|
134
|
-
c = "ssh rdp@ilab1.cs.byu.edu \"scp ~/incoming/#{name} wilkboar@freemusicformormons.com:~/www/rogerdpackt28/sensible-cinema/releases\""
|
|
135
|
-
sys(c)
|
|
136
|
-
p 'linking rogerd...'
|
|
137
|
-
sys("ssh rdp@ilab1.cs.byu.edu 'ssh wilkboar@freemusicformormons.com \\\"rm \\\\~/www/rogerdpackt28/sensible-cinema/releases/latest-sensible-cinema.zip\\\"'")
|
|
138
|
-
sys("ssh rdp@ilab1.cs.byu.edu 'ssh wilkboar@freemusicformormons.com \\\"ln -s \\~/www/rogerdpackt28/sensible-cinema/releases/#{name} \\\\~/www/rogerdpackt28/sensible-cinema/releases/latest-sensible-cinema.zip\\\"'")
|
|
139
|
-
p 'successfully deployed! ' + cur_ver
|
|
134
|
+
p 'successfully deployed to sf only! ' + cur_ver
|
|
140
135
|
end
|
|
141
136
|
|
|
142
137
|
task 'gem_release' do
|
data/TODO
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
release: cheap inventionzy, and medium inventionzy
|
|
4
4
|
release: C EDL
|
|
5
5
|
compare netflix/blu-ray timings et al
|
|
6
|
+
|
|
6
7
|
=== loose ordering/eventually ===
|
|
7
|
-
linearize
|
|
8
|
-
|
|
9
|
-
update todo/docu
|
|
8
|
+
linearize [?] hmm...
|
|
9
|
+
re-update todo/all docu
|
|
10
10
|
create web site/api-ify
|
|
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 subtitles...
|
|
15
|
+
try out on people
|
|
15
16
|
|
|
16
17
|
== high prio like blocking bugs ==
|
|
17
18
|
|
|
@@ -30,18 +31,12 @@
|
|
|
30
31
|
just in case youtube takes over the world
|
|
31
32
|
|
|
32
33
|
== yes do ordered ==
|
|
33
|
-
EDL for that fella...
|
|
34
|
-
transfer from little stickie at....
|
|
35
34
|
try buy delete lists from all x,y,z [?] maybe ask for them for free first? ()
|
|
36
|
-
|
|
37
|
-
timing thing (notes file)
|
|
35
|
+
next timing thing (notes file)
|
|
38
36
|
|
|
39
37
|
== yes do, un-ordered currently, from the various release options ==
|
|
40
|
-
@macports: set notestxt \
|
|
41
|
-
13 "The MPlayer developers do not believe in making regular releases. \
|
|
42
|
-
14 You are likely better off using the mplayer-devel port." *before* and after (?) (double check it--would one way work ok? mplayer)
|
|
43
|
-
@macports: does mplayer-devel enable dvdnav correctly?
|
|
44
38
|
|
|
39
|
+
unit tests all
|
|
45
40
|
after remove the ability to "grab" update readme
|
|
46
41
|
check if tmdb uses the full DVDID [?]
|
|
47
42
|
just tell mac users "use tsmuxer this way" http://instantitunes.wordpress.com/2010/02/26/use-tsmuxer-on-snow-leopard
|
|
@@ -64,7 +59,7 @@
|
|
|
64
59
|
"you could edit your file "raw" file "with avidemux, except video will be slightly off, but audio will be on"
|
|
65
60
|
"VLC [or any GUI] is always slightly off."
|
|
66
61
|
can I avoid requiring use of tsmuxer first?
|
|
67
|
-
check with blu-ray...
|
|
62
|
+
check with blu-ray...do they match timing-wise? sub-title wise?
|
|
68
63
|
donate tsmuxer, makemkv, http://ffmpeg.zeranoe.com/builds, mulder [?] smplayer
|
|
69
64
|
auto tsmuxer/mediainfo [yikes]?
|
|
70
65
|
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
|
|
@@ -75,12 +70,10 @@
|
|
|
75
70
|
youtube/hulu timings
|
|
76
71
|
Watch...unedited smplayer button doesn't play from the right device if you have two :P
|
|
77
72
|
get LLC before a "real" domain name
|
|
78
|
-
add profanity filter this file button
|
|
79
|
-
remove some buttons by default ?
|
|
80
73
|
always force them to have a DVD in the drive :P
|
|
81
74
|
upconverter
|
|
82
75
|
split LLC's website+consumer
|
|
83
|
-
employ: watch @ realtime after profanity filter first pass :P
|
|
76
|
+
employ instructions: watch @ realtime after profanity filter first pass :P
|
|
84
77
|
|
|
85
78
|
clear runnings
|
|
86
79
|
have ben and chris test it out, have it work, then ask about video quality
|
|
@@ -88,7 +81,7 @@
|
|
|
88
81
|
try disney digital copy/amazon library "local download"...
|
|
89
82
|
C player:
|
|
90
83
|
use DVD navigator
|
|
91
|
-
just use mplayer EDL syntax, plus a title track :)
|
|
84
|
+
just use mplayer EDL syntax, plus a title track (or just detect track change, if long enough, assume... :P) :)
|
|
92
85
|
http://msdn.microsoft.com/en-us/library/ms787412(VS.85).aspx
|
|
93
86
|
http://msdn.microsoft.com/en-us/library/dd407175(v=VS.85).aspx can be synchronous? might be a good first pass...
|
|
94
87
|
PlayPeriodInTitleAutoStop EC_DVD_PLAYPERIOD_AUTOSTOP
|
|
@@ -101,10 +94,9 @@
|
|
|
101
94
|
can come out of full screen more easily :P
|
|
102
95
|
note pay for XP http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins search for the cheapest
|
|
103
96
|
note to them windows vista/7: use ac3filter [?]
|
|
104
|
-
if it doesn't parse something it loops *forever* "error pooping" "error pooping" [?]
|
|
105
97
|
donate menumeter $
|
|
106
|
-
tool tips for all buttons...tweak naming, too :P
|
|
107
|
-
fix/create the "play previously
|
|
98
|
+
tool tips for all buttons...tweak naming, too :P
|
|
99
|
+
fix/create the "play previously created edited file for current DVD" button
|
|
108
100
|
vendorize smplayer * 2
|
|
109
101
|
test if latest smplayer can work with edl and seek [?]
|
|
110
102
|
be able to use smplayer, never just mplayer [yikes]
|
|
@@ -113,8 +105,6 @@
|
|
|
113
105
|
ask for more beta testers for use, ask for more beta testers for creation, too
|
|
114
106
|
beta release: rinse and repeat with various ppl
|
|
115
107
|
youtube videos -> new account name
|
|
116
|
-
vendorize a copy of ffmpeg, then they don't have to install imagemagick...also then we'll have ffprobe
|
|
117
|
-
and sanity
|
|
118
108
|
note "pay us/somebody to do it for you on the google group"?
|
|
119
109
|
note "this is the full list--your help is wanted/needed"
|
|
120
110
|
create a semi-accurate phantom edit EDL
|
|
@@ -127,18 +117,18 @@
|
|
|
127
117
|
7: Windows Live Movie Maker
|
|
128
118
|
previous: Windows Movie Maker
|
|
129
119
|
re-run with several DVD's
|
|
130
|
-
port to mac OS X--try everything out (all buttons), make sure
|
|
131
|
-
appears that, for now, have to just use mplayer dvd://
|
|
132
|
-
ppc?
|
|
133
|
-
app store mplayer perhaps?
|
|
134
|
-
bundle a copy of smplayer locally?
|
|
135
|
-
delete unedited.fulli file automatically
|
|
120
|
+
port to mac OS X--try everything out (all buttons), make sure all works...
|
|
121
|
+
appears that, for now, have to just use mplayer dvd://
|
|
122
|
+
ppc dvdid?
|
|
123
|
+
app store mplayer perhaps?
|
|
124
|
+
bundle a copy of smplayer locally?
|
|
125
|
+
typically delete unedited.fulli file automatically
|
|
136
126
|
except if it's a specific scene run test...
|
|
137
|
-
investigate: can I use zoomplayer max?
|
|
138
127
|
the final "edited.avi" really "could/should" be playable in WMP...
|
|
139
|
-
"profanity" => "language"
|
|
140
128
|
it should clear old smplayer options on startup always, just in case, somehow
|
|
141
129
|
use smplayer with my mplayer always...unless I'm moving away from that...
|
|
130
|
+
@makemkv: show us the title numbers, and number them *by those*
|
|
131
|
+
generic EDL run through should be through smplayer...do I need the other way around, even?
|
|
142
132
|
|
|
143
133
|
== other lists ==
|
|
144
134
|
|
|
@@ -149,6 +139,7 @@
|
|
|
149
139
|
todo.subtitle
|
|
150
140
|
|
|
151
141
|
== DVD decide later to move up or down ==
|
|
142
|
+
canceling from the "dvd id" box exits the whole app LOL
|
|
152
143
|
|
|
153
144
|
== DVD-realtime backlog once do, now not do, unordered ==
|
|
154
145
|
can "blur out" scenes, or specific pixels on frames, like that guy bleeping out his own profanity just lips plus bleep
|
|
@@ -165,9 +156,21 @@
|
|
|
165
156
|
mplayer EDL while grabbing, from grabbed :P
|
|
166
157
|
note to them [in how_to_create]: can do the two types of preview at same time...concurrently...to save time...
|
|
167
158
|
can I make playback more smooth by upping mplayer cache? does smplayer pass it a parameter?
|
|
159
|
+
lua VLC EDL plugin? LOL yeah right.
|
|
160
|
+
investigate: can I use zoomplayer max?
|
|
168
161
|
|
|
169
162
|
== DVD/DVD-realtime backlog (totally unordered, some very low prio, basically all never do) ==
|
|
170
163
|
|
|
164
|
+
@macports: set notestxt \
|
|
165
|
+
13 "The MPlayer developers do not believe in making regular releases. \
|
|
166
|
+
14 You are likely better off using the mplayer-devel port." *before* and after (?) (double check it--would one way work ok? mplayer)
|
|
167
|
+
if it doesn't parse a file you choose it annoyingly loops *forever* "error pooping" "error pooping" [?]
|
|
168
|
+
"real" dvdid for blu-ray, can work with them (once I figure out timing info...)
|
|
169
|
+
accept the "user inputable" profanities, based on the DVD (like "thor" or what not...)
|
|
170
|
+
can I train the ps3ms to play a real DVD, with EDL ?
|
|
171
|
+
create an XBMC plugin that auto-searches for...ummm...uh...filters for you? huh? some type of plugin?
|
|
172
|
+
just create the side by side .EDL for various files for people.
|
|
173
|
+
make a mymovies plugin to auto-use EDL's somehow... ?
|
|
171
174
|
auto download subtitles from opensubtitles somehow err other...
|
|
172
175
|
an almost rifftrax that...says "here overlay x, change normal volume to 50% during that time..."
|
|
173
176
|
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?
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.23.
|
|
1
|
+
0.23.1
|
data/bin/sensible-cinema
CHANGED
|
@@ -35,6 +35,7 @@ require_relative '../lib/storage'
|
|
|
35
35
|
require_relative '../lib/edl_parser'
|
|
36
36
|
require_relative '../lib/mplayer_edl'
|
|
37
37
|
require_relative '../lib/play_audio'
|
|
38
|
+
require_relative '../lib/subtitle_profanity_finder'
|
|
38
39
|
|
|
39
40
|
require 'tmpdir'
|
|
40
41
|
require_relative '../lib/swing_helpers'
|
|
@@ -71,17 +72,23 @@ module SensibleSwing
|
|
|
71
72
|
|
|
72
73
|
class MainWindow < JFrame
|
|
73
74
|
|
|
74
|
-
def
|
|
75
|
+
def we_are_in_create_mode
|
|
76
|
+
ARGV.index("--create-mode")
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# currently advanced mode only *adds* buttons
|
|
80
|
+
def new_jbutton title, only_on_create_mode, tooltip = nil
|
|
75
81
|
button = JButton.new title
|
|
82
|
+
button.tool_tip= tooltip
|
|
76
83
|
button.set_bounds(44, @starting_button_y, @button_width, 23)
|
|
77
|
-
|
|
78
|
-
if
|
|
79
|
-
|
|
84
|
+
add = true
|
|
85
|
+
if we_are_in_create_mode
|
|
86
|
+
add = true
|
|
80
87
|
else
|
|
81
|
-
|
|
88
|
+
add = false if only_on_create_mode
|
|
82
89
|
end
|
|
83
90
|
|
|
84
|
-
if
|
|
91
|
+
if add
|
|
85
92
|
increment_button_location
|
|
86
93
|
@panel.add button
|
|
87
94
|
@buttons << button
|
|
@@ -92,17 +99,21 @@ module SensibleSwing
|
|
|
92
99
|
def increment_button_location
|
|
93
100
|
@starting_button_y += 30
|
|
94
101
|
end
|
|
95
|
-
|
|
96
|
-
Storage = Storage.new("sensible_cinema")
|
|
97
102
|
|
|
98
|
-
def
|
|
99
|
-
super "Sensible-Cinema #{VERSION} (GPL)"
|
|
100
|
-
if !(Storage['main_license_accepted'] == VERSION)
|
|
103
|
+
def force_accept_license_first
|
|
101
104
|
require_blocking_license_accept_dialog 'Sensible Cinema', 'gplv3', 'http://www.gnu.org/licenses/gpl.html', 'Sensible Cinema license agreement',
|
|
102
105
|
"Sensible Cinema is distributed under the gplv3.\nBY CLICKING \"accept\" YOU SIGNIFY THAT YOU HAVE READ, UNDERSTOOD AND AGREED TO ABIDE BY THE TERMS OF THIS AGREEMENT"
|
|
103
106
|
require_blocking_license_accept_dialog 'Sensible Cinema', 'is_it_legal_to_copy_dvds.txt file', File.expand_path(File.dirname(__FILE__) + "/../is_it_legal_to_copy_dvds.txt"),
|
|
104
107
|
'is_it_legal_to_copy_dvds.txt file', 'I acknowledge that I have read, understand, accept and agree to abide by the implications noted in the is_it_legal_to_copy_dvds.txt file'
|
|
105
108
|
Storage['main_license_accepted'] = VERSION
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
Storage = Storage.new("sensible_cinema")
|
|
112
|
+
|
|
113
|
+
def initialize
|
|
114
|
+
super "Sensible-Cinema #{VERSION} (GPL)"
|
|
115
|
+
if !(Storage['main_license_accepted'] == VERSION)
|
|
116
|
+
force_accept_license_first
|
|
106
117
|
end
|
|
107
118
|
|
|
108
119
|
setDefaultCloseOperation JFrame::EXIT_ON_CLOSE
|
|
@@ -112,22 +123,43 @@ module SensibleSwing
|
|
|
112
123
|
panel.set_layout nil
|
|
113
124
|
add panel # why can't I just slap these down?
|
|
114
125
|
|
|
115
|
-
jlabel = JLabel.new 'Welcome to Sensible Cinema!'
|
|
126
|
+
jlabel = JLabel.new 'Welcome to Sensible Cinema!' + (we_are_in_create_mode ? " Hover over buttons for descriptions." : "")
|
|
116
127
|
happy = Font.new("Tahoma", Font::PLAIN, 11)
|
|
117
128
|
jlabel.setFont(happy)
|
|
118
|
-
jlabel.set_bounds(44,44,
|
|
129
|
+
jlabel.set_bounds(44,44,360,14)
|
|
119
130
|
panel.add jlabel
|
|
120
131
|
@starting_button_y = 120
|
|
121
132
|
@button_width = 400
|
|
122
133
|
|
|
123
134
|
## BUTTONS ##
|
|
124
135
|
|
|
125
|
-
@
|
|
136
|
+
@mplayer_edl = new_jbutton( "Watch DVD edited on computer (realtime -- mplayer EDL)", false)
|
|
137
|
+
@mplayer_edl.tool_tip = "This will watch your DVD in realtime on your computer while skipping/muting the questionable scenes."
|
|
138
|
+
@mplayer_edl.on_clicked {
|
|
139
|
+
do_mplayer_edl
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@create = new_jbutton( "Create edited copy of DVD on Your Hard Drive, from a DVD", false)
|
|
143
|
+
@create.tool_tip = <<-EOL
|
|
144
|
+
This grabs from your DVD and creates a new file on your hard disk like dvd_name_edited.mpg for you to watch later.
|
|
145
|
+
The file you create will contain the whole movie edited.
|
|
146
|
+
It takes quite awhile maybe 2 hours.
|
|
147
|
+
EOL
|
|
148
|
+
@create.on_clicked {
|
|
149
|
+
do_copy_dvd_to_hard_drive false
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@create_new_edl_for_current_dvd = new_jbutton("Create new Delete List for a new DVD", true,
|
|
153
|
+
"If your DVD doesn't have an EDL created for it, this will be your first step--create a new EDL file for it.")
|
|
126
154
|
@create_new_edl_for_current_dvd.on_clicked do
|
|
127
155
|
create_brand_new_edl
|
|
128
156
|
end
|
|
129
157
|
|
|
130
|
-
@
|
|
158
|
+
@open_help_file = new_jbutton("open how_to_get_files_from_dvd.txt file", false).on_clicked do
|
|
159
|
+
open_file_to_edit_it("how_to_get_files_from_dvd.txt")
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@open_list = new_jbutton("Open/Edit a previously existing Delete List", true, "If your DVD has a previously existing EDL for it, you can open it to edit it with this button.")
|
|
131
163
|
@open_list.on_clicked {
|
|
132
164
|
dialog = FileDialog.new(self, "Pick file to edit")
|
|
133
165
|
dialog.set_directory EDL_DIR
|
|
@@ -135,22 +167,29 @@ module SensibleSwing
|
|
|
135
167
|
open_file_to_edit_it filename if filename
|
|
136
168
|
}
|
|
137
169
|
|
|
138
|
-
|
|
139
|
-
@
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
@play_smplayer = new_jbutton( "Watch DVD unedited (realtime smplayer)", true).on_clicked {
|
|
170
|
+
@play_smplayer = new_jbutton( "Watch full DVD unedited (realtime smplayer)", true)
|
|
171
|
+
@play_smplayer.tool_tip = <<-EOL
|
|
172
|
+
This will play the DVD unedited within smplayer.
|
|
173
|
+
NB it will default to title 1, so updated your EDL file that matches this DVD with the proper title if this doesn't work for you
|
|
174
|
+
i.e. if it just plays a single preview title or what not, and not the main title, you need to change this value.
|
|
175
|
+
This is useful if you want to just kind of watch the movie to enjoy it, and look for scenes to cut out.
|
|
176
|
+
You can use the built-in OSD (on-screen-display) to see what time frame the questionable scenes are at
|
|
177
|
+
(type "o" to toggle it). However, just realize that the OSD is in 30 fps, and our time stamps are all in 29.97
|
|
178
|
+
fps, so you'll need to convert it to be able to use it in a file.
|
|
179
|
+
EOL
|
|
180
|
+
@play_smplayer.on_clicked {
|
|
150
181
|
play_dvd_smplayer_unedited
|
|
151
182
|
}
|
|
152
183
|
|
|
153
|
-
@play_mplayer_raw = new_jbutton( "Watch DVD unedited (realtime mplayer
|
|
184
|
+
@play_mplayer_raw = new_jbutton( "Watch full DVD unedited (realtime mplayer)", true)
|
|
185
|
+
@play_mplayer_raw.tool_tip = <<-EOL
|
|
186
|
+
This is also useful for comparing subtitle files to see
|
|
187
|
+
if they have accurate timings.
|
|
188
|
+
If you turn on subtitles (v button), then compare your file at say, the 1 hour mark, or 2 hour mark,
|
|
189
|
+
with the subtitles that mplayer displays, it *should* match exactly with the output in the command line,
|
|
190
|
+
like "A: 3600.0" should match your subtitle line of approximately "01:00:00,000"
|
|
191
|
+
EOL
|
|
192
|
+
@play_mplayer_raw.on_clicked {
|
|
154
193
|
play_dvd_smplayer_unedited true
|
|
155
194
|
}
|
|
156
195
|
|
|
@@ -159,31 +198,40 @@ module SensibleSwing
|
|
|
159
198
|
# }
|
|
160
199
|
|
|
161
200
|
@preview_section = new_jbutton( "Preview a certain time frame from file (edited)", true )
|
|
201
|
+
@preview_section.tool_tip = <<-EOL
|
|
202
|
+
This allows you to preview an edit easily.
|
|
203
|
+
It is the equivalent of saying \"watch this file edited from exactly minute x second y to minute z second q"
|
|
204
|
+
Typically if you want to test an edit, you can start a few seconds before, and end a few seconds after it, to test it precisely.
|
|
205
|
+
EOL
|
|
162
206
|
@preview_section.on_clicked {
|
|
163
207
|
do_copy_dvd_to_hard_drive true
|
|
164
208
|
}
|
|
165
209
|
|
|
166
|
-
@preview_section_unedited = new_jbutton("Preview a certain time frame
|
|
210
|
+
@preview_section_unedited = new_jbutton("Preview a certain time frame (unedited)", true)
|
|
211
|
+
@preview_section.tool_tip = "Allows you to view a certain time frame unedited (ex: 10:00 to 10:05), so you can narrow down to pinpoint where questionable scenes are, etc. This is the only way to view a specific scene if there are not cuts within that scene yet."
|
|
167
212
|
@preview_section_unedited.on_clicked {
|
|
168
213
|
do_copy_dvd_to_hard_drive true, false, true
|
|
169
214
|
}
|
|
170
215
|
|
|
171
|
-
@rerun_preview = new_jbutton( "Re-run most recently watched
|
|
216
|
+
@rerun_preview = new_jbutton( "Re-run most recently watched preview time frame", true )
|
|
217
|
+
@rerun_preview.tool_tip = "This will re-run the preview that you most recently performed. Great for checking to see if you last edits were successful or not."
|
|
172
218
|
@rerun_preview.on_clicked {
|
|
173
219
|
repeat_last_copy_dvd_to_hard_drive
|
|
174
220
|
}
|
|
175
221
|
|
|
176
|
-
@fast_preview = new_jbutton( "fast preview all (smplayer EDL on file)", true)
|
|
222
|
+
@fast_preview = new_jbutton( "fast preview all (smplayer EDL on file)", true)
|
|
223
|
+
@fast_preview.tool_tip = "Plays smplayer with an EDL. \nThis gives you a rough estimate to see if your edits are accurate, and is really fast to seek, etc.\nThis is useful because you can't use mplayer on a DVD if it has any DVD timestamp splits in it [some DVD's are buggy]"
|
|
224
|
+
@fast_preview.on_clicked {
|
|
177
225
|
success, wrote_to_here_fulli = do_copy_dvd_to_hard_drive false, true
|
|
178
226
|
sleep 0.5 # lodo take out ???
|
|
179
227
|
background_thread.join if background_thread # let it write out the original fulli, if necessary [?]
|
|
180
228
|
nice_file = wrote_to_here_fulli #+ ".fast.mpg"
|
|
181
229
|
if false#!File.exist?(nice_file)
|
|
182
230
|
p = show_non_blocking_message_dialog("Creating quick lookup file--NB that for each changed deletion,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
231
|
+
you'll need to restart the fast preview SMplayer
|
|
232
|
+
Also note that the start and end times will be slightly off if reality [delayed]
|
|
233
|
+
Also note that while doing fast preview, it can be doing a normal preview as well
|
|
234
|
+
in the background, simultaneously.")
|
|
187
235
|
unless system_blocking("ffmpeg -i #{wrote_to_here_fulli} -target ntsc-dvd #{nice_file}")
|
|
188
236
|
File.delete nice_file
|
|
189
237
|
raise 'create '
|
|
@@ -192,15 +240,9 @@ module SensibleSwing
|
|
|
192
240
|
end
|
|
193
241
|
set_smplayer_opts "-edl #{EdlTempFile}"
|
|
194
242
|
thread = do_mplayer_edl( "smplayer_portable #{nice_file}") # note the smplayer, but it's for the fast file...
|
|
195
|
-
Thread.new { # XXX do we need this?
|
|
196
|
-
begin
|
|
197
|
-
thread.join
|
|
198
|
-
ensure
|
|
199
|
-
set_smplayer_opts ''
|
|
200
|
-
end
|
|
201
|
-
}
|
|
202
243
|
}
|
|
203
|
-
|
|
244
|
+
|
|
245
|
+
# TODO remove me...
|
|
204
246
|
@watch_unedited = new_jbutton("Watch full DVD unedited (while simultaneously grabbing file to hard drive)", true)
|
|
205
247
|
@watch_unedited.on_clicked {
|
|
206
248
|
success_no_run, wrote_to_here_fulli = do_copy_dvd_to_hard_drive false, true, true
|
|
@@ -209,20 +251,45 @@ module SensibleSwing
|
|
|
209
251
|
system_non_blocking command
|
|
210
252
|
}
|
|
211
253
|
|
|
212
|
-
|
|
213
254
|
# until I can let them know *why* they would ever need this button...
|
|
214
|
-
@display_unique = new_jbutton( "
|
|
255
|
+
@display_unique = new_jbutton( "Calculate DVD's unique ID", true )
|
|
256
|
+
@display_unique.tool_tip = "This is useful to setup a DVD's 'unique ID' within an EDL for it. If your EDL doesn't have a line like disk_unique_id => \"...\" then you will want to run this to add it in."
|
|
257
|
+
@display_unique.on_clicked {
|
|
215
258
|
drive, volume, dvd_id = choose_dvd_drive
|
|
216
259
|
# display it, allow them to copy and paste it out
|
|
217
260
|
get_user_input("#{drive} #{volume} for your copying+pasting pleasure (highlight, then ctrl+c to copy)\n
|
|
218
261
|
This is USED to identify a disk to match it to its EDL, later.", "\"disk_unique_id\" => \"#{dvd_id}\",")
|
|
219
262
|
}
|
|
220
263
|
|
|
221
|
-
@upload = new_jbutton("Upload/E-mail suggestion/Submit anything", true)
|
|
264
|
+
@upload = new_jbutton("Upload/E-mail suggestion/Submit anything", true)
|
|
265
|
+
@upload.tool_tip = "We welcome all feedback! For example if you create a new DVD EDL, please submit it back to us so that others can benefit from it!"
|
|
266
|
+
@upload.on_clicked {
|
|
222
267
|
system_non_blocking("start mailto:sensible-cinema@googlegroups.com")
|
|
223
268
|
system_non_blocking("start http://groups.google.com/group/sensible-cinema")
|
|
224
269
|
}
|
|
225
270
|
|
|
271
|
+
@parse_srt = new_jbutton("Parse a subtitle file (.srt) to detect profanities", true)
|
|
272
|
+
@parse_srt.tool_tip = <<-EOL
|
|
273
|
+
You can download a .srt file and parse it to automaticaly search for profanities.
|
|
274
|
+
Basically download it from opensubtitles.org (possibly from other places, too),
|
|
275
|
+
(enter dvd name in the search box, click a result, click one from the list with an English flag, then click 'Download(zip)')
|
|
276
|
+
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)")
|
|
277
|
+
EOL
|
|
278
|
+
@parse_srt.on_clicked {
|
|
279
|
+
fc = new_filechooser
|
|
280
|
+
fc.set_title "Pick srt file:"
|
|
281
|
+
if old_dir = Storage['old_srt_dir']
|
|
282
|
+
fc.set_current_directory JFile.new(old_dir)
|
|
283
|
+
end
|
|
284
|
+
filename = fc.go
|
|
285
|
+
Storage['old_srt_dir'] = fc.get_current_directory.to_s
|
|
286
|
+
Storage['start_time']
|
|
287
|
+
|
|
288
|
+
parsed = SubtitleProfanityFinder.edl_output [filename]
|
|
289
|
+
File.write(EdlTempFile, "# add these into your mute section if they apply\n" + parsed)
|
|
290
|
+
open_file_to_edit_it EdlTempFile
|
|
291
|
+
}
|
|
292
|
+
|
|
226
293
|
@progress_bar = JProgressBar.new(0, 100)
|
|
227
294
|
@progress_bar.set_bounds(44,@starting_button_y,@button_width,23)
|
|
228
295
|
@progress_bar.visible = false
|
|
@@ -231,9 +298,11 @@ module SensibleSwing
|
|
|
231
298
|
increment_button_location
|
|
232
299
|
increment_button_location
|
|
233
300
|
|
|
234
|
-
@exit = new_jbutton("Exit", false,
|
|
235
|
-
|
|
301
|
+
@exit = new_jbutton("Exit", false, "Exits the application and kills any background processes that are running at all--don't exit unless you are done processing all the way!")
|
|
302
|
+
@exit.on_clicked {
|
|
303
|
+
Thread.new { self.close } # don't waste the time to close it :P
|
|
236
304
|
kill_processes
|
|
305
|
+
puts 'Thank you for using Sensible Cinema.'
|
|
237
306
|
java.lang.System.exit 0
|
|
238
307
|
}
|
|
239
308
|
|
|
@@ -267,23 +336,23 @@ module SensibleSwing
|
|
|
267
336
|
"name" => "#{english_name}",
|
|
268
337
|
|
|
269
338
|
"mutes" => [
|
|
270
|
-
# example line, uncomment the leading "#" to make it active
|
|
339
|
+
# an example line, uncomment the leading "#" to make it active
|
|
271
340
|
# "0:00:01.0", "0:00:02.0", "profanity", "da..",
|
|
272
341
|
],
|
|
273
342
|
|
|
274
343
|
"blank_outs" => [
|
|
275
|
-
# example line, uncomment the leading "#" to make it active
|
|
344
|
+
# an example line, uncomment the leading "#" to make it active
|
|
276
345
|
# "00:03:00.0" , "00:04:00.0", "violence", "of some sort",
|
|
277
346
|
],
|
|
278
347
|
|
|
279
348
|
"volume_name" => "#{volume}",
|
|
280
349
|
"disk_unique_id" => "#{dvd_id}",
|
|
281
|
-
"dvd_title_track" => "1", # most DVD's use title 1. Not all do, though. If sensible-cinema plays anything except the main title (for example, a trailer), when you use it, see http://goo.gl/QHLIF to set this right.
|
|
350
|
+
"dvd_title_track" => "1", # most DVD's use title 1. Not all do, though. If sensible-cinema plays anything except the main title (for example, it plays a trailer), when you use it, see http://goo.gl/QHLIF to set this right.
|
|
282
351
|
# "not edited out stuff" => "some violence",
|
|
283
352
|
# "closing thoughts" => "still...",
|
|
284
|
-
# "mplayer_dvd_splits" => ["59:59", "1:04:59"], #
|
|
353
|
+
# "mplayer_dvd_splits" => ["59:59", "1:04:59"], # in mplayer, the DVD timestamp "resets" to zero for some reason, see http://goo.gl/yMfqX to set this value right. Note that [] is valid, if there are no resets.
|
|
285
354
|
EOL
|
|
286
|
-
# frame0 is the name of our window LOL tough to avoid that
|
|
355
|
+
# frame0 is the name of our window LOL tough to avoid that collision...hmm...
|
|
287
356
|
filename = EDL_DIR + "\\" + english_name.gsub(' ', '_') + '.txt'
|
|
288
357
|
filename.downcase!
|
|
289
358
|
File.write(filename, input) unless File.exist?(filename) # lodo let them choose name (?)
|
|
@@ -415,12 +484,12 @@ module SensibleSwing
|
|
|
415
484
|
# cancel button stays the same...
|
|
416
485
|
|
|
417
486
|
message ||= "Sensible Cinema requires a separately installed program (#{program}). You can install this program
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
487
|
+
separately, or Sensible Cinema can download it for you.
|
|
488
|
+
By clicking accept, below, you are confirming that you have read and agree to be bound by the
|
|
489
|
+
terms of its license (the #{license_name}), located at #{license_url_should_also_be_embedded_by_you_in_message}.
|
|
490
|
+
Click 'View License' to view it. If you do not agree to these terms, click 'Cancel'. You also agree that this is a
|
|
491
|
+
separate program, with its own distribution, license, ownership and copyright.
|
|
492
|
+
You agree that you are responsible for the download and use of this program, within sensible cinema or otherwise."
|
|
424
493
|
|
|
425
494
|
returned = JOptionPane.showConfirmDialog nil, message, title, JOptionPane::YES_NO_CANCEL_OPTION
|
|
426
495
|
# 1 is view button was clicked
|
|
@@ -459,15 +528,15 @@ module SensibleSwing
|
|
|
459
528
|
end
|
|
460
529
|
|
|
461
530
|
def download_zip_to english_name, url, to_this
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
531
|
+
download_7zip
|
|
532
|
+
Dir.chdir('vendor/cache') do
|
|
533
|
+
file_name = url.split('/')[-1]
|
|
534
|
+
print "downloading #{english_name} ..."
|
|
535
|
+
download(url, file_name)
|
|
536
|
+
system_blocking("7za e #{file_name} -y -o#{to_this}")
|
|
537
|
+
puts 'done ' + english_name
|
|
538
|
+
# creates vendor/cache/mencoder/mencoder.exe...
|
|
539
|
+
end
|
|
471
540
|
end
|
|
472
541
|
|
|
473
542
|
require 'lib/check_installed_mac.rb'
|
|
@@ -497,7 +566,7 @@ module SensibleSwing
|
|
|
497
566
|
download_zip_to "Mplayer/mencoder (6MB)", "http://downloads.sourceforge.net/project/mplayer-win32/MPlayer%20and%20MEncoder/revision%2033574/MPlayer-rtm-svn-33574.7z", "mencoder"
|
|
498
567
|
end
|
|
499
568
|
|
|
500
|
-
if
|
|
569
|
+
if we_are_in_create_mode
|
|
501
570
|
# they're going to want these dependencies
|
|
502
571
|
if OS.windows?
|
|
503
572
|
path = RubyWhich.new.which('smplayer_portable')
|
|
@@ -515,24 +584,28 @@ module SensibleSwing
|
|
|
515
584
|
end
|
|
516
585
|
end
|
|
517
586
|
end
|
|
518
|
-
|
|
587
|
+
|
|
519
588
|
def open_file_to_edit_it filename
|
|
520
|
-
|
|
589
|
+
if OS.windows?
|
|
590
|
+
system_non_blocking "notepad \"#{filename}\""
|
|
591
|
+
else
|
|
592
|
+
system_non_blocking "#{OS.open_file_command} \"#{filename}\""
|
|
593
|
+
end
|
|
521
594
|
end
|
|
522
595
|
|
|
523
596
|
def single_edit_list_matches_dvd dvd_id
|
|
524
597
|
matching = Dir[EDL_DIR + '/*.txt'].select{|file|
|
|
525
598
|
begin
|
|
526
599
|
parse_edl(file)["disk_unique_id"] == dvd_id
|
|
527
|
-
rescue SyntaxError
|
|
528
|
-
|
|
529
|
-
p 'warning, unable to parse:' + file
|
|
600
|
+
rescue SyntaxError => e
|
|
601
|
+
# ignore poorly formed delete lists for the auto choose phase...
|
|
602
|
+
p 'warning, unable to parse a file:' + file + " " + e.to_s
|
|
530
603
|
false
|
|
531
604
|
end
|
|
532
605
|
}
|
|
533
606
|
if matching.length == 1
|
|
534
607
|
file = matching[0]
|
|
535
|
-
p "selecting the one matching
|
|
608
|
+
p "selecting the one only matching EDL #{file} for this DVD ID: #{dvd_id}"
|
|
536
609
|
file
|
|
537
610
|
else
|
|
538
611
|
nil
|
|
@@ -545,8 +618,12 @@ module SensibleSwing
|
|
|
545
618
|
generate_and_run_bat_file *Storage['last_params']
|
|
546
619
|
end
|
|
547
620
|
|
|
548
|
-
def new_filechooser
|
|
549
|
-
JFileChooser.new
|
|
621
|
+
def new_filechooser default_dir = nil
|
|
622
|
+
out = JFileChooser.new
|
|
623
|
+
if default_dir
|
|
624
|
+
out.set_current_directory JFile.new(default_dir)
|
|
625
|
+
end
|
|
626
|
+
out
|
|
550
627
|
end
|
|
551
628
|
|
|
552
629
|
def show_blocking_message_dialog(message, title = message.split("\n")[0], style= JOptionPane::INFORMATION_MESSAGE)
|
|
@@ -611,11 +688,22 @@ module SensibleSwing
|
|
|
611
688
|
given
|
|
612
689
|
end
|
|
613
690
|
|
|
691
|
+
def get_import_from_filename dvd_title, dvd_title_track
|
|
692
|
+
@_get_import_from_filename ||=
|
|
693
|
+
begin
|
|
694
|
+
file_from_chooser = new_filechooser Storage['get_import_from_filename_dir']
|
|
695
|
+
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 how_to_use.txt)"
|
|
696
|
+
outgoing = file_from_chooser.go
|
|
697
|
+
Storage['get_import_from_filename_dir'] = File.dirname(outgoing)
|
|
698
|
+
outgoing
|
|
699
|
+
end
|
|
700
|
+
end
|
|
701
|
+
|
|
614
702
|
def get_save_to_filename dvd_title
|
|
615
703
|
@_get_save_to_filename ||=
|
|
616
704
|
begin
|
|
617
705
|
fc = new_filechooser
|
|
618
|
-
fc.set_title "Pick where to save #{dvd_title} edited
|
|
706
|
+
fc.set_title "Pick where to save #{dvd_title} edited version as"
|
|
619
707
|
save_to_file_name = dvd_title + ' edited version'
|
|
620
708
|
save_to_file_name = save_to_file_name.gsub(' ', '_').gsub( /\W/, '') # no punctuation or spaces for now...
|
|
621
709
|
fc.set_file(get_drive_with_most_space_with_slash + save_to_file_name)
|
|
@@ -644,8 +732,14 @@ module SensibleSwing
|
|
|
644
732
|
# LODO allow for spaces in the save_to filename
|
|
645
733
|
if should_prompt_for_start_and_end_times
|
|
646
734
|
# only show this message once :)
|
|
647
|
-
@show_block ||= show_blocking_message_dialog(
|
|
648
|
-
|
|
735
|
+
@show_block ||= show_blocking_message_dialog(<<-EOL, "Preview")
|
|
736
|
+
Ok, let's preview just a portion of it.
|
|
737
|
+
Note that you'll want to preview a section that wholly includes a deleted section in it.
|
|
738
|
+
For example, if it mutes from second 1 to second 10, you'll want to play from 00:00 to 00:12 or what not.
|
|
739
|
+
Also note that the first time you preview a section of a video, it will take a long time (like an hour) as it sets up the entire video for processing.
|
|
740
|
+
Subsequent previews will be faster, though, as long as you use the same filename, as it won't have to re-set it up for processing.
|
|
741
|
+
Also note that if you change your delete list, you'll need to close, and restart the video to be able to see it with your new settings.
|
|
742
|
+
EOL
|
|
649
743
|
old_start = Storage['start_time']
|
|
650
744
|
start_time = get_user_input("At what point in the video would you like to start your preview? (like 01:00 for starting at 1 minute)", Storage['start_time'])
|
|
651
745
|
default_end = Storage['end_time']
|
|
@@ -661,11 +755,15 @@ module SensibleSwing
|
|
|
661
755
|
Storage['start_time'] = start_time
|
|
662
756
|
Storage['end_time'] = end_time
|
|
663
757
|
end
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
758
|
+
dvd_friendly_name = descriptors['name']
|
|
759
|
+
raise 'no name?' unless dvd_friendly_name
|
|
760
|
+
|
|
761
|
+
dvd_title_track = get_title_track(descriptors)
|
|
762
|
+
file_from = get_import_from_filename dvd_friendly_name, dvd_title_track
|
|
763
|
+
save_to_edited = get_save_to_filename dvd_friendly_name
|
|
764
|
+
fulli = MencoderWrapper.calculate_fulli_filename save_to_edited
|
|
667
765
|
if exit_early_if_fulli_exists
|
|
668
|
-
if
|
|
766
|
+
if fulli_dot_done_file_exists
|
|
669
767
|
return [true, fulli]
|
|
670
768
|
end
|
|
671
769
|
# make it create a dummy response file for us :)
|
|
@@ -673,10 +771,9 @@ module SensibleSwing
|
|
|
673
771
|
end_time = "00:01"
|
|
674
772
|
end
|
|
675
773
|
|
|
676
|
-
dvd_title_track = get_title_track(descriptors)
|
|
677
774
|
should_run_mplayer = should_prompt_for_start_and_end_times || exit_early_if_fulli_exists
|
|
678
775
|
require_deletion_entry = true unless watch_unedited
|
|
679
|
-
generate_and_run_bat_file
|
|
776
|
+
generate_and_run_bat_file save_to_edited, edit_list_path, descriptors, file_from, dvd_friendly_name, start_time, end_time, dvd_title_track, should_run_mplayer, require_deletion_entry
|
|
680
777
|
[false, fulli] # false means it's running in a background thread :P
|
|
681
778
|
end
|
|
682
779
|
|
|
@@ -684,16 +781,21 @@ module SensibleSwing
|
|
|
684
781
|
DriveInfo.get_drive_with_most_space_with_slash
|
|
685
782
|
end
|
|
686
783
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
784
|
+
def fulli_dot_done_file_exists? save_to_edited
|
|
785
|
+
fulli = MencoderWrapper.calculate_fulli_filename save_to_edited
|
|
786
|
+
File.exist?(fulli + ".done") # stinky!
|
|
787
|
+
end
|
|
788
|
+
|
|
789
|
+
# to make it stubbable :)
|
|
790
|
+
def get_mencoder_commands descriptors, file_from, save_to, start_time, end_time, dvd_title_track, require_deletion_entry
|
|
791
|
+
delete_partials = true unless start_time # in case anybody wants to look really really close [?]
|
|
792
|
+
MencoderWrapper.get_bat_commands descriptors, file_from, save_to, start_time, end_time, dvd_title_track, delete_partials, require_deletion_entry
|
|
691
793
|
end
|
|
692
794
|
|
|
693
|
-
def generate_and_run_bat_file save_to, edit_list_path, descriptors,
|
|
694
|
-
Storage['last_params'] = [save_to, edit_list_path, descriptors,
|
|
795
|
+
def generate_and_run_bat_file save_to, edit_list_path, descriptors, file_from, dvd_title, start_time, end_time, dvd_title_track, run_mplayer, require_deletion_entry
|
|
796
|
+
Storage['last_params'] = [save_to, edit_list_path, descriptors, file_from, dvd_title, start_time, end_time, dvd_title_track, run_mplayer, require_deletion_entry]
|
|
695
797
|
begin
|
|
696
|
-
commands = get_mencoder_commands descriptors,
|
|
798
|
+
commands = get_mencoder_commands descriptors, file_from, save_to, start_time, end_time, dvd_title_track, require_deletion_entry
|
|
697
799
|
rescue MencoderWrapper::TimingError => e
|
|
698
800
|
show_blocking_message_dialog("Appears you chose a time frame with no deletion segment in it--please try again:" + e)
|
|
699
801
|
return
|
|
@@ -704,14 +806,23 @@ module SensibleSwing
|
|
|
704
806
|
temp_dir = Dir.tmpdir
|
|
705
807
|
temp_file = temp_dir + '/vlc.temp.bat'
|
|
706
808
|
File.write(temp_file, commands)
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
809
|
+
popup_message = <<-EOL
|
|
810
|
+
Applying #{File.basename edit_list_path}
|
|
811
|
+
to #{file_from} (#{dvd_title}).
|
|
812
|
+
Copying to #{save_to}.
|
|
813
|
+
EOL
|
|
814
|
+
if !fulli_dot_done_file_exists save_to
|
|
815
|
+
popup_message += "This could take quite awhile (several hours), and will prompt you with a chime noise when it is done.\n
|
|
816
|
+
You can close this window and minimize sensible cinema and continue using your computer while it runs in the background."
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
if !start_time
|
|
820
|
+
# assume a full run..
|
|
821
|
+
popup_message += "\nNB that the created file will be playable only with VLC (possibly also with smplayer), but probably not with windows media player."
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
popup = show_non_blocking_message_dialog(popup_message, "OK")
|
|
715
826
|
|
|
716
827
|
# allow our popups to still be serviced while it is running
|
|
717
828
|
@background_thread = Thread.new {
|
|
@@ -749,7 +860,10 @@ module SensibleSwing
|
|
|
749
860
|
system_non_blocking "smplayer_portable #{saved_to}"
|
|
750
861
|
else
|
|
751
862
|
show_file = "explorer /e,/select,\"#{File.expand_path(saved_to).to_filename}\""
|
|
752
|
-
|
|
863
|
+
begin
|
|
864
|
+
system_blocking show_file # returns immediately tho...
|
|
865
|
+
rescue => why_does_this_happen_ignore_this_exception_it_actually_succeeded
|
|
866
|
+
end
|
|
753
867
|
PlayAudio.play(File.expand_path(File.dirname(__FILE__)) + "/../vendor/music.wav")
|
|
754
868
|
show_blocking_message_dialog "Done--you may now watch file\n #{saved_to}\n in VLC player (or possibly smplayer)"
|
|
755
869
|
end
|