sensible-cinema 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +30 -24
- data/TODO +11 -12
- data/VERSION +1 -1
- data/bin/sensible-cinema +46 -30
- data/lib/file_chooser.rb +24 -0
- data/zamples/players/{how_to_create_a_player_description.txt → how_to_create_a_new_player_description.txt} +0 -0
- data/zamples/players/{hulu_full_screened_over_an_hour.yml → hulu_full_screen_total_length_over_an_hour.yml} +0 -0
- data/zamples/players/{vlc_full_screened_over_hour.yml → vlc_full_screened_total_length_over_an_hour.yml} +0 -0
- data/zamples/players/{vlc_non_full_screened_under_an_hour.yml → vlc_non_full_screened_and_total_length_under_an_hour.yml} +0 -0
- data/zamples/scene_lists/{mute_list.yml → example_scene_list.yml} +0 -0
- metadata +10 -12
- data/zamples/players/vlc_full_screened.yml +0 -6
- data/zamples/players/vlc_non_full_screened.yml +0 -19
- data/zamples/scene_lists/how_to_create_scene_lists.txt +0 -1
data/README
CHANGED
@@ -1,48 +1,52 @@
|
|
1
|
-
|
2
|
-
It aims to allow this on any arbitrary player, including online movie players.
|
1
|
+
It's a little rough UI-wise as yet, but here's the first release, in case anybody out there is interested and wants to help out.
|
3
2
|
|
4
|
-
|
5
|
-
tracks the player as it is playing, then mutes or blanks out the system screen appropriately, during those scenes.
|
3
|
+
Linux...
|
6
4
|
|
7
|
-
|
5
|
+
This is a program that aims to allow you to do arbitrary scene selection (i.e. "mute out" or "bleep out" arbitrary scenes) during movie playback.
|
6
|
+
It does this by leveraging existing players and controlling the system-wide volume, etc.
|
7
|
+
|
8
|
+
Currently it takes as input a list of known "skip-worthy" scenes (profanity, violence, whatever),
|
9
|
+
and tracks the player as it is playing, then mutes or blanks out the system screen appropriately, during those scenes.
|
10
|
+
|
11
|
+
Currently it works for hulu and VLC on windows. It also isn't hard to add new players (thanks Ruby and yaml!),
|
8
12
|
and probably wouldn't be super hard to add more operating systems.
|
9
13
|
|
10
|
-
|
14
|
+
Related: http://en.wikipedia.org/wiki/Edit_decision_list
|
11
15
|
|
12
16
|
== How to use ==
|
13
17
|
|
14
18
|
Start playing your movie in its player, then startup sensible-cinema thus:
|
15
19
|
|
16
|
-
C:\> jruby -S sensible-cinema
|
20
|
+
C:\> jruby -S sensible-cinema
|
17
21
|
|
18
|
-
It then
|
19
|
-
It is presumed that you'll minimize the console window and enjoy the movie.
|
22
|
+
It then prompts you for a scene list, then for a player description.
|
20
23
|
|
21
|
-
|
24
|
+
Alternatively you could specify the files on the command-line, like
|
22
25
|
|
23
|
-
C:\> jruby -S sensible-cinema
|
26
|
+
C:\> jruby -S sensible-cinema mute_list.yml player_description.yml
|
24
27
|
|
25
|
-
|
28
|
+
Sensible-cinema's tracker will now run within your console window, using screen tracking of the player to monitor the playback position.
|
29
|
+
It is presumed that you'll minimize the console window and proceed to enjoy the movie. :)
|
26
30
|
|
27
|
-
|
31
|
+
== How to install ==
|
28
32
|
|
29
|
-
|
33
|
+
First install jruby (in case you haven't already), from http://www.jruby.org
|
30
34
|
|
31
|
-
|
35
|
+
Next install the gem:
|
32
36
|
|
33
|
-
|
37
|
+
C:\> jruby -S gem install sensible-cinema
|
34
38
|
|
35
|
-
it's jruby only currently (since jruby allows for proper thread concurrency, and feels like the only sane ruby for windows).
|
36
|
-
|
37
|
-
It's also currently windows only, though it shouldn't be too much work to support other OS's, and I'd be happy to if interest
|
38
|
-
developed. I'm somewhat targeting Netflix
|
39
|
+
it's jruby only currently (since jruby allows for proper thread concurrency, has easy GUI, and feels like the only sane ruby for windows).
|
40
|
+
It could theoretically be ported to MRI 1.9.x, if anybody else wanted to.
|
41
|
+
It's also currently windows only, though it shouldn't be too much work to support other OS's, and I'd be happy to do it myself if interest
|
42
|
+
developed. I'm somewhat targeting Netflix' "play now", hence focusing thus far on windows.
|
39
43
|
|
40
44
|
== FAQ ==
|
41
45
|
|
42
46
|
Q. Can I watch these movies on my TV, not on my computer?
|
43
47
|
|
44
48
|
A. Not yet. Currently you'll either need to attach your computer to your TV (buy some long cables, or a new graphics card, etc.)
|
45
|
-
or get a laptop you can
|
49
|
+
or get a laptop that you can use as a dedicated HTPC (ex: buy a used older one), and/or request I do a linux port if you laptop doesn't come
|
46
50
|
with windows pre-installed.
|
47
51
|
|
48
52
|
There is also some work developing toward getting the stuff to stream live to your wii/ps3/xbox from windows.
|
@@ -50,12 +54,14 @@ A. Not yet. Currently you'll either need to attach your computer to your TV (buy
|
|
50
54
|
|
51
55
|
== Thanks ==
|
52
56
|
|
53
|
-
Thanks to Jarmo for the win32-screenshot gem, and mini_magick gem authors,
|
57
|
+
Thanks to Jarmo for the win32-screenshot gem, and mini_magick gem authors, jruby guys, etc. Made programming this actually somewhat easy.
|
54
58
|
|
55
59
|
== License ==
|
56
60
|
|
57
61
|
See the LICENSE for licensing, usage terms (gplv3).
|
58
62
|
|
59
63
|
== Feedback ==
|
60
|
-
|
61
|
-
|
64
|
+
|
65
|
+
Feedback welcome.
|
66
|
+
http://github.com/rdp/sensible-cinema
|
67
|
+
http://github.com/rdp to message me
|
data/TODO
CHANGED
@@ -4,10 +4,17 @@
|
|
4
4
|
|
5
5
|
release ruby-y-y why not, it's interesting
|
6
6
|
"Linux compat anyone?"
|
7
|
+
|
8
|
+
== raw backlog ... based on user request.. ==
|
7
9
|
|
8
|
-
just local files for my own needs...
|
10
|
+
remember: just local files for my own needs...
|
9
11
|
|
10
|
-
|
12
|
+
bundle fewer imagemagick binaries
|
13
|
+
|
14
|
+
"do" star trek generations hulu scene list
|
15
|
+
"**g" (Hulu near beginning)
|
16
|
+
"may g** have mercy on your soul"
|
17
|
+
Data when they crash into the earth
|
11
18
|
|
12
19
|
finish happy feet scene list
|
13
20
|
|
@@ -21,27 +28,19 @@ imdb parser
|
|
21
28
|
|
22
29
|
make it into a real live full functional app...like fully fully functional and good (for use, not editing), mostly with the drop down lists uh guess.
|
23
30
|
|
24
|
-
GUI: paste edit list, choose player
|
25
|
-
|
26
31
|
PISH
|
27
32
|
|
28
33
|
can overlay with a "fuzzer-outer" for specific coordinates somehow or other...
|
29
34
|
|
30
35
|
advertise like to lay men
|
31
36
|
|
32
|
-
with VLC non full screen, it does the annoying mouse thing needlessly
|
33
|
-
|
34
|
-
hire out scene lists
|
37
|
+
with VLC non full screen, it does the annoying mouse thing needlessly (which doesn't bug as much these days...)
|
35
38
|
|
36
39
|
youtube non full screened...hmmm
|
37
40
|
|
38
|
-
bleeper name
|
39
|
-
|
40
|
-
yank old gem versions (?) :)
|
41
|
-
|
42
41
|
overlay with wav file (would work for VLC, could also "click to mute" for the others...)
|
43
42
|
|
44
|
-
fix pending tests...
|
43
|
+
fix any pending tests...
|
45
44
|
|
46
45
|
can black out certain coords to keep things pretty...
|
47
46
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0
|
data/bin/sensible-cinema
CHANGED
@@ -1,37 +1,68 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'sane'
|
3
|
-
|
4
|
-
for file in ['overlayer', 'keyboard_input', 'screen_tracker', 'mouse']
|
3
|
+
|
4
|
+
for file in ['overlayer', 'keyboard_input', 'screen_tracker', 'mouse', 'file_chooser']
|
5
5
|
require_relative '../lib/' + file
|
6
6
|
end
|
7
7
|
|
8
8
|
$VERBOSE = 1 if ARGV.delete('-v')
|
9
9
|
$TEST = 1 if ARGV.delete('-t')
|
10
10
|
|
11
|
-
$stderr.puts 'warning: windows only for
|
11
|
+
$stderr.puts 'warning: currently windows only for certain parts currently' unless ENV['OS'] == 'Windows_NT'
|
12
12
|
|
13
|
-
|
13
|
+
if ARGV.detect{|arg| arg == '-h' || arg == '--help'}
|
14
14
|
|
15
|
-
|
15
|
+
puts <<-END
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
syntax: mute_lists.yml [player_description.yml] (or enter nothing to be prompted for files)
|
18
|
+
END
|
19
|
+
|
20
|
+
for file in Dir[__dir__ + '../zamples/mute*/*']
|
21
|
+
puts "\n", "Example file:", file + "\n\n", File.read(file)
|
22
|
+
end
|
23
|
+
|
24
|
+
puts '', 'Available files:'
|
25
|
+
for file in Dir[__dir__ + '../zamples/*/*']
|
26
|
+
puts File.expand_path(file) unless File.directory?(file)
|
27
|
+
end
|
28
|
+
exit 1
|
29
|
+
|
30
|
+
else
|
31
|
+
|
32
|
+
# allow for command line filenames
|
33
|
+
|
34
|
+
scene_list = ARGV.shift
|
35
|
+
|
36
|
+
if scene_list == 'test'
|
21
37
|
puts 'warning--only doing screen dump in 4s...'
|
22
38
|
overlay = nil
|
23
39
|
$VERBOSE = 1 # that's what they wanted...
|
24
40
|
sleep 4
|
41
|
+
else
|
42
|
+
if !File.exist? scene_list.to_s
|
43
|
+
scene_list = FileChooser.choose_file("Please select your scene list", __dir__ + "/../zamples/scene_lists")
|
44
|
+
end
|
45
|
+
unless scene_list
|
46
|
+
puts 'error: have to specify scene list, or specify "test" on the command line if you just want to snapshot your player'
|
47
|
+
exit 1
|
48
|
+
end
|
49
|
+
overlay = OverLayer.new(scene_list)
|
50
|
+
overlay.start_thread true
|
51
|
+
end
|
52
|
+
|
53
|
+
player_description = ARGV.shift
|
54
|
+
if !File.exist?(player_description.to_s)
|
55
|
+
player_description = FileChooser.choose_file("Please select your Player description (optional)", __dir__ + "/../zamples/players")
|
25
56
|
end
|
26
57
|
|
27
|
-
if
|
58
|
+
if File.exist? player_description.to_s
|
28
59
|
# this one doesn't use file updates, so pass it the string
|
29
|
-
|
30
|
-
|
60
|
+
Mouse.jitter_forever_in_own_thread
|
61
|
+
puts 'Selected player ' + player_description, ''
|
62
|
+
screen_tracker = ScreenTracker.new_from_yaml File.binread(player_description), overlay
|
31
63
|
screen_tracker.dump_bmp if $VERBOSE
|
32
|
-
#
|
64
|
+
# exit early if we just wanted a screen dump...a little kludgey...
|
33
65
|
exit 1 unless overlay
|
34
|
-
Mouse.jitter_forever_in_own_thread
|
35
66
|
screen_tracker.process_forever_in_thread
|
36
67
|
else
|
37
68
|
puts 'warning--not using any screen tracking...'
|
@@ -41,19 +72,4 @@ if ARGV.length >= 1 && (File.exist?(first) || first == 'test')
|
|
41
72
|
key_input.start_thread # status thread
|
42
73
|
key_input.handle_keystrokes_forever # when this method exits, we want to exit fully...
|
43
74
|
|
44
|
-
|
45
|
-
puts <<-END
|
46
|
-
|
47
|
-
syntax: mute_lists.yml [player_description.yml]
|
48
|
-
END
|
49
|
-
|
50
|
-
for file in Dir[__dir__ + '../zamples/mute*/*']
|
51
|
-
puts "\n", "Example file:", file + "\n\n", File.read(file)
|
52
|
-
end
|
53
|
-
|
54
|
-
puts '', 'Available files:'
|
55
|
-
for file in Dir[__dir__ + '../zamples/*/*']
|
56
|
-
puts File.expand_path(file) unless File.directory?(file)
|
57
|
-
end
|
58
|
-
exit 1
|
59
|
-
end
|
75
|
+
end
|
data/lib/file_chooser.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module FileChooser
|
2
|
+
|
3
|
+
# show a popup dialog prompting for them to select a file
|
4
|
+
# pretty ugly
|
5
|
+
def choose_file(title, use_this_dir = nil)
|
6
|
+
fc = Java::javax::swing::JFileChooser.new("JRuby panel")
|
7
|
+
fc.set_dialog_title(title)
|
8
|
+
fc.setCurrentDirectory(java.io.File.new(use_this_dir)) if use_this_dir
|
9
|
+
# lodo allow for a FileFilter, too...
|
10
|
+
success = fc.show_open_dialog(nil)
|
11
|
+
if success == Java::javax::swing::JFileChooser::APPROVE_OPTION
|
12
|
+
fc.get_selected_file.get_absolute_path
|
13
|
+
else
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
extend self
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
if __FILE__ == $0
|
23
|
+
p FileChooser.choose_file("test1", '..')
|
24
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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
|
+
- 7
|
8
|
+
- 0
|
9
|
+
version: 0.7.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-08-
|
17
|
+
date: 2010-08-06 00:00:00 -06:00
|
18
18
|
default_executable: sensible-cinema
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- ext/mkrf_conf.rb
|
127
127
|
- gplv3.txt
|
128
128
|
- lib/blanker.rb
|
129
|
+
- lib/file_chooser.rb
|
129
130
|
- lib/keyboard_input.rb
|
130
131
|
- lib/mouse.rb
|
131
132
|
- lib/muter.rb
|
@@ -195,16 +196,13 @@ files:
|
|
195
196
|
- zamples/players/captures/vlc2.bmp
|
196
197
|
- zamples/players/captures/vlc_full_screen_slider under one hour.bmp
|
197
198
|
- zamples/players/captures/youtube full screen big screen.jpg
|
198
|
-
- zamples/players/
|
199
|
-
- zamples/players/
|
200
|
-
- zamples/players/
|
201
|
-
- zamples/players/
|
202
|
-
- zamples/players/vlc_non_full_screened.yml
|
203
|
-
- zamples/players/vlc_non_full_screened_under_an_hour.yml
|
199
|
+
- zamples/players/how_to_create_a_new_player_description.txt
|
200
|
+
- zamples/players/hulu_full_screen_total_length_over_an_hour.yml
|
201
|
+
- zamples/players/vlc_full_screened_total_length_over_an_hour.yml
|
202
|
+
- zamples/players/vlc_non_full_screened_and_total_length_under_an_hour.yml
|
204
203
|
- zamples/scene_lists/disney_cars.yml
|
204
|
+
- zamples/scene_lists/example_scene_list.yml
|
205
205
|
- zamples/scene_lists/happy_feet.yml
|
206
|
-
- zamples/scene_lists/how_to_create_scene_lists.txt
|
207
|
-
- zamples/scene_lists/mute_list.yml
|
208
206
|
has_rdoc: true
|
209
207
|
homepage: http://github.com/rdp
|
210
208
|
licenses: []
|
@@ -1 +0,0 @@
|
|
1
|
-
Basically just follow the example of other mute lists.
|