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 CHANGED
@@ -1,48 +1,52 @@
1
- This is a program that allows you to "mute out" or "bleep out" arbitrary scenes during movie playback.
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
- It takes as input a list of known "skip-worthy" scenes (profanity, et al),
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
- Currently it works for hulu and VLC on windows. It also isn't hard to add new player specs (thanks Ruby!),
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
- See also http://en.wikipedia.org/wiki/Edit_decision_list
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 mute_list.yml player_description.yml
20
+ C:\> jruby -S sensible-cinema
17
21
 
18
- It then runs sensible-cinema within your console window, using screen tracking to monitor the playback position.
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
- Here's an example would be watching the "cars" DVD using VLC full-screened:
24
+ Alternatively you could specify the files on the command-line, like
22
25
 
23
- C:\> jruby -S sensible-cinema disney_cars.yml D:/installs/jruby-1.5.1/lib/ruby/gems/1.8/gems/sensible-cinema-0.6.0/zamples/players/vlc_full_screened_over_hour.yml
26
+ C:\> jruby -S sensible-cinema mute_list.yml player_description.yml
24
27
 
25
- (Run --help to see available player list)
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
- C:\> jruby -S sensible-cinema --help
31
+ == How to install ==
28
32
 
29
- You can also find a list of useful files at http://github.com/rdp/sensible-cinema/tree/master/zamples
33
+ First install jruby (in case you haven't already), from http://www.jruby.org
30
34
 
31
- == How to install ==
35
+ Next install the gem:
32
36
 
33
- $ jruby -S gem install sensible-cinema
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
- Get it first from http://jruby.org. It could theoretically be ported to MRI 1.9.x, if anybody wants to.
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 online streaming, hence the focus being on windows thus far.
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 then use as an HTPC (ex: buy a used older one), and/or request I do a linux port if you laptop doesn't come
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, et al.
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
- http://github.com/rdp/sensible-cinema
61
- http://github.com/rdp
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
- == raw backlog ... based on user request.. ==
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.6.1
1
+ 0.7.0
data/bin/sensible-cinema CHANGED
@@ -1,37 +1,68 @@
1
1
  require 'rubygems'
2
2
  require 'sane'
3
- Thread.abort_on_exception=true
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 crucial parts currently' unless ENV['OS'] == 'Windows_NT'
11
+ $stderr.puts 'warning: currently windows only for certain parts currently' unless ENV['OS'] == 'Windows_NT'
12
12
 
13
- first = ARGV[0]
13
+ if ARGV.detect{|arg| arg == '-h' || arg == '--help'}
14
14
 
15
- if ARGV.length >= 1 && (File.exist?(first) || first == 'test')
15
+ puts <<-END
16
16
 
17
- if File.exist? first
18
- overlay = OverLayer.new(first, ARGV[2])
19
- overlay.start_thread true
20
- else
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 ARGV[1] && File.exist?(ARGV[1])
58
+ if File.exist? player_description.to_s
28
59
  # this one doesn't use file updates, so pass it the string
29
- screen_tracker = ScreenTracker.new_from_yaml File.binread(ARGV[1]), overlay
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
- # only screen dump? exit early
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
- else
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
@@ -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
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 6
8
- - 1
9
- version: 0.6.1
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-05 00:00:00 -06:00
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/how_to_create_a_player_description.txt
199
- - zamples/players/hulu_full_screened_over_an_hour.yml
200
- - zamples/players/vlc_full_screened.yml
201
- - zamples/players/vlc_full_screened_over_hour.yml
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,6 +0,0 @@
1
- # name: !ruby/regexp /VLC/
2
- name: !ruby/regexp /^vlc$/
3
- x: 525
4
- y: 47
5
- width: 35
6
- height: 14
@@ -1,19 +0,0 @@
1
- name: VLC media
2
- x: -109
3
- y : -17
4
- width: 44
5
- height: 11
6
- digits:
7
- :hours:
8
- :minute_tens:
9
- - -90
10
- - 7
11
- :minute_ones:
12
- - -82
13
- - 7
14
- :second_tens:
15
- - -72
16
- - 7
17
- :second_ones:
18
- - -66
19
- - 7
@@ -1 +0,0 @@
1
- Basically just follow the example of other mute lists.