content-editing-movie-player 0.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (273) hide show
  1. data/.gitmodules +3 -0
  2. data/.rvmrc +1 -0
  3. data/LICENSE.TXT +20 -0
  4. data/README.TXT +225 -0
  5. data/Rakefile +206 -0
  6. data/TODO +740 -0
  7. data/VERSION +1 -0
  8. data/_DO_NOT_RUN_IT_FROM_HERE_DOWNLOAD_THE_RELEASE_ZIP_FROM_SOURCEFORGE_INSTEAD +0 -0
  9. data/bin/sensible-cinema +60 -0
  10. data/bin/sensible-cinema-cli +161 -0
  11. data/business_ideas.txt +21 -0
  12. data/change_log_with_feature_list.txt +952 -0
  13. data/documentation/DOCUMENTATION_README.TXT +44 -0
  14. data/documentation/how_to_get_files_from_dvd.txt +30 -0
  15. data/documentation/is_it_legal_to_copy_dvds.txt +97 -0
  16. data/documentation/troubleshooting.txt +30 -0
  17. data/documentation/upconversion.txt +4 -0
  18. data/experimental_online_player_ocr_readme.txt +45 -0
  19. data/go +1 -0
  20. data/go.bat +2 -0
  21. data/go.sh +1 -0
  22. data/go_ocr_tracker.bat +1 -0
  23. data/goc +1 -0
  24. data/goc.bat +1 -0
  25. data/goc.sh +1 -0
  26. data/gpl-2.0.txt +339 -0
  27. data/gplv3.txt +219 -0
  28. data/history_and_related_works_list.txt +108 -0
  29. data/inventionzy_files/cone.png +0 -0
  30. data/inventionzy_files/md5s.txt +53 -0
  31. data/inventionzy_files/play_with_inserted_scene.bat +8 -0
  32. data/inventionzy_files/play_with_overlay.bat +24 -0
  33. data/inventionzy_files/transcript_mute_vlc.txt +117 -0
  34. data/legal_draft +23 -0
  35. data/lib/add_any_bundled_gems_to_load_path.rb +32 -0
  36. data/lib/auto_window_finder.rb +41 -0
  37. data/lib/blanker.rb +104 -0
  38. data/lib/check_installed_mac.rb +34 -0
  39. data/lib/convert_thirty_fps.rb +20 -0
  40. data/lib/edl_parser.rb +387 -0
  41. data/lib/eight_three.rb +28 -0
  42. data/lib/extract/dumpstream.bat +1 -0
  43. data/lib/extract/get_init.bat +3 -0
  44. data/lib/extract/pause_early.rb +13 -0
  45. data/lib/fake_blanker.rb +35 -0
  46. data/lib/frame_accurate.rb +3 -0
  47. data/lib/gui/base.rb +748 -0
  48. data/lib/gui/create-file.rb +24 -0
  49. data/lib/gui/create.rb +581 -0
  50. data/lib/gui/dependencies.rb +219 -0
  51. data/lib/gui/normal.rb +123 -0
  52. data/lib/gui/upconvert.rb +284 -0
  53. data/lib/keyboard_input.rb +60 -0
  54. data/lib/media_info_parser.rb +27 -0
  55. data/lib/mouse_forever.rb +19 -0
  56. data/lib/movie_hasher.rb +27 -0
  57. data/lib/mplayer_edl.rb +42 -0
  58. data/lib/muter.rb +87 -0
  59. data/lib/ocr.rb +125 -0
  60. data/lib/ocr_seed/netflix_b9.bmp +0 -0
  61. data/lib/overlayer.rb +373 -0
  62. data/lib/screen_tracker.rb +269 -0
  63. data/lib/subtitle_profanity_finder.rb +294 -0
  64. data/lib/vlc_programmer.rb +112 -0
  65. data/lib/zoom_player_max_edl.rb +50 -0
  66. data/never_do +40 -0
  67. data/notes_for_potential_developers.txt +46 -0
  68. data/preamble +17 -0
  69. data/roadmap_possibilities +12 -0
  70. data/spec/arse.srt +41 -0
  71. data/spec/auto_window_finder.spec.rb +65 -0
  72. data/spec/bad_beginning.srt +3778 -0
  73. data/spec/blanker.spec.rb +60 -0
  74. data/spec/common.rb +81 -0
  75. data/spec/convert_image.rb +25 -0
  76. data/spec/deity_end.srt +11 -0
  77. data/spec/dragon.srt +34 -0
  78. data/spec/edl_parser.spec.rb +270 -0
  79. data/spec/frame_accurate.spec.rb +71 -0
  80. data/spec/keyboard_input.spec.rb +73 -0
  81. data/spec/media_info_parser.spec.rb +29 -0
  82. data/spec/mplayer_edl.spec.rb +100 -0
  83. data/spec/muter.spec.rb +50 -0
  84. data/spec/notes +4996 -0
  85. data/spec/ocr.spec.rb +119 -0
  86. data/spec/overlayer.spec.rb +440 -0
  87. data/spec/screen_tracker.spec.rb +318 -0
  88. data/spec/sensible_cinema_gui.spec.rb +452 -0
  89. data/spec/subtitle_profanity_finder.spec.rb +224 -0
  90. data/spec/test_yaml.yml +4 -0
  91. data/spec/tsmuxer.output +33 -0
  92. data/spec/vlc_programmer.spec.rb +124 -0
  93. data/spec/youtube_edl.spec.rb +28 -0
  94. data/spec/zoom_player_max_edl.spec.rb +29 -0
  95. data/template_bats/README_DISTRO.TXT +8 -0
  96. data/template_bats/RUN SENSIBLE CINEMA CLICK HERE WINDOWS.bat +25 -0
  97. data/template_bats/_DO_NOT_RUN_IT_FROM_HERE_DOWNLOAD_THE_RELEASE_ZIP_FROM_SOURCEFORGE_INSTEAD +0 -0
  98. data/template_bats/mac/RUN SENSIBLE CINEMA CLICK HERE.command +5 -0
  99. data/template_bats/mac/advanced--create or edit sensible cinema edit list files.command +3 -0
  100. data/template_bats/mac/advanced--run-upconverting-video-player.command +3 -0
  101. data/template_bats/pc/advanced--create or edit sensible cinema edit list files.bat +2 -0
  102. data/template_bats/pc/advanced--run-upconverting-video-player.bat +2 -0
  103. data/todo.build_library.txt +11 -0
  104. data/todo.inventionzy.txt +162 -0
  105. data/todo.open_edl_list_org.txt +169 -0
  106. data/todo.propaganda +107 -0
  107. data/todo.subtitle +17 -0
  108. data/todo.upconvert +53 -0
  109. data/upconvert.bat +1 -0
  110. data/upconvert_from_screen/go_upscaling.bat +12 -0
  111. data/upconvert_from_screen/go_upscaling_works +0 -0
  112. data/upconvert_from_screen/old/latest2/combine_video.avs +23 -0
  113. data/upconvert_from_screen/old/latest2/go_no_upscaling.bat +1 -0
  114. data/upconvert_from_screen/old/latest2/go_upscaling.bat +12 -0
  115. data/upconvert_from_screen/old/latest2/push2.GRF +0 -0
  116. data/upconvert_from_screen/old/latest2/push3.grf +0 -0
  117. data/upconvert_from_screen/old/latest2/setup_capture_coords.rb +27 -0
  118. data/upconvert_from_screen/old/latest2/setup_directshow_filter_params.rb +29 -0
  119. data/upconvert_from_screen/old/latest2/upconvert_from_screen_me2.avs +19 -0
  120. data/upconvert_from_screen/old/latest_now_possibly_oudated/push2.GRF +0 -0
  121. data/upconvert_from_screen/old/latest_now_possibly_oudated/upconvert_from_screen_me2.avs +18 -0
  122. data/upconvert_from_screen/old/position_window.png +0 -0
  123. data/upconvert_from_screen/old/push_source_desktop.GRF +0 -0
  124. data/upconvert_from_screen/old/record_screen/record.bat +2 -0
  125. data/upconvert_from_screen/old/upconvert_from_screen.avs +21 -0
  126. data/upconvert_from_screen/old/upconvert_from_screen_me.avs +21 -0
  127. data/upconvert_from_screen/old/upconvert_from_screen_me2.avs +3 -0
  128. data/upconvert_from_screen/old/upconvert_from_screen_me_push_source.avs +3 -0
  129. data/upconvert_from_screen/old/uscreen.GRF +0 -0
  130. data/upconvert_from_screen/old/uscreen_me.GRF +0 -0
  131. data/upconvert_from_screen/push3.grf +0 -0
  132. data/upconvert_from_screen/upconvert_from_screen_me2.avs +19 -0
  133. data/vendor/movie-content-editor-read-only/.metadata/.lock +0 -0
  134. data/vendor/movie-content-editor-read-only/.metadata/.mylyn/.tasks.xml.zip +0 -0
  135. data/vendor/movie-content-editor-read-only/.metadata/.mylyn/repositories.xml.zip +0 -0
  136. data/vendor/movie-content-editor-read-only/.metadata/.mylyn/tasks.xml.zip +0 -0
  137. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version +1 -0
  138. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index +0 -0
  139. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version +1 -0
  140. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree +0 -0
  141. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources +0 -0
  142. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs +3 -0
  143. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs +14 -0
  144. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs +3 -0
  145. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +5 -0
  146. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs +3 -0
  147. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache +0 -0
  148. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat +0 -0
  149. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml +2 -0
  150. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml +2 -0
  151. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml +10 -0
  152. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml +11 -0
  153. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.ui.intro/dialog_settings.xml +4 -0
  154. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml +10 -0
  155. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml +232 -0
  156. data/vendor/movie-content-editor-read-only/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml +4 -0
  157. data/vendor/movie-content-editor-read-only/.metadata/version.ini +1 -0
  158. data/vendor/movie-content-editor-read-only/.project +17 -0
  159. data/vendor/movie-content-editor-read-only/.pydevproject +11 -0
  160. data/vendor/movie-content-editor-read-only/.settings/org.eclipse.core.resources.prefs +6 -0
  161. data/vendor/movie-content-editor-read-only/SubIt.py +171 -0
  162. data/vendor/movie-content-editor-read-only/VLCMacVideo.py +257 -0
  163. data/vendor/movie-content-editor-read-only/VideoMac.ui +102 -0
  164. data/vendor/movie-content-editor-read-only/badwords.txt +4 -0
  165. data/vendor/movie-content-editor-read-only/blank.srt +4 -0
  166. data/vendor/movie-content-editor-read-only/edit.py +197 -0
  167. data/vendor/movie-content-editor-read-only/mergeCommands.py +73 -0
  168. data/vendor/movie-content-editor-read-only/mute.txt +5 -0
  169. data/vendor/movie-content-editor-read-only/panda.srt +4235 -0
  170. data/vendor/movie-content-editor-read-only/panda_custom.txt +3 -0
  171. data/vendor/movie-content-editor-read-only/panda_edit.srt +4235 -0
  172. data/vendor/movie-content-editor-read-only/subtitle.py +90 -0
  173. data/vendor/movie-content-editor-read-only/vlc.py +5579 -0
  174. data/vendor/movie-content-editor-read-only/vlcwidget.py +154 -0
  175. data/vendor/mplayer_patches/how_to_doze.bat +6 -0
  176. data/vendor/mplayer_patches/port_dir/PortIndex.quick +2 -0
  177. data/vendor/mplayer_patches/port_dir/how_to +20 -0
  178. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/Portfile +285 -0
  179. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/configure.x11.patch +20 -0
  180. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/llvm-gcc-workaround.patch +11 -0
  181. data/vendor/mplayer_patches/port_dir/multimedia/rdp-projects/Portfile +43 -0
  182. data/vendor/mplayer_patches/port_dir_is_for_mac +0 -0
  183. data/www/content_editor.html +92 -0
  184. data/www/index.html +47 -0
  185. data/www/upconverting_movie_player.html +62 -0
  186. data/www/video reel.jpg +0 -0
  187. data/www/youtube_edl/.htaccess +44 -0
  188. data/www/youtube_edl/control_youtube.rhtml +141 -0
  189. data/www/youtube_edl/dispatch.fcgi +25 -0
  190. data/www/youtube_edl/render_edited.rb +25 -0
  191. data/www/youtube_edl/server_this_dir.rb +6 -0
  192. data/www/youtube_edl/todo +23 -0
  193. data/www/zoomplayer_max.png +0 -0
  194. data/zamples/edit_decision_lists/dvds/Harry Potter 2 chamber of secrets.txt +22 -0
  195. data/zamples/edit_decision_lists/dvds/aa_example_delete_list_that_has_no_cuts_in_it.txt +10 -0
  196. data/zamples/edit_decision_lists/dvds/aladdin.txt +30 -0
  197. data/zamples/edit_decision_lists/dvds/bambi.txt +17 -0
  198. data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +23 -0
  199. data/zamples/edit_decision_lists/dvds/bob the builder pets in a pickle.txt +10 -0
  200. data/zamples/edit_decision_lists/dvds/bobs_big_plan.txt +10 -0
  201. data/zamples/edit_decision_lists/dvds/cars_2.txt +26 -0
  202. data/zamples/edit_decision_lists/dvds/cars_disney.txt +40 -0
  203. data/zamples/edit_decision_lists/dvds/condor_man_widescreen.txt +22 -0
  204. data/zamples/edit_decision_lists/dvds/cool runnings.txt +53 -0
  205. data/zamples/edit_decision_lists/dvds/court_jester.txt +24 -0
  206. data/zamples/edit_decision_lists/dvds/edls_being_edited/amazing_grace.txt +49 -0
  207. data/zamples/edit_decision_lists/dvds/edls_being_edited/father_goose.txt +41 -0
  208. data/zamples/edit_decision_lists/dvds/edls_being_edited/harry_potter_and_the_goblet_of_fire.txt +45 -0
  209. data/zamples/edit_decision_lists/dvds/edls_being_edited/hugo.txt +31 -0
  210. data/zamples/edit_decision_lists/dvds/edls_being_edited/making_marriage_work.txt +15 -0
  211. data/zamples/edit_decision_lists/dvds/edls_being_edited/national_treasure.txt +26 -0
  212. data/zamples/edit_decision_lists/dvds/edls_being_edited/percy_jackson_lightening_thief.txt +40 -0
  213. data/zamples/edit_decision_lists/dvds/edls_being_edited/percy_jackson_lightening_thief_mute_scary.txt +23 -0
  214. data/zamples/edit_decision_lists/dvds/edls_being_edited/prince_of_egypt.txt +28 -0
  215. data/zamples/edit_decision_lists/dvds/edls_being_edited/puss_in_boots.txt +33 -0
  216. data/zamples/edit_decision_lists/dvds/edls_being_edited/ratatouille.txt +35 -0
  217. data/zamples/edit_decision_lists/dvds/edls_being_edited/rio.txt +24 -0
  218. data/zamples/edit_decision_lists/dvds/edls_being_edited/test_delete_list_for_experimenting_with.txt +10 -0
  219. data/zamples/edit_decision_lists/dvds/edls_being_edited/the_explorers.txt +49 -0
  220. data/zamples/edit_decision_lists/dvds/finding_neverland.txt +32 -0
  221. data/zamples/edit_decision_lists/dvds/flight_of_the_navigator.txt +40 -0
  222. data/zamples/edit_decision_lists/dvds/happiest baby on the block.txt +9 -0
  223. data/zamples/edit_decision_lists/dvds/harry_potter_3_prisoner_of_azkaban.txt +37 -0
  224. data/zamples/edit_decision_lists/dvds/hitchhiker's_guide_to_the_galaxy.txt +32 -0
  225. data/zamples/edit_decision_lists/dvds/how_to_train_your_dragon.txt +25 -0
  226. data/zamples/edit_decision_lists/dvds/if_a_man_answers.txt +43 -0
  227. data/zamples/edit_decision_lists/dvds/innerspace.txt +77 -0
  228. data/zamples/edit_decision_lists/dvds/iq.txt +32 -0
  229. data/zamples/edit_decision_lists/dvds/king_of_kings.txt +28 -0
  230. data/zamples/edit_decision_lists/dvds/kung_fu_panda_1.txt +17 -0
  231. data/zamples/edit_decision_lists/dvds/legend_of_the_guardians_the_owls_of_gahoole.txt +18 -0
  232. data/zamples/edit_decision_lists/dvds/monsters_vs_aliens.txt +41 -0
  233. data/zamples/edit_decision_lists/dvds/muppet_treasure_island.txt +21 -0
  234. data/zamples/edit_decision_lists/dvds/nanny_mcphee.txt +31 -0
  235. data/zamples/edit_decision_lists/dvds/narnia_voyage_of_the_dawn_treader.txt +16 -0
  236. data/zamples/edit_decision_lists/dvds/pack_jackson_wedding_2007-03-03.txt +31 -0
  237. data/zamples/edit_decision_lists/dvds/peter_pan.txt +29 -0
  238. data/zamples/edit_decision_lists/dvds/remember_the_titans.txt +35 -0
  239. data/zamples/edit_decision_lists/dvds/sintel_open_source_blender_ntsc_dvd.txt +22 -0
  240. data/zamples/edit_decision_lists/dvds/snow_white_and_the_7_dwarfs_1937.txt +19 -0
  241. data/zamples/edit_decision_lists/dvds/speed_racer.txt +47 -0
  242. data/zamples/edit_decision_lists/dvds/tangled.txt +21 -0
  243. data/zamples/edit_decision_lists/dvds/tron_legacy.txt +29 -0
  244. data/zamples/edit_decision_lists/dvds/turn_around_alma_younger.txt +17 -0
  245. data/zamples/edit_decision_lists/files/conference_music_video.txt +10 -0
  246. data/zamples/edit_decision_lists/netflix_instant/avatar-last-air-bender-movie.txt +13 -0
  247. data/zamples/edit_decision_lists/netflix_instant/avatar-last-airbender-series.txt +1 -0
  248. data/zamples/edit_decision_lists/netflix_instant/greatest_story_ever_told_netflix.txt +10 -0
  249. data/zamples/edit_decision_lists/netflix_instant/wrinkle-in-time.txt +23 -0
  250. data/zamples/edit_decision_lists/notes_on_movies_without_edls_yet/tron.txt +10 -0
  251. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/White Christmas.txt +15 -0
  252. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/all_dogs_go_to_heaven.txt +9 -0
  253. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/cars_disney.txt +24 -0
  254. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/happy_feet.txt +12 -0
  255. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/labyrinth.txt +17 -0
  256. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/star_trek_generations_hulu.txt +8 -0
  257. data/zamples/edit_decision_lists/old_not_yet_updated/example_edit_decision_list.txt +14 -0
  258. data/zamples/edit_decision_lists/old_not_yet_updated/youtube/gummy_bear_song_youtube.txt +9 -0
  259. data/zamples/edit_decision_lists/youtube/demo_mutes.txt +12 -0
  260. data/zamples/edit_decision_lists/youtube/nuki_song_youtube.txt +14 -0
  261. data/zamples/edit_decision_lists/youtube/nuki_song_youtube_pointer.txt +3 -0
  262. data/zamples/players/how_to_create_more_players.txt +24 -0
  263. data/zamples/players/hulu/total_length_over_an_hour.txt +25 -0
  264. data/zamples/players/netflix/netflix_firefox_non_maximized.txt +25 -0
  265. data/zamples/players/vlc/full_screened_total_length_over_an_hour.txt +27 -0
  266. data/zamples/players/vlc/windowed_total_length_over_an_hour.txt +26 -0
  267. data/zamples/players/vlc/windowed_total_length_under_an_hour.txt +22 -0
  268. data/zamples/players/youtube/full_screened_1024x768.txt +20 -0
  269. data/zamples/players/youtube/full_screened_1152x864.txt +20 -0
  270. data/zamples/players/youtube/full_screened_1680x1050.txt +20 -0
  271. data/zamples/players/youtube/normal_in_youtube.com.chrome.txt +23 -0
  272. data/zamples/players/youtube/note_these_assume_less_than_10_minutes_length.txt +2 -0
  273. metadata +483 -0
