sensible-cinema 0.16.7 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/LICENSE +4 -3
- data/README +49 -30
- data/RUN SENSIBLE CINEMA CLICK HERE.bat +1 -1
- data/TODO +55 -39
- data/VERSION +1 -1
- data/bin/sensible-cinema +48 -27
- data/edit sensible cinema decision list files.bat +1 -1
- data/lib/mencoder_wrapper.rb +17 -9
- data/lib/swing_helpers.rb +1 -1
- data/sensible-cinema.gemspec +2 -2
- data/spec/mencoder_wrapper.spec.rb +19 -7
- data/spec/sensible_cinema_gui.spec.rb +7 -2
- data/spec/swing_helpers.spec.rb +5 -5
- data/zamples/edit_decision_lists/dvds/COOL_RUNNINGS.txt +20 -4
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 0.17.0 ==
|
2
|
+
|
3
|
+
Grab using a different codec (wish I could grab to the *same* codec)
|
4
|
+
Also note that, though Sensible Cinema doesn't do this yet (ping me if you want it),
|
5
|
+
RiffTrax provides players, capability, and files to be able to "overlay" a video
|
6
|
+
with another person's voice/audio.
|
7
|
+
|
1
8
|
== 0.16.7 ==
|
2
9
|
|
3
10
|
Accomodate for disks that have scratches in them better.
|
data/LICENSE
CHANGED
@@ -15,14 +15,15 @@ that program, either.
|
|
15
15
|
You can ask the authors of that program if it is legal. Apparently
|
16
16
|
libdvdcss that it uses has never been challenged in court, and uses a slightly different algorithm
|
17
17
|
than those that have.
|
18
|
-
Note also that fair use does allow one to "record" things
|
19
|
-
for personal use/backup.
|
18
|
+
Note also that fair use at times does allow one to "record" things for personal use/backup.
|
20
19
|
Using sensible-cinema is probably not any more unethical than ripping your DVD collection to your hard
|
21
20
|
drive so you can keep your DVD's all in one place. It's about the same as ripping a DVD, editing
|
22
|
-
it in Windows Movie Maker to take out the bad scenes, then watching
|
21
|
+
it in Windows Movie Maker to take out the bad scenes, then watching it.
|
22
|
+
It's about the same as using VLC Media Player to view a DVD, which also uses libdvdcss.
|
23
23
|
Also note that if you watch an edited DVD, your are using a DVD player that conforms
|
24
24
|
with DMCA specifications, so that might have some influence.
|
25
25
|
|
26
|
+
|
26
27
|
In general, you are responsible for your actions and use of this program.
|
27
28
|
It is possible that the authors of sensible-cinema are not cupable of anything
|
28
29
|
regarding its use themselves, since they re-distribute no edited media,
|
data/README
CHANGED
@@ -1,19 +1,31 @@
|
|
1
|
-
Sensible-cinema is a program that allows you to
|
2
|
-
or "bleep out" scene lists) for DVD's.
|
3
|
-
An experimental player also works on arbitrary media players like netflix online, vlc, hulu, etc.
|
1
|
+
Sensible-cinema is a program that allows you to apply pre-programmed edit decision lists (i.e. "mute out"
|
2
|
+
or "bleep out" scene lists or skip scenes) for DVD's.
|
4
3
|
|
5
|
-
|
4
|
+
An experimental player also works on arbitrary media players like netflix online, vlc, hulu, etc, but is currently disabled.
|
5
|
+
|
6
|
+
It is basically a linear editor [1] that applies Edit Decision Lists [2] to videos, by wrapping
|
7
|
+
a few freely available open source (GPL) programs [2].
|
8
|
+
|
9
|
+
[1] http://en.wikipedia.org/wiki/Linear_video_editing
|
10
|
+
[2] http://en.wikipedia.org/wiki/Edit_decision_list
|
11
|
+
[3] http://www.gnu.org/licenses/
|
12
|
+
|
13
|
+
To use it, basically install it, then run it. It will come up with some windows where you choose what to do
|
14
|
+
(edit a list, apply a list to a DVD, etc.)
|
15
|
+
|
16
|
+
== Installation ==
|
6
17
|
|
7
18
|
download the latest .zip version file from: http://rogerdpack.t28.net/sensible-cinema/
|
8
|
-
unzip it
|
9
|
-
|
10
|
-
Note that you'll need java installed for it to work, but chances are you already have it.
|
19
|
+
unzip it (right click -> Extract all)
|
20
|
+
"click into it" and search for and start the file "run sensible cinema.bat"
|
11
21
|
|
12
|
-
|
22
|
+
Note that you'll need java previously installed for it to work, but chances are you already have it.
|
13
23
|
|
14
|
-
|
24
|
+
== Creating Your Own List ==
|
15
25
|
|
16
|
-
|
26
|
+
You create an edit decision list for sensible cinema to use against whatever you want.
|
27
|
+
|
28
|
+
An Edit Decision List looks something like this example:
|
17
29
|
|
18
30
|
Here's one with more detail
|
19
31
|
|
@@ -32,52 +44,59 @@ Q. How do I watch these on my TV?
|
|
32
44
|
A. You can burn a DVD with it. First create it on your hard drive. Then use
|
33
45
|
Dvd Flick ()a good one for windows) (here's a screencast of using it within http://rogerdpack.t28.net/sensible-cinema)
|
34
46
|
For OS X : iDVD might work well.
|
35
|
-
You could also drag your laptop over to your TV and hook it in that way.
|
36
|
-
If you're interested in being able to "beam" it from your computer to your game console (ex: PS3) ping me--I might have
|
47
|
+
You could also drag your laptop over to your TV and hook it in that way. Or buy a very long cord and plug it in as an extra monitor.
|
48
|
+
If you're interested in also being able to "beam" it from your computer to your game console (ex: PS3) ping me--I might have
|
49
|
+
something in mind that could eventually help.
|
37
50
|
|
38
51
|
== Caveats ==
|
39
52
|
|
40
|
-
NB that "someone"
|
41
|
-
|
42
|
-
|
43
|
-
|
53
|
+
NB that "someone" has to create a edit decision lists, per DVD.
|
54
|
+
If one doesn't yet exist for the DVD you want edited,
|
55
|
+
you could employ somebody to create it, or create it yourself. Make sure to submit it
|
56
|
+
back to us when you're done, so that everyone can benefit from it.
|
57
|
+
Fortunately only one person has to do it, once, for everybody to benefit, and the editing process is fairly easy.
|
44
58
|
|
45
59
|
== License ==
|
46
60
|
|
47
|
-
See the LICENSE file for licensing, usage terms (basically gplv3 for all the source).
|
48
|
-
(
|
61
|
+
See the included LICENSE file for licensing, usage terms (basically gplv3 for all the source).
|
62
|
+
Some other programs are (distributed separately and) called by this one, typically under the gplv2.
|
63
|
+
|
64
|
+
All files (c) 2010 Roger Pack
|
49
65
|
|
50
66
|
== Related ==
|
51
67
|
|
52
|
-
The concept isn't too novel. Some examples:
|
68
|
+
The concept isn't too novel. Some earlier examples:
|
53
69
|
|
54
70
|
Edited "airplane edit" style movies.
|
55
|
-
Commercial TV (ABC, NBC) show their own (edited) movies
|
56
|
-
Clean Flicks (used to) sell edited movies
|
71
|
+
Commercial TV (ABC, NBC) show their own (edited) movies.
|
57
72
|
http://en.wikipedia.org/wiki/Linear_video_editing
|
58
73
|
http://imdb.com tends to have reasonably good lists of what occurs in movies (find a movie, click on "parent's guide" on the left). Sometimes it even lists the time signatures for events (ex: "Labyrinth" http://www.imdb.com/title/tt0091369/parentalguide) which you could use to translate into a sensible-cinema compatible list.
|
59
|
-
Normal movies versus "directors cut
|
74
|
+
Normal movies versus "directors cut" versions of movies (one is at times preferable)
|
60
75
|
http://en.wikipedia.org/wiki/Edit_decision_list (it's a linear editing tool, after all--so see the vast list of those)
|
61
|
-
|
62
|
-
http://
|
76
|
+
Clean Flicks (used to) sell edited movies
|
77
|
+
http://www.mplayerhq.hu/DOCS/HTML/en/edl.html
|
78
|
+
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).
|
79
|
+
http://clearplay.com a commercial editing player (tracks DVD's while they play--closed source, costs money, no user contribution possible), and only for DVD's.
|
80
|
+
http://en.wikipedia.org/wiki/RiffTrax has an interesting idea of "overlaying" audio over the original video, and synchronizing between the two (their re-player does, anyway).
|
63
81
|
http://forum.bsplayer.com/feature-requests-feedback-suggestions/7157-chapter-playlist-scene-cut-3.html
|
64
82
|
http://www.inmatrix.com "scene cut editor" of the zoom player
|
65
83
|
http://wiki.xbmc.org/?title=EDL_(commercial_skipping)_and_SceneMarker_support (XBMC's scene cut support--also contains links to some other editors)
|
66
|
-
|
67
|
-
The VCR
|
68
|
-
http://code.google.com/p/movie-content-editor (written in Python, controls VLC based on captions and
|
84
|
+
http://dvdshrink.info "Re-author" mode: to make "movie-only" backups, compilations, combine "flippers",.... DvdShrink has the ability to "crop or cut parts of a title" etc.
|
85
|
+
The VCR with its record button, coupled with the stop+rewind button.
|
86
|
+
http://code.google.com/p/movie-content-editor (written in Python, controls VLC based on captions and edit decision lists, in realtime)
|
69
87
|
http://www.imdb.com/swiki/special?ParentalGuideHelp (search for "scene description")
|
70
88
|
http://www.mythtv.org/wiki/Removing_Commercials
|
71
89
|
Using the remote control with the pause, mute, stop, fast forward, and play buttons, along with previous knowledge of scene locations
|
72
90
|
The scissors and old VHS tapes (Clean Flicks' origin, BTW).
|
73
91
|
Windows Movie Maker. Allows for users to cut and copy scenes of movies to their heart's content.
|
74
|
-
http://forum.videolan.org/viewtopic.php?f=7&t=56998 VLC Media Player
|
92
|
+
http://forum.videolan.org/viewtopic.php?f=7&t=56998 VLC Media Player using EDL's via playlists
|
75
93
|
Corel WinDVD has "Quick Clip" settings for capturing on DVD.
|
76
94
|
http://superuser.com/questions/85278/how-can-i-cut-scenes-out-of-a-dvd
|
95
|
+
http://blog.josephhall.com/2008/09/command-line-dvd-authoring-part-1.html
|
77
96
|
|
78
97
|
== Feedback ==
|
79
98
|
|
80
|
-
Feedback, including feature requests, comments, welcome.
|
99
|
+
Feedback, including feature requests, comments, etc. welcome.
|
81
100
|
|
82
101
|
http://github.com/rdp/sensible-cinema (message me or create an issue for feedback/any requests/bugs)
|
83
|
-
rogerdpack@gmail.com
|
102
|
+
or rogerdpack@gmail.com
|
@@ -2,4 +2,4 @@
|
|
2
2
|
@rem disable any local rubyopt settings...
|
3
3
|
@set RUBYOPT=
|
4
4
|
@echo This window will display lots of debug message output!
|
5
|
-
@cd sensible-cinema && java -cp "./vendor/cache/jruby-complete-1.5.5.jar" org.jruby.Main bin\sensible-cinema || echo you need to install java first!
|
5
|
+
@cd sensible-cinema && java -cp "./vendor/cache/jruby-complete-1.5.5.jar" org.jruby.Main bin\sensible-cinema || echo you need to install java first! Please report back the error you see! && pause
|
data/TODO
CHANGED
@@ -2,71 +2,84 @@
|
|
2
2
|
|
3
3
|
== probably next up+low prio ==
|
4
4
|
|
5
|
-
"non realtime, non edity good" release (family only)
|
6
|
-
add some "||'s" to bat files...
|
7
|
-
popup "you may now watch": bring it to the front...
|
8
|
-
|
9
5
|
== slightly lower than that ==
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
license
|
14
|
-
only pick that filename once per session...
|
15
|
-
note "just a linear editor"
|
16
|
-
note "just a wrapper"
|
7
|
+
Harry Potter audio!
|
8
|
+
re-run latest preview -> play in smplayer
|
9
|
+
license required first time they run it (gplv3)
|
17
10
|
partner for filters (Jon, Karlie if interested...give beta)
|
18
11
|
lotsa filters somehow
|
19
|
-
my dvd's
|
20
|
-
friend's dvd's
|
12
|
+
my dvd's (loose timestamps...)
|
21
13
|
partners'...
|
22
14
|
beta release/rinse and repeat with various ppl (once it's releasable...)
|
23
|
-
a real'ish website
|
24
|
-
checkbox for other
|
15
|
+
a real'ish-er website
|
16
|
+
checkbox for all other licenses or something?
|
25
17
|
compare computer DVD playback with physical player...
|
26
|
-
|
18
|
+
program the temple thing with it
|
19
|
+
note such "I first use this to edit my temple movie"
|
20
|
+
Andrew's e-mail
|
27
21
|
|
28
22
|
== DVD backlog (unordered, some very low prio) ==
|
29
23
|
|
24
|
+
60 fps?
|
25
|
+
ask if you can somehow more grab to the *same* codec (ffmpeg, mencoder mailing lists)
|
26
|
+
allowing for torn discs:
|
27
|
+
does VLC as a ripper even make sense in these cases? (as "just a ripper")?
|
28
|
+
try baking sode tooth paste...
|
29
|
+
split EDL's somehow into their own project/LLC...
|
30
|
+
add md5 "warning" when a disc fails doesn't match because of read failure...
|
31
|
+
not loop on preview view (smplayer)
|
32
|
+
note SSD or perhaps tons of RAM help with speed :)
|
33
|
+
only pick that filename once per session...
|
34
|
+
overlay audio
|
30
35
|
assert that at least one drive has a DVD in it...maybe loop refuse with message until this?
|
31
36
|
cool runnings:
|
32
37
|
make a copy me--do they now match?
|
33
38
|
get a working copy--do they match?
|
34
|
-
md5sum the full rip files...
|
39
|
+
md5sum the full rip files...
|
35
40
|
is it necessary?
|
36
|
-
|
41
|
+
yes? add button for md5sum
|
37
42
|
propaganda-ize
|
38
43
|
alternative.to
|
39
|
-
blogs that have ever mentioned clearplay
|
44
|
+
blogs that have ever mentioned clearplay :P
|
40
45
|
play a bigger noise when totally done...(dvd flick has one...)
|
41
46
|
vnc has a good looking license :)
|
42
47
|
unzip instructions?
|
43
48
|
prompt for name, auto populate with volume name
|
44
|
-
LLC before ever pay anyone
|
45
|
-
redo the
|
49
|
+
LLC before ever pay anyone, if I ever do
|
50
|
+
redo the creation mode buttons into an ordering of sorts...
|
46
51
|
note that this can corrupt your soul!
|
47
|
-
|
52
|
+
don't watch it if it's dark! come on!
|
53
|
+
figure out if mplayer/smplayer as a player has a fast forward feature...
|
48
54
|
several "play now" options...without a navigator of course :)
|
49
|
-
|
50
|
-
|
51
|
-
|
55
|
+
visualbasic-like playlist
|
56
|
+
one line at a time :P
|
57
|
+
provide link for cheap DVD decoder :)
|
58
|
+
"round conservatively, write no file" playback
|
52
59
|
mplayer batch (playlist?)
|
53
|
-
"round conservatively, yes write file" (+1 you track it)
|
54
60
|
can generate mplayer EDL's and play them...hmm...smplayer them?
|
55
61
|
update license too...
|
56
|
-
|
57
|
-
|
62
|
+
"round conservatively, yes write file"
|
63
|
+
then I guess they could play it back?
|
64
|
+
get half-way through (rip, start writing edited copy), then start playing back as writing edited full copy
|
65
|
+
one that's "play DVD to x, now play it muted, now play it to y" (playlist? batch?)
|
66
|
+
one for watch unedited "as grabbing" (in create mode)
|
67
|
+
can I do this super accurately anyway, more easily?
|
68
|
+
one that's "rip and save first 20 minutes, start me on that, do the whole thing..."
|
69
|
+
finalize my google doc on rippers et al.
|
58
70
|
non parallelize
|
59
71
|
can have different volume settings
|
60
|
-
can insert other
|
72
|
+
can insert other sections (same disk) mid-stream :P
|
61
73
|
these last two have gotta be lower prio than the rest...
|
62
74
|
whichr: return nil
|
63
75
|
install smplayer before mencoder [?]
|
64
76
|
smaller .zip
|
65
77
|
bundle 7z [?]
|
66
78
|
remove note about it
|
67
|
-
|
79
|
+
using, burning, creating "howto's"
|
68
80
|
better
|
69
81
|
usability test them?
|
82
|
+
umm...shouldn't using be pretty straight forward tho?
|
70
83
|
|
71
84
|
using+burning screencast
|
72
85
|
editing screencast
|
@@ -76,18 +89,18 @@
|
|
76
89
|
add an option "just save full disk (unedited) to hard drive..."
|
77
90
|
note to people: can edit those to your liking
|
78
91
|
|
79
|
-
|
80
|
-
|
81
|
-
install
|
82
|
-
|
83
|
-
|
84
|
-
|
92
|
+
imagemagick (ffmpeg) easier install...
|
93
|
+
DRY up dependency installation code
|
94
|
+
install dep's to cache2 or something...so I can cleanup the deploy code...
|
95
|
+
advertise urug, ruby flow :)
|
96
|
+
"Re-run most recent" disabled when there isn't one [?]
|
97
|
+
re-do DVD EDL's that need it :P
|
85
98
|
all dogs go to heaven...finish EDL
|
86
|
-
|
87
|
-
|
99
|
+
warn when labels exist and don't match...
|
100
|
+
kill old mencoder instances more often...
|
88
101
|
auto-download imagemagick, too
|
89
102
|
check all the many options to see if there's a "cross platform way to split files accurately" besides my hacky kludge.
|
90
|
-
can rip from a DVD-like folder (?)
|
103
|
+
can rip from a DVD-like local folder (would anybody ever need this?)
|
91
104
|
ripping "redoes" a large last section, for combining. Can I avoid this?
|
92
105
|
plus I do some copy, some ac3?
|
93
106
|
@dvd flick do you need that frequent of i-frames?
|
@@ -324,4 +337,7 @@ create a "book edit list" (word x is at position y...)
|
|
324
337
|
|
325
338
|
@smplayer: your CD config is awful.
|
326
339
|
@mencoder: can't split
|
327
|
-
something like you watch it *with* you friends and can all chat together...hmm...
|
340
|
+
something like you watch it *with* you friends and can all chat together...hmm...
|
341
|
+
donate money to several projects I like :)
|
342
|
+
|
343
|
+
@mencoder: ripping like this results in an (avidemux, VLC) fourcc of 'ugh': mencoder2 dvdnav://1 -oac copy -ovc copy -o D:\raw_rip_mpeg_example.avi -endpos 20 -dvd-device E:\
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.17.0
|
data/bin/sensible-cinema
CHANGED
@@ -23,18 +23,25 @@ module SensibleSwing
|
|
23
23
|
def new_jbutton title, only_on_create_mode
|
24
24
|
button = JButton.new title
|
25
25
|
button.set_bounds(44, @starting_button_y, @button_width, 23)
|
26
|
-
|
26
|
+
|
27
27
|
if only_on_create_mode
|
28
|
-
if ARGV.index("--create-mode")
|
28
|
+
if ARGV.index("--create-mode") || ARGV.index("-c")
|
29
|
+
increment_button_location
|
29
30
|
@panel.add button
|
30
31
|
@buttons << button
|
31
32
|
end
|
32
33
|
else
|
34
|
+
increment_button_location
|
33
35
|
@panel.add button
|
34
36
|
@buttons << button
|
35
37
|
end
|
36
38
|
button
|
37
39
|
end
|
40
|
+
|
41
|
+
def increment_button_location
|
42
|
+
@starting_button_y += 30
|
43
|
+
end
|
44
|
+
|
38
45
|
|
39
46
|
Storage = Storage.new("sc")
|
40
47
|
|
@@ -62,19 +69,14 @@ module SensibleSwing
|
|
62
69
|
jlabel.set_bounds(44,44,160,14)
|
63
70
|
panel.add jlabel
|
64
71
|
@starting_button_y = 120
|
65
|
-
@button_width =
|
66
|
-
|
67
|
-
@progress_bar = JProgressBar.new(0, 100)
|
68
|
-
@progress_bar.set_bounds(44,80,@button_width,23)
|
69
|
-
@progress_bar.visible = false
|
70
|
-
panel.add @progress_bar
|
72
|
+
@button_width = 330
|
71
73
|
|
72
|
-
@create = new_jbutton( "Create edited copy of DVD on Your Hard Drive", false )
|
74
|
+
@create = new_jbutton( "Create edited copy of DVD on Your Hard Drive, from the DVD", false )
|
73
75
|
@create.on_clicked {
|
74
76
|
do_copy_dvd_to_hard_drive false
|
75
77
|
}
|
76
78
|
|
77
|
-
@watch_unedited = new_jbutton("Watch DVD from hard drive
|
79
|
+
@watch_unedited = new_jbutton("Watch the current DVD unedited (from hard drive)", true) # LODO watch in realtime option--then rippers and watchers can combine
|
78
80
|
@watch_unedited.on_clicked {
|
79
81
|
path = RubyWhich.new.which('smplayer')
|
80
82
|
if(path.length == 0)
|
@@ -96,7 +98,7 @@ module SensibleSwing
|
|
96
98
|
end
|
97
99
|
}
|
98
100
|
|
99
|
-
@open_list = new_jbutton("Open/Edit a pre-existing Edit Decision List", false)
|
101
|
+
@open_list = new_jbutton("Open/Edit a pre-existing DVD Edit Decision List", false)
|
100
102
|
@open_list.on_clicked {
|
101
103
|
dialog = FileDialog.new(self, "Pick file to edit")
|
102
104
|
dialog.set_directory EDL_DIR
|
@@ -117,7 +119,7 @@ module SensibleSwing
|
|
117
119
|
end
|
118
120
|
}
|
119
121
|
|
120
|
-
@rerun_preview = new_jbutton( "Re-run most recently
|
122
|
+
@rerun_preview = new_jbutton( "Re-run most recently watched preview time", true )
|
121
123
|
@rerun_preview.on_clicked {
|
122
124
|
repeat_last_copy_dvd_to_hard_drive
|
123
125
|
}
|
@@ -127,35 +129,50 @@ module SensibleSwing
|
|
127
129
|
drive, volume, md5 = choose_dvd_drive
|
128
130
|
input = <<-EOL
|
129
131
|
# comments can go after a # on any line, for example this one.
|
132
|
+
|
130
133
|
"mutes" => [
|
131
134
|
"0:00:01.0", "0:00:02.0", "da..",
|
132
135
|
],
|
133
136
|
|
134
137
|
"blank_outs" => [
|
135
|
-
"1:01:00.0" , "1:02:00.0", "violent scene of some sort"
|
138
|
+
"1:01:00.0" , "1:02:00.0", "violent scene of some sort",
|
136
139
|
],
|
140
|
+
|
137
141
|
"disk_unique_id" => "#{md5}",
|
138
|
-
"title" => "#{volume}",
|
139
142
|
"dvd_title_track" => "1" # most DVD's use title 1 for the main film. Some don't though. The correct number is discoverable by opening the film in VLC and choosing "playback -> title" while watching the main feature. If its not 1, then change this here. And delete this overly verbose comment either way :)
|
140
|
-
|
143
|
+
#"not edited out stuff" => "fighting (punching) in a bar at 1:00:30 'ish could use some editing love"
|
144
|
+
#"title" => ""
|
145
|
+
EOL
|
141
146
|
filename = EDL_DIR + "\\" + volume.gsub(' ', '_') + '.txt'
|
147
|
+
filename.downcase!
|
142
148
|
File.write(filename, input) unless File.exist?(filename) # lodo let them choose name (?)
|
143
149
|
open_file_to_edit_it filename
|
144
150
|
|
145
151
|
end
|
146
152
|
|
147
|
-
@display_unique = new_jbutton( "Calculate DVD's unique ID", true ).on_clicked {
|
153
|
+
@display_unique = new_jbutton( "Calculate current DVD's unique ID", true ).on_clicked {
|
148
154
|
drive, volume, md5 = choose_dvd_drive
|
149
155
|
# display it, allow them to copy and paste it out
|
150
156
|
get_user_input("#{drive} #{volume} for your copying+pasting pleasure (highlight, then ctrl+c to copy) \n
|
151
157
|
This is used to identify a disk to match it to its EDL, later.", "\"disk_unique_id\" => \"#{md5}\",")
|
152
158
|
}
|
159
|
+
|
160
|
+
@progress_bar = JProgressBar.new(0, 100)
|
161
|
+
@progress_bar.set_bounds(44,@starting_button_y,@button_width,23)
|
162
|
+
@progress_bar.visible = false
|
163
|
+
panel.add @progress_bar
|
164
|
+
|
165
|
+
increment_button_location
|
166
|
+
increment_button_location
|
153
167
|
|
154
168
|
@exit = new_jbutton("Exit", false).on_clicked {
|
155
169
|
self.close
|
156
170
|
}
|
157
171
|
|
158
|
-
|
172
|
+
increment_button_location
|
173
|
+
increment_button_location
|
174
|
+
|
175
|
+
setSize 410, @starting_button_y
|
159
176
|
|
160
177
|
check_for_dependencies
|
161
178
|
end
|
@@ -260,9 +277,9 @@ module SensibleSwing
|
|
260
277
|
if should_prompt_for_start_and_end_times
|
261
278
|
show_blocking_message_dialog("Ok, let's preview just a portion of it. \nNote that you'll want to preview a section that wholly includes an edit decision in it\n For example, if it mutes from second 1 to second 10, you'll want to play from 00:00 to 00:12 or what not.\nAlso note that the first time you preview a section of a video, it will take like 20 minutes as it sets up the video for previewing.\nSubsequent previews will be faster, though, as long as you use the same filename.", "Preview")
|
262
279
|
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'])
|
263
|
-
Storage['start_time'] = start_time
|
280
|
+
Storage['start_time'] = start_time if start_time
|
264
281
|
end_time = get_user_input("At what point in the video would you like to finish your preview? (like 02:00 for ending at the 2 minute mark)", Storage['end_time'])
|
265
|
-
Storage['end_time'] = end_time
|
282
|
+
Storage['end_time'] = end_time if end_time
|
266
283
|
unless start_time and end_time
|
267
284
|
JOptionPane.showMessageDialog(nil, " Please choose start and end", "Failed", JOptionPane::ERROR_MESSAGE)
|
268
285
|
return
|
@@ -276,6 +293,7 @@ module SensibleSwing
|
|
276
293
|
save_to_file_name = save_to_file_name.gsub(' ', '_').gsub( /\W/, '') # no punctuation for now...
|
277
294
|
fc.set_file(get_drive_with_most_space_with_slash + save_to_file_name)
|
278
295
|
save_to = fc.go
|
296
|
+
File.open(File.dirname(save_to) + "/test_file_to_see_if_we_have_permission_to_write_to_this_folder", "w").close
|
279
297
|
dvd_title_track = descriptors["dvd_title_track"]
|
280
298
|
# how does save_to map to fulli?
|
281
299
|
fulli = save_to + ".fulli.tmp.avi"
|
@@ -306,8 +324,8 @@ module SensibleSwing
|
|
306
324
|
temp_dir = Dir.tmpdir
|
307
325
|
temp_file = temp_dir + '/vlc.temp.bat'
|
308
326
|
File.write(temp_file, commands)
|
309
|
-
popup =
|
310
|
-
"
|
327
|
+
popup = NonBlockingDialog.new("Copying to #{save_to}.\n" +
|
328
|
+
"Applying EDL #{File.basename edit_list_path} against #{drive} (#{dvd_title}).\n" +
|
311
329
|
"This could take quite awhile, and will prompt you when it is done.\n" +
|
312
330
|
"You can close this window and continue working while it runs.\n" +
|
313
331
|
"NB that the created file will be playable only with smplayer or VLC player.",
|
@@ -330,13 +348,14 @@ module SensibleSwing
|
|
330
348
|
total_size = lines.length.to_f
|
331
349
|
@progress_bar.visible=true
|
332
350
|
@progress_bar.set_value(10) # start at 10% always, so they can see something.
|
333
|
-
lines.each_with_index{|
|
351
|
+
lines.each_with_index{|line, idx|
|
334
352
|
if success
|
335
|
-
|
336
|
-
|
353
|
+
puts "running #{line}"
|
354
|
+
success = system_blocking(line) unless ARGV.find{|a| a == '--test'} # this might not actually cancel out early for some reason...
|
355
|
+
if line =~ /@rem /
|
337
356
|
success = true # these fail fof some reason?
|
338
357
|
else
|
339
|
-
p 'line failed ' +
|
358
|
+
p 'line failed: ' + line unless success
|
340
359
|
end
|
341
360
|
end
|
342
361
|
@progress_bar.set_value(10 + idx/total_size*90)
|
@@ -348,7 +367,7 @@ module SensibleSwing
|
|
348
367
|
if @after_success_once
|
349
368
|
@after_success_once.call saved_to
|
350
369
|
else
|
351
|
-
|
370
|
+
NonBlockingDialog.new(" Done--you may now watch file #{saved_to} in SMPlayer or VLC player")
|
352
371
|
show_file = "explorer /e,/select,\"#{File.expand_path(saved_to).to_filename}\""
|
353
372
|
system_non_blocking show_file
|
354
373
|
#self.close # ?
|
@@ -377,7 +396,9 @@ module SensibleSwing
|
|
377
396
|
if selected_idx
|
378
397
|
disk = opticals[selected_idx]
|
379
398
|
prefix = names[selected_idx][0..2]
|
380
|
-
|
399
|
+
puts "calculating disk's unique id..."
|
400
|
+
md5sum = DriveInfo.md5sum_disk(prefix)
|
401
|
+
return prefix, opticals[selected_idx].VolumeName, md5sum
|
381
402
|
else
|
382
403
|
puts 'did not select a drive...exiting'
|
383
404
|
java.lang.System.exit 1
|
@@ -2,4 +2,4 @@
|
|
2
2
|
@rem disable any local rubyopt settings...
|
3
3
|
@set RUBYOPT=
|
4
4
|
@echo This window will display lots of debug message output!
|
5
|
-
@cd sensible-cinema && java -cp "./vendor/cache/jruby-complete-1.5.5.jar" org.jruby.Main bin\sensible-cinema --create-mode || echo you need to install java first!
|
5
|
+
@cd sensible-cinema && java -cp "./vendor/cache/jruby-complete-1.5.5.jar" org.jruby.Main bin\sensible-cinema --create-mode || echo you need to install java first! please report back the error you see! && pause
|
data/lib/mencoder_wrapper.rb
CHANGED
@@ -10,11 +10,14 @@ class MencoderWrapper
|
|
10
10
|
class << self
|
11
11
|
|
12
12
|
def get_header this_drive
|
13
|
+
out = ''
|
13
14
|
if File.exist?(@big_temp) && File.exist?(@big_temp + '.done')
|
14
|
-
''
|
15
|
-
else
|
16
|
-
"call mencoder dvd://#{@dvd_title_track} -sid 1000 -oac copy -lavcopts keyint=1 -ovc lavc -o #{@big_temp} -dvd-device #{this_drive} && echo got_file > #{@big_temp}.done\n"
|
15
|
+
out = '@rem '
|
17
16
|
end
|
17
|
+
# equivalent of ffmpeg's -target ntsc-dvd...I think...except that aspect thing terrifies me...
|
18
|
+
lavcopts = "vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=1:vstrict=0:acodec=ac3:abitrate=192:aspect=4/3"
|
19
|
+
#lavcopts = "keyint=1"
|
20
|
+
out + "call mencoder dvdnav://#{@dvd_title_track} -sid 1000 -oac copy -lavcopts #{lavcopts} -ofps 30000/1001 -ovc lavc -o #{@big_temp} -dvd-device #{this_drive} && echo got_file > #{@big_temp}.done\n"
|
18
21
|
end
|
19
22
|
|
20
23
|
def get_bat_commands these_mutes, this_drive, to_here_final_file, start_here = nil, end_here = nil, dvd_title_track = "1"
|
@@ -47,17 +50,19 @@ class MencoderWrapper
|
|
47
50
|
}
|
48
51
|
out += get_section previous_end, end_here || 1_000_000, false, to_here_final_file
|
49
52
|
partials = (1..@idx).map{|n| "#{to_here_final_file}.#{n}.avi"}
|
50
|
-
|
51
|
-
|
53
|
+
to_here_final_file = to_here_final_file + ".avi"
|
54
|
+
if File.exist? to_here_final_file
|
55
|
+
FileUtils.rm to_here_final_file # raises on failure...which is what we want I think
|
56
|
+
end
|
52
57
|
# ridiculous
|
53
|
-
out += "call mencoder #{partials.join(' ')} -o #{to_here_final_file}
|
58
|
+
out += "call mencoder #{partials.join(' ')} -o #{to_here_final_file} -ovc copy -oac copy\n"
|
54
59
|
# LODO only do this if they want to watch it on their computer, with something other than smplayer, or want to make it smaller, as it takes *forever* longer
|
55
60
|
# LODO the "insta play" mode, or the "faster rip" mode (related...)
|
56
61
|
out += "@rem call mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 30000/1001 #{partials.join(' ')} -o #{to_here_final_file}\n"
|
57
62
|
|
58
|
-
out += "@rem del #{@big_temp}\n" # LODO
|
59
|
-
out += "del " + partials.join(' ') + "\n"# LODO
|
60
|
-
out += "echo wrote to #{to_here_final_file}
|
63
|
+
out += "@rem del #{@big_temp}\n" # LODO no @rem
|
64
|
+
out += "@rem del " + partials.join(' ') + "\n"# LODO no @rem
|
65
|
+
out += "echo wrote to #{to_here_final_file}"
|
61
66
|
out
|
62
67
|
end
|
63
68
|
|
@@ -70,6 +75,9 @@ class MencoderWrapper
|
|
70
75
|
codecs = should_mute ? "-vcodec copy -acodec ac3 -vol 0 " : "-vcodec copy -acodec copy " # LODO the ac3 must match the copy...hmm...
|
71
76
|
# ffmpeg -i from_here.avi -vcodec copy -acodec copy -ss 1:00 -t 1:00 out.avi
|
72
77
|
partial_filename = to_here_final_file + '.' + (@idx += 1).to_s + '.avi'
|
78
|
+
if File.exist? partial_filename
|
79
|
+
FileUtils.rm partial_filename
|
80
|
+
end
|
73
81
|
"del #{partial_filename}\ncall ffmpeg -i #{@big_temp} #{codecs} -ss #{start} -t #{endy} #{partial_filename}\n"
|
74
82
|
end
|
75
83
|
|
data/lib/swing_helpers.rb
CHANGED
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.
|
8
|
+
s.version = "0.17.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roger Pack"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-08}
|
13
13
|
s.email = %q{rogerdpack@gmail.com}
|
14
14
|
s.executables = ["sensible-cinema", "sensible-cinema-cli"]
|
15
15
|
s.extensions = ["ext/mkrf_conf.rb"]
|
@@ -16,8 +16,13 @@ describe MencoderWrapper do
|
|
16
16
|
@out.should include("e:\\")
|
17
17
|
end
|
18
18
|
|
19
|
-
it "should have what looks like a working mencoder
|
20
|
-
@out.should match(/mencoder
|
19
|
+
it "should have what looks like a working mencoder grab command" do
|
20
|
+
@out.should match(/mencoder dvdnav:/)
|
21
|
+
@out.should match(/dvdnav.*lavcopt.*keyint=1/)
|
22
|
+
@out.should match(/dvdnav.*lavcopt.*mpeg2video/)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should avoid subtitles" do
|
21
26
|
@out.should match(/-sid 1000/)
|
22
27
|
end
|
23
28
|
|
@@ -38,7 +43,18 @@ describe MencoderWrapper do
|
|
38
43
|
@out.should include(" -o to_here.fulli.tmp.avi")
|
39
44
|
FileUtils.touch 'to_here.fulli.tmp.avi'
|
40
45
|
go
|
41
|
-
@out.
|
46
|
+
@out.should match(/@rem.*-o to_here.fulli.tmp.avi/)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should raise if the output file is held by some other process" do
|
50
|
+
for file in ['to_here.avi', 'to_here.1.avi']
|
51
|
+
open_handle = File.open(file, 'w')
|
52
|
+
begin
|
53
|
+
proc { go }.should raise_error(/Permission denied/)
|
54
|
+
ensure
|
55
|
+
open_handle.close
|
56
|
+
end
|
57
|
+
end
|
42
58
|
end
|
43
59
|
|
44
60
|
it "should use newline every line" do
|
@@ -69,10 +85,6 @@ describe MencoderWrapper do
|
|
69
85
|
@out.should_not include(".avi.1 ")
|
70
86
|
end
|
71
87
|
|
72
|
-
it "should not overuse the avi extension" do
|
73
|
-
@out.should_not include("avi.1.avi")
|
74
|
-
end
|
75
|
-
|
76
88
|
it "should concatenate (merge) them all together" do
|
77
89
|
@out.should match(/mencoder.* -ovc copy -oac copy/)
|
78
90
|
@out.should match(/mencoder to_here.1.avi/)
|
@@ -37,7 +37,7 @@ module SensibleSwing
|
|
37
37
|
before do
|
38
38
|
@subject = MainWindow.new
|
39
39
|
@subject.stub!(:choose_dvd_drive) {
|
40
|
-
["drive", "
|
40
|
+
["drive", "Volume", "19d121ae8dc40cdd70b57ab7e8c74f76"] # happiest baby on the block
|
41
41
|
}
|
42
42
|
@subject.stub!(:get_mencoder_commands) { |*args|
|
43
43
|
args[-4].should match(/abc/)
|
@@ -140,6 +140,11 @@ module SensibleSwing
|
|
140
140
|
@subject.instance_variable_get(:@create_new_edl_for_current_dvd).simulate_click
|
141
141
|
begin
|
142
142
|
File.exist?( out ).should be_true
|
143
|
+
content = File.read(out)
|
144
|
+
p content
|
145
|
+
content.should_not include("\"title\"")
|
146
|
+
content.should include("disk_unique_id")
|
147
|
+
content.should include("dvd_title_track")
|
143
148
|
ensure
|
144
149
|
FileUtils.rm_rf out
|
145
150
|
end
|
@@ -148,6 +153,6 @@ module SensibleSwing
|
|
148
153
|
it "should display unique" do
|
149
154
|
@subject.instance_variable_get(:@display_unique).simulate_click.should == "01:00"
|
150
155
|
end
|
151
|
-
|
156
|
+
|
152
157
|
end
|
153
158
|
end
|
data/spec/swing_helpers.spec.rb
CHANGED
@@ -6,12 +6,12 @@ describe SensibleSwing do
|
|
6
6
|
|
7
7
|
it "should close its modeless dialog" do
|
8
8
|
|
9
|
-
dialog =
|
10
|
-
dialog =
|
11
|
-
dialog =
|
12
|
-
dialog =
|
9
|
+
dialog = NonBlockingDialog.new("Is this modeless?")
|
10
|
+
dialog = NonBlockingDialog.new("Is this modeless?\nSecond lineLL")
|
11
|
+
dialog = NonBlockingDialog.new("Is this modeless?\nSecond lineLL\nThird line too!")
|
12
|
+
dialog = NonBlockingDialog.new("Can this take very long lines of input, like super long?")
|
13
13
|
#dialog.dispose # should get here :P
|
14
|
-
# let
|
14
|
+
# let user close it :P
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should be able to convert filenames well" do
|
@@ -1,11 +1,27 @@
|
|
1
1
|
# comments can go after a # on any line.
|
2
2
|
"mutes" => [
|
3
|
-
|
3
|
+
"14:53.7", "14:55", "greetings sled g..",
|
4
|
+
#59:16
|
5
|
+
#59:22
|
6
|
+
#59:52 dang good apology
|
7
|
+
#1:02:08 "butt whipped"
|
8
|
+
#1:02:27 "butt whipping"
|
9
|
+
#1:01:40 "sled g... does it again"
|
4
10
|
],
|
5
11
|
|
12
|
+
# 57:20 'ish something father?
|
13
|
+
|
6
14
|
"blank_outs" => [
|
7
|
-
"
|
15
|
+
"58:40", "58:41", # bad arsenic, but I dislike lip reading.
|
16
|
+
"59:08", "59:09", # "
|
17
|
+
"1:16:57.0" , "1:16:57.5", "bad a..", # verified
|
18
|
+
# 15:22 irv beats his radio with pool cue should go...
|
19
|
+
"15:20", "15:30",
|
20
|
+
"59:15", "59:59",
|
21
|
+
"1:01:35", "1:01:45"
|
8
22
|
],
|
23
|
+
|
9
24
|
"disk_unique_id" => "5a0a43f52e5d5e705fdfaa831b38409b",
|
10
|
-
"
|
11
|
-
"
|
25
|
+
"dvd_title_track" => "1",
|
26
|
+
"other stuff" => "fighting (punching) in a bar 1:00:30 'ish could use some editing"
|
27
|
+
# 1:01:42 "shutup snaka"
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 17
|
8
|
+
- 0
|
9
|
+
version: 0.17.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Roger Pack
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-08 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|