@@ -0,0 +1,224 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
18
+
19
+ require File.expand_path(File.dirname(__FILE__) + '/common')
20
+ require_relative '../lib/subtitle_profanity_finder'
21
+ require 'sane'
22
+
23
+ describe SubtitleProfanityFinder do
24
+
25
+ describe "should parse out various profanities" do
26
+
27
+ output = SubtitleProfanityFinder.edl_output 'dragon.srt'
28
+
29
+ describe "h..." do
30
+ it "should include the bad line with timestamp" do
31
+ output.should match(/0:00:54.93.*"h\.\.\."/)
32
+ end
33
+
34
+ it "should include the description in its output" do
35
+ output.should include("e [h...] b")
36
+ end
37
+ end
38
+
39
+ describe "deity various" do
40
+
41
+ it "should parse output plural deity" do
42
+ output.should include("nordic [deitys] ")
43
+ end
44
+
45
+ it "should parse out deity singular and at very end" do
46
+ output = SubtitleProfanityFinder.edl_output 'deity_end.srt'
47
+ output.should include("fortress is our [vain use]")
48
+ end
49
+
50
+ it "should remove <i> et al " do
51
+ output = SubtitleProfanityFinder.edl_output 'deity_end.srt'
52
+ output.should_not include(" i ")
53
+ output.should_not include("<i")
54
+ output.should_not include("huntingand")
55
+ output.should_not include(" ")
56
+ end
57
+
58
+ end
59
+
60
+ describe 'full word only profanities' do
61
+
62
+ output2 = SubtitleProfanityFinder.edl_output 'arse.srt'
63
+
64
+ it 'should not parse it if it\'s in other words' do
65
+ output2.should_not include "a..ume"
66
+ output2.should_not include "h...o"
67
+ output2.should_not include "he..o"
68
+ end
69
+
70
+ it 'should parse them at EOL' do
71
+ output2.should include '0:00:55.07' # EOL
72
+ output2.should include "0:00:55.07" # full line...
73
+ output2.should include '0:00:55.07' # BOL TODO fix spec :P
74
+ end
75
+
76
+ it 'should replace l for i' do
77
+ output2.should include "07" # implies it got the substutition right...
78
+ end
79
+
80
+ it 'should keep apostrophes' do
81
+ output2.should include "don't"
82
+ end
83
+
84
+ it 'should not disdain impass' do
85
+ output2.should_not include "impa.."
86
+ end
87
+
88
+ it 'should let them end with a .' do
89
+ output2.should include "line end full word"
90
+ end
91
+
92
+ end
93
+
94
+ end
95
+
96
+ it 'should add to begin, end' do
97
+ out = SubtitleProfanityFinder.edl_output 'dragon.srt', {'word' => 'word'}, 1, 1.5
98
+ out.should include "45.46"
99
+ out.should include "51.59"
100
+ end
101
+
102
+ def test_this_added_text text, extra = {}
103
+ SubtitleProfanityFinder.edl_output_from_string(<<-EOL, extra, 0, 0, 0, 0, 100, 100)
104
+ 6
105
+ 00:00:55,068 --> 00:00:59,164
106
+ #{text}
107
+
108
+ EOL
109
+ end
110
+
111
+ it "should remove some punctuation" do
112
+ out = test_this_added_text " .- (ab\nc)."
113
+ out[1][0].single_line_text.should == "(ab c)."
114
+ out = test_this_added_text "(abc)., "
115
+ out[1][0].single_line_text.should == "(abc)."
116
+ end
117
+
118
+ it "should let you set replacement text" do
119
+ out = test_this_added_text "a good day", {'good' => ['replace with', :partial_word, 'category']}
120
+ good = "\n \"0:00:55.07\" , \"0:00:59.16\", \"profanity\", \"category\", \"a [replace with] day\",\n\n"
121
+ out[0].should == good
122
+ out = test_this_added_text "a good day", {'good' => ['replace with', :full_word, 'category']}
123
+ out[0].should == good
124
+ end
125
+
126
+ it "should accomodate lesser profanities" do
127
+ out = test_this_added_text "I believe in the Lord"
128
+ out[0].should include "55.0"
129
+ assert out[1][0].text =~ /l.../i
130
+ end
131
+
132
+ it "should do full word with dashes" do
133
+ parsed, entries = test_this_added_text("I believe in heaven and-hell-")
134
+ assert parsed =~ /heaven/
135
+ assert parsed !~ /hel/
136
+ end
137
+
138
+ describe "it should take optional user params" do
139
+ output = SubtitleProfanityFinder.edl_output 'dragon.srt', {'word' => 'word'}
140
+
141
+ it "should parse out the word word" do
142
+ output.should match(/0:00:50.09.*"word"/)
143
+ end
144
+
145
+ it "should parse out and replace with euphemism" do
146
+ output = SubtitleProfanityFinder.edl_output 'dragon.srt', {'word' => 'w...'}
147
+ output.should match(/0:00:50.09.*In a \[w\.\.\.\]/)
148
+ end
149
+
150
+ end
151
+
152
+ S = SubtitleProfanityFinder
153
+
154
+ describe "it should let you re-factor the timestamps on the fly if desired" do
155
+
156
+ it "should subtract from beginning etc. etc." do
157
+ normal = S.edl_output 'dragon.srt'
158
+ normal.should =~ /0:00:50.23/
159
+ normal.should =~ /0:00:54.93/
160
+ subtract = S.edl_output 'dragon.srt', {}, 1.0
161
+ subtract.should =~ /0:00:49.23/
162
+ normal.should =~ /0:00:54.93/
163
+ add = S.edl_output 'dragon.srt', {}, 0.0, 1.0
164
+ add.should =~ /0:00:55.93/
165
+ add.should =~ /0:00:50.23/
166
+ end
167
+
168
+ it "should compensate for differing start timestamps" do
169
+ starts_ten_later_than_srt = S.edl_output 'dragon.srt', {}, 0.0, 0.0, 10.0, 20.0, 110, 120
170
+ starts_ten_later_than_srt.should =~ /0:01:00.23/ # 50.23 -> this
171
+ starts_ten_later_than_srt.should =~ /0:01:04.93/
172
+ end
173
+
174
+ it "should compensate for differing end timestamps with a multiple" do
175
+ lasts_longer = S.edl_output 'dragon.srt', {}, 0.0, 0.0, 0.0, 0.0, 60.0, 90.0 # actual ends 50% later
176
+ lasts_longer.should =~ /0:01:15.34/
177
+ lasts_longer.should =~ /0:01:22.39/
178
+ end
179
+
180
+ describe "combining different initial time offsets with total times" do
181
+
182
+ it "should combine different initial time offset with different total time" do
183
+ lasts_longer_with_initial_add = S.edl_output 'dragon.srt', {}, 0.0, 0.0, begin_srt = 0.0, begin_actual = 10.0, end_srt = 55.0, end_actual = 55.0
184
+ # this one starts off weird, but then ends at almost exactly the same!
185
+ lasts_longer_with_initial_add.should =~ /0:00:51.10/
186
+ lasts_longer_with_initial_add.should =~ /0:00:54.94/ # note--almost on
187
+ end
188
+
189
+ it "should be ok if they line up perfectly with just an offset" do
190
+ plus_ten = S.edl_output 'dragon.srt', {}, 0.0, 0.0, begin_srt = 0.0, begin_actual = 10.0, end_srt = 55.0, end_actual = 65.0
191
+ plus_ten.should =~ /0:01:00.23/
192
+ plus_ten.should =~ /0:01:04.93/
193
+ end
194
+
195
+ end
196
+
197
+ end
198
+
199
+ it "should split to human friendlier entries" do
200
+ yo = S.split_to_entries File.read('dragon.srt')
201
+ for entry in yo
202
+ ts_begin = entry.beginning_time
203
+ ts_end = entry.ending_time
204
+ for timestamp in [ts_begin, ts_end]
205
+ assert timestamp.present?
206
+ assert timestamp.is_a? Float
207
+ end
208
+ assert ts_end > ts_begin
209
+ assert entry.text =~ /\n/m
210
+ end
211
+ end
212
+
213
+ it "should capture times and tweak them, and keep punctuation" do
214
+ out = S.edl_output_from_string <<-EOL, {}, 0,0,88, 88.16, 7296.5, 7292.4, true
215
+ 1
216
+ 00:01:28,000 --> 00:01:29,036
217
+ Grandpa(sris)! your's is here?!.,
218
+
219
+ EOL
220
+ assert out[1][0].beginning_time == 88.16
221
+ out[1][0].text.should match /\(sris\)!/
222
+ end
223
+
224
+ end
@@ -0,0 +1,4 @@
1
+ title: Forever Strong
2
+ :mutes:
3
+ 2.0 : 3.0
4
+ 4.0 : 5.0
@@ -0,0 +1,33 @@
1
+ SmartLabs tsMuxeR. Version 1.10.6 http://www.smlabs.net
2
+ Track ID: 1
3
+ Stream type: MPEG-2
4
+ Stream ID: V_MPEG-2
5
+ Stream info: Profile: Main@8. Resolution: 720:480i. Frame rate: 29.97
6
+ Stream lang: eng
7
+ Track ID: 2
8
+ Stream type: AC3
9
+ Stream ID: A_AC3
10
+ Stream info: Bitrate: 448Kbps Sample Rate: 48KHz Channels: 6
11
+ Stream lang: eng
12
+ Track ID: 3
13
+ Can't detect stream type
14
+ Track ID: 4
15
+ Can't detect stream type
16
+ Track ID: 5
17
+ Can't detect stream type
18
+ Track ID: 6
19
+ Can't detect stream type
20
+ Track ID: 7
21
+ Can't detect stream type
22
+ Track ID: 8
23
+ Can't detect stream type
24
+ Track ID: 9
25
+ Can't detect stream type
26
+ Track ID: 10
27
+ Can't detect stream type
28
+ Track ID: 11
29
+ Can't detect stream type
30
+
31
+ Marks: 00:00:00.000 00:01:42.669 00:02:29.215 00:05:50.383 00:07:14.967
32
+ Marks: 00:11:19.979 00:12:24.276 00:14:17.389
33
+
@@ -0,0 +1,124 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
18
+ require File.dirname(__FILE__) + "/common"
19
+ require_relative '../lib/vlc_programmer'
20
+
21
+
22
+ describe 'VLC Programmer' do
23
+
24
+ it "should be able to convert" do
25
+ a = YAML.load_file "../zamples/edit_decision_lists/dvds/happy_feet.txt"
26
+ out = VLCProgrammer.convert_to_full_xspf(a)
27
+ out.length.should_not == 0
28
+ out.should include("<title>Playlist</title>")
29
+ out.scan(/vlc:id/).length.should be > 0
30
+ end
31
+
32
+ before do
33
+ @a = VLCProgrammer.convert_to_full_xspf({ "mutes"=>{105=>145, "46:33.5"=>2801} } )
34
+ end
35
+
36
+ it "should convert mutes and blanks apropo" do
37
+ @a.scan(/<vlc:id>/).length.should == 5 # should mute and play each time...
38
+ @a.scan(/start-time=0/).length.should == 1 # should start
39
+ @a.scan(/stop-time=1000000/).length.should == 1 # should have one to "finish" the DVD
40
+ @a.scan(/<\/playlist/).length.should == 1
41
+ end
42
+
43
+ it "should have pretty english titles" do
44
+ @a.scan(/ to /).length.should == 2*2+1
45
+ @a.scan(/clean/).length.should be > 0
46
+ @a.scan(/2:25/).length.should == 2
47
+ @a.scan(/noaudio/).length.should be > 0
48
+ end
49
+
50
+ it "should handle blank outs, too" do
51
+ # shouldn't have as many in the case of blanks...
52
+ a = VLCProgrammer.convert_to_full_xspf({ "blank_outs" => {63=>64} } )
53
+ a.should include("63")
54
+ a.should include("64")
55
+ a.scan(/ to /).length.should == 2
56
+ end
57
+
58
+ it "should handle combined blank and audio well" do
59
+ # currently it handles blanks as skips...
60
+ # possibly someday we should allow for blanks as...blanks? blank-time somehow, with the right audio?
61
+ # for now, skip for blanks, mute for mutes...
62
+
63
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {5=> 7}, "blank_outs" => {6=>7} } )
64
+ # should mute 5-6, skip 6-7
65
+ a.scan(/noaudio/).length.should == 1
66
+ a.scan(/ to /).length.should == 3 # 0->5, 5->6, 7-> end
67
+ a.scan(/=5/).length.should == 2
68
+ a.scan(/=6/).length.should == 1
69
+ a.scan(/=7/).length.should == 1
70
+
71
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {6=> 7}, "blank_outs" => {5=>7} } )
72
+ a.scan(/=6/).length.should == 0
73
+ a.scan(/noaudio/).length.should == 0
74
+ a.scan(/ to /).length.should == 2 # 0->5, 7-> end
75
+
76
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {6=> 7}, "blank_outs" => {5=>6.5} } )
77
+ # should skip 5 => 6.5, mute 6.5 => 7
78
+
79
+ a.scan(/noaudio/).length.should == 1
80
+ a.scan(/ to /).length.should == 3 # 0->5, 6.5 => 7, 7 -> end
81
+ a.scan(/=5/).length.should == 1
82
+ a.scan(/=6.5/).length.should == 1
83
+ a.scan(/=7/).length.should == 2
84
+
85
+
86
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {6=> 7}, "blank_outs" => {6=>7} } )
87
+ # should ignore mutes here
88
+ a.scan(/ to /).length.should == 2 # 0->6, 7 -> end
89
+
90
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {6.5=> 7}, "blank_outs" => {6=>7} } )
91
+ # should ignore mutes here
92
+ a.scan(/ to /).length.should == 2 # 0->6, 7 -> end
93
+
94
+ end
95
+
96
+ it "should ignore a mute wholly within a blank" do
97
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {6=> 7}, "blank_outs" => {5=>8, 9=>10} } )
98
+ a.scan(/ to /).length.should == 3 # 0->5, 8 -> 9, 10 => end
99
+ end
100
+
101
+ it "should not try to save it to a file from within the xml" do
102
+ a = VLCProgrammer.convert_to_full_xspf({ "mutes" => {5=>10} } )
103
+ a.scan(/sout=.*/).length.should == 0
104
+ bat_file = VLCProgrammer.convert_to_full_xspf({ "mutes" => {5=>10} }, 'go' )
105
+ bat_file.scan(/sout=.*/).length.should be > 0
106
+ bat_file.scan(/playlist/i).length.should == 0
107
+ bat_file.scan(/--no-sout-audio/).length.should == 1
108
+ bat_file.scan(/\n/).length.should be > 2
109
+ bat_file.scan(/go.ps.1\+go.ps.2/).length.should == 1
110
+ bat_file.scan(/go.ps.4/).length.should == 0
111
+ bat_file.scan(/--start-time/).length.should == 3
112
+ bat_file.scan(/quit/).length.should == 3
113
+ bat_file.scan(/copy \/b/).length.should == 1
114
+ bat_file.scan(/del go.ps.1/).length.should == 1
115
+ bat_file.scan(/echo/).length.should == 1
116
+ # should not have extra popups...
117
+ bat_file.scan(/--qt-start-minimized/i).length.should == 3
118
+ File.write('mute5-10.bat', bat_file)
119
+ puts 'run it like $ mute5-10.bat'
120
+ end
121
+
122
+ it "should produce a file playable by windows media player"
123
+
124
+ end
@@ -0,0 +1,28 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
18
+ require File.dirname(__FILE__) + "/common"
19
+ require_relative '../lib/youtube_edl'
20
+
21
+ #http://rogerdpack.t28.net/sensible-cinema/youtube_edl/yo?mute_start=2&mute_end=7&skip_start=10&skip_end=20&youtube_video_id=ylLzyHk54Z0
22
+ describe YoutubeEdl do
23
+
24
+ it "should be able to convert" do
25
+ a = YAML.load_file "../zamples/edit_decision_lists/dvds/happy_feet.txt"
26
+ end
27
+
28
+ end
@@ -0,0 +1,29 @@
1
+ =begin
2
+ Copyright 2010, Roger Pack
3
+ This file is part of Sensible Cinema.
4
+
5
+ Sensible Cinema is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ Sensible Cinema is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
17
+ =end
18
+ require File.dirname(__FILE__) + "/common"
19
+ require_relative '../lib/zoom_player_max_edl'
20
+
21
+ describe ZoomPlayerMaxEdl do
22
+
23
+ it "should create an edl" do
24
+ specs = {"name"=>"national treasure", "mutes"=>[], "blank_outs"=>[["01:00:00.0", "01:00:10.0", "violence", "of some sort"]], "dvd_nav_packet_offset"=>[0.4, 0.6143], "volume_name"=>"NATIONAL_TREASURE", "disk_unique_id"=>"91a5aeec|5178a204", "dvd_title_track"=>"1", "dvd_title_track_length"=>7856.8, "dvd_start_offset"=>"0.28", "timestamps_relative_to"=>["dvd_start_offset", "29.97"]}
25
+ out = ZoomPlayerMaxEdl.convert_to_edl_string specs
26
+ assert out == "DVDTitle(1)\nCutSegment(\"Start=3596.6178964036\",\"End=3606.60790639361\")\n"
27
+ end
28
+
29
+ end