Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Jun 27, 2011
1 parent 1916e01 commit a5bdf31
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 61 deletions.
40 changes: 19 additions & 21 deletions README
Expand Up @@ -13,19 +13,21 @@ It will pop up some windows where you choose what to do.
Note: please install from the zip files at https://sourceforge.net/projects/sensible-cinema/files/ Note: please install from the zip files at https://sourceforge.net/projects/sensible-cinema/files/
and not from github's "download" button. See the "install" section, below, for finer grained details. and not from github's "download" button. See the "install" section, below, for finer grained details.


Sensible cinema basically allows you to create an edited video version of the DVD, onto your hard drive, and you can watch it there. Sensible cinema basically allows you to create an edited video version of the DVD, onto your hard drive,
and you can watch it there. It also has some realtime playback support via the use of EDL playback in some
popular video players.


How? Sensible cinema basically takes the original DVD, slices out the bad parts, then combines it back How? Sensible cinema basically takes the original DVD, slices out the bad parts, then combines it back
into a new file and gives you the result. into a new file and gives you the result.
It is basically a linear editor [1] that applies Edit Decision Lists [2] to videos. It wraps It is essentially a linear editor [1] that applies Edit Decision Lists [2] to videos. It wraps
a few freely available open source programs [3] to accomplish the editing for you. a few freely available open source programs [3] to accomplish the editing for you.
It also has a few "realtime viewing" options available, again based on open source software [3]. Note that the process can take several hours, so budget some time for it.
It also has a few "realtime viewing" options available, again based on some freely available
open source software [3].


Note that the whole process can take several hours, so budget some time for it. On a more moral note, just because an edited video lacks profanity/sex scenes...does not immediately make it an inspiring experience.

I'd suggest carefully evaluating your real values/motives, and going with those.
Also note that just because an edited video lacks profanity...does not immediately make it an inspiring experience. Sensible cinema does not a clean movie make of a dirty one. Don't watch it if it's not uplifting! Be nice to yourself!
I'd suggest carefully evaluating your real values, and going with those.
Sensible cinema does not a clean movie make of a dirty one. Don't watch it if it's not wholesome! Be nice to yourself!


dove.org and common sense media are good references for discovering the "uplifting" level of movies [4]. dove.org and common sense media are good references for discovering the "uplifting" level of movies [4].
kids-in-mind.com is also a good reference for profanity levels, though sometimes it misses profanities, kids-in-mind.com is also a good reference for profanity levels, though sometimes it misses profanities,
Expand Down Expand Up @@ -180,7 +182,7 @@ realtime tracking, so I also included this ability.
The playlist option is disabled in later releases, as it was deemed too user-non-friendly, and because VLC timing The playlist option is disabled in later releases, as it was deemed too user-non-friendly, and because VLC timing
is "different" than standard DVD players, so I decided to just use standardized timing, though it worked fine is "different" than standard DVD players, so I decided to just use standardized timing, though it worked fine
for VLC playbacks. for VLC playbacks.
I replaced it with support for mplayer's EDL format I replaced it with support for mplayer's EDL format, which works better, and has consistent timing, though is still a bit buggy.


You can see a full list of other features that have been published and demonstrated You can see a full list of other features that have been published and demonstrated
in the accompanying file change_log_with_feature_list.txt. Each feature mentioned works in the accompanying file change_log_with_feature_list.txt. Each feature mentioned works
Expand Down Expand Up @@ -247,23 +249,15 @@ See first also the file "is_it_legal_to_copy_dvds.txt" for more information on l


== Troubleshooting == == Troubleshooting ==


If you run into some snag, it possibly could have failed in "grabbing" the DVD, and only got part of it. If you run into some snag, try cleaning your DVD and starting over (delete all files, start again).
Try cleaning your DVD and starting over (delete all files, start again).
Baking soda toothpaste might help with cleaning it. Baking soda toothpaste might help with cleaning it.
If it still errs, report it, along with a screen snapshot and steps of If it still errs, report it, along with a screen snapshot and steps of
how to reproduce the problem, preferably. See the feedback section. how to reproduce the problem, preferably. See the feedback section.


It can fail also because a deletion is past end of DVD, or It can fail also because a deletion is past end of DVD, or
Also note that if your DVD has scratches that cause it to skip, the time signatures will be off after that point,
so clean your discs and try again!
"DVDNAV stream read error!"
this typically means a dirty or scratched DVD.

Also make sure you aren't out of disk space. Also make sure you aren't out of disk space.


Try playback in VLC Media Player. Try playback in "VLC Media Player"

Also you could try another computer (desktop computers' DVD drives seem to work better at times than laptops')


You try to play back a sensible cinema-ized video file and it plays back without You try to play back a sensible cinema-ized video file and it plays back without
audio or video (example: windows media player)? audio or video (example: windows media player)?
Expand All @@ -272,17 +266,21 @@ You try to play back a sensible cinema-ized video file and it plays back without
to handle this type of audio. Not to fear, just download the "ffdshow tryouts" (google for it) to handle this type of audio. Not to fear, just download the "ffdshow tryouts" (google for it)
and, when it gives you the option, be sure to check "mpeg2 video" and then and, when it gives you the option, be sure to check "mpeg2 video" and then
it should "just work." You could also optionally just play the file in VLC Media Player or smplayer it should "just work." You could also optionally just play the file in VLC Media Player or smplayer
(there's a button for that). Installing "AC3Filter" may help if you have no audio. (there's a button for that). Installing "AC3Filter" may help if you can hear no audio.
Really VLC Media Player is your best bet though.


If the end result picture is too grainy/pixelated or if the overall process is too slow, let me know and I'll work on If the end result picture is too grainy/pixelated or if the overall process is too slow, let me know and I'll work on
making it better. No really, I have some ideas, but want to see if there's need first for improvement in those areas. making it better. No really, I have some ideas, but want to see if there's need first for improvement in those areas.


Finally, report back! If there are problems that arise, I want to hear about them so we can help you through it.

== Thanks == == Thanks ==


Thanks to Jarmo for the win32-screenshot gem, the mini_magick gem authors, jruby guys, etc. Thanks to Jarmo for the win32-screenshot gem, the mini_magick gem authors, jruby guys, etc.
The combination of these tools made programming this actually something of a pleasure, The combination of these tools made programming this actually something of a pleasure,
and a breeze cross platform. and a breeze cross platform.
Sensible Cinema leverages code from lots of other projects (see LICENSE.TXT)--many thanks to the authors and maintainers of said libraries, and anybody else I forgot to mention. Sensible Cinema leverages code from lots of other projects (see LICENSE.TXT)--many thanks to
the authors and maintainers of said libraries, and anybody else I forgot to mention.


== Feedback/Development == == Feedback/Development ==


Expand Down
17 changes: 7 additions & 10 deletions TODO
Expand Up @@ -30,7 +30,6 @@
just in case youtube takes over the world just in case youtube takes over the world


== yes do ordered == == yes do ordered ==
EDL for that fella...
transfer from little stickie at.... transfer from little stickie at....
try buy delete lists from all x,y,z [?] maybe ask for them for free first? () try buy delete lists from all x,y,z [?] maybe ask for them for free first? ()
unit tests unit tests
Expand Down Expand Up @@ -64,7 +63,7 @@
"you could edit your file "raw" file "with avidemux, except video will be slightly off, but audio will be on" "you could edit your file "raw" file "with avidemux, except video will be slightly off, but audio will be on"
"VLC [or any GUI] is always slightly off." "VLC [or any GUI] is always slightly off."
can I avoid requiring use of tsmuxer first? can I avoid requiring use of tsmuxer first?
check with blu-ray...does it match timing-wise? sub-title wise? check with blu-ray...do they match timing-wise? sub-title wise?
donate tsmuxer, makemkv, http://ffmpeg.zeranoe.com/builds, mulder [?] smplayer donate tsmuxer, makemkv, http://ffmpeg.zeranoe.com/builds, mulder [?] smplayer
auto tsmuxer/mediainfo [yikes]? auto tsmuxer/mediainfo [yikes]?
MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500 V_MPEG-2, "G:\Video\c\title00.mkv", fps=23.976, ar=As source, track=1, lang=eng A_AC3, "G:\Video\c\title00.mkv", track=2, lang=eng MUXOPT --no-pcr-on-video-pid --new-audio-pes --vbr --vbv-len=500 V_MPEG-2, "G:\Video\c\title00.mkv", fps=23.976, ar=As source, track=1, lang=eng A_AC3, "G:\Video\c\title00.mkv", track=2, lang=eng
Expand Down Expand Up @@ -99,10 +98,9 @@
can come out of full screen more easily :P can come out of full screen more easily :P
note pay for XP http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins search for the cheapest note pay for XP http://windows.microsoft.com/en-US/windows/downloads/windows-media-player/plug-ins search for the cheapest
note to them windows vista/7: use ac3filter [?] note to them windows vista/7: use ac3filter [?]
if it doesn't parse something it loops *forever* "error pooping" "error pooping" [?]
donate menumeter $ donate menumeter $
tool tips for all buttons...tweak naming, too :P do something! tool tips for all buttons...tweak naming, too :P
fix/create the "play previously credited edited file for current DVD" button fix/create the "play previously created edited file for current DVD" button
vendorize smplayer * 2 vendorize smplayer * 2
test if latest smplayer can work with edl and seek [?] test if latest smplayer can work with edl and seek [?]
be able to use smplayer, never just mplayer [yikes] be able to use smplayer, never just mplayer [yikes]
Expand All @@ -111,8 +109,6 @@
ask for more beta testers for use, ask for more beta testers for creation, too ask for more beta testers for use, ask for more beta testers for creation, too
beta release: rinse and repeat with various ppl beta release: rinse and repeat with various ppl
youtube videos -> new account name youtube videos -> new account name
vendorize a copy of ffmpeg, then they don't have to install imagemagick...also then we'll have ffprobe
and sanity
note "pay us/somebody to do it for you on the google group"? note "pay us/somebody to do it for you on the google group"?
note "this is the full list--your help is wanted/needed" note "this is the full list--your help is wanted/needed"
create a semi-accurate phantom edit EDL create a semi-accurate phantom edit EDL
Expand All @@ -130,14 +126,13 @@
ppc? ppc?
app store mplayer perhaps? maybe tell the players to start supportin' dvdnav? app store mplayer perhaps? maybe tell the players to start supportin' dvdnav?
bundle a copy of smplayer locally? huh? bundle a copy of smplayer locally? huh?
delete unedited.fulli file automatically typically delete unedited.fulli file automatically
except if it's a specific scene run test... except if it's a specific scene run test...
investigate: can I use zoomplayer max?
the final "edited.avi" really "could/should" be playable in WMP... the final "edited.avi" really "could/should" be playable in WMP...
"profanity" => "language"
it should clear old smplayer options on startup always, just in case, somehow it should clear old smplayer options on startup always, just in case, somehow
use smplayer with my mplayer always...unless I'm moving away from that... use smplayer with my mplayer always...unless I'm moving away from that...
@makemkv: show us the title numbers, and number them *by those* @makemkv: show us the title numbers, and number them *by those*
generic EDL run through should be through smplayer...do I need the other way around, even?


== other lists == == other lists ==


Expand Down Expand Up @@ -166,9 +161,11 @@
note to them [in how_to_create]: can do the two types of preview at same time...concurrently...to save time... note to them [in how_to_create]: can do the two types of preview at same time...concurrently...to save time...
can I make playback more smooth by upping mplayer cache? does smplayer pass it a parameter? can I make playback more smooth by upping mplayer cache? does smplayer pass it a parameter?
lua VLC EDL plugin? LOL yeah right. lua VLC EDL plugin? LOL yeah right.
investigate: can I use zoomplayer max?


== DVD/DVD-realtime backlog (totally unordered, some very low prio, basically all never do) == == DVD/DVD-realtime backlog (totally unordered, some very low prio, basically all never do) ==


if it doesn't parse a file you choose it annoyingly loops *forever* "error pooping" "error pooping" [?]
"real" dvdid for blu-ray, can work with them (once I figure out timing info...) "real" dvdid for blu-ray, can work with them (once I figure out timing info...)
accept the "user inputable" profanities, based on the DVD (like "thor" or what not...) accept the "user inputable" profanities, based on the DVD (like "thor" or what not...)
can I train the ps3ms to play a real DVD, with EDL ? can I train the ps3ms to play a real DVD, with EDL ?
Expand Down
57 changes: 40 additions & 17 deletions bin/sensible-cinema
Expand Up @@ -149,25 +149,25 @@ module SensibleSwing
do_copy_dvd_to_hard_drive false do_copy_dvd_to_hard_drive false
} }


@create_new_edl_for_current_dvd = new_jbutton("Create new Delete List for a DVD", true, @create_new_edl_for_current_dvd = new_jbutton("Create new Delete List for a new DVD", true,
"If your DVD doesn't have an EDL created for it, this will be your first step--create a new EDL file for it.") "If your DVD doesn't have an EDL created for it, this will be your first step--create a new EDL file for it.")
@create_new_edl_for_current_dvd.on_clicked do @create_new_edl_for_current_dvd.on_clicked do
create_brand_new_edl create_brand_new_edl
end end


@open_list = new_jbutton("Open/Edit a Delete List", true, "If your DVD has a previously existing EDL for it, you can open it to edit it with this button.") @open_list = new_jbutton("Open/Edit a previously existing Delete List", true, "If your DVD has a previously existing EDL for it, you can open it to edit it with this button.")
@open_list.on_clicked { @open_list.on_clicked {
dialog = FileDialog.new(self, "Pick file to edit") dialog = FileDialog.new(self, "Pick file to edit")
dialog.set_directory EDL_DIR dialog.set_directory EDL_DIR
filename = dialog.go filename = dialog.go
open_file_to_edit_it filename if filename open_file_to_edit_it filename if filename
} }


@play_smplayer = new_jbutton( "Watch DVD unedited (realtime smplayer)", true) @play_smplayer = new_jbutton( "Watch full DVD unedited (realtime smplayer)", true)
@play_smplayer.tool_tip = <<-EOL @play_smplayer.tool_tip = <<-EOL
This will play the DVD unedited within smplayer. This will play the DVD unedited within smplayer.
NB it will default to track 1, so updated your EDL file that matches this DVD with the proper track if this doesn't work for you NB it will default to title 1, so updated your EDL file that matches this DVD with the proper title if this doesn't work for you
i.e. if it just plays a single preview track or what not, and not the main title, you need to change this value. i.e. if it just plays a single preview title or what not, and not the main title, you need to change this value.
This is useful if you want to just kind of watch the movie to enjoy it, and look for scenes to cut out. This is useful if you want to just kind of watch the movie to enjoy it, and look for scenes to cut out.
You can use the built-in OSD (on-screen-display) to see what time frame the questionable scenes are at You can use the built-in OSD (on-screen-display) to see what time frame the questionable scenes are at
(type "o" to toggle it). However, just realize that the OSD is in 30 fps, and our time stamps are all in 29.97 (type "o" to toggle it). However, just realize that the OSD is in 30 fps, and our time stamps are all in 29.97
Expand All @@ -177,7 +177,7 @@ module SensibleSwing
play_dvd_smplayer_unedited play_dvd_smplayer_unedited
} }


@play_mplayer_raw = new_jbutton( "Watch DVD unedited (realtime mplayer)", true) @play_mplayer_raw = new_jbutton( "Watch full DVD unedited (realtime mplayer)", true)
@play_mplayer_raw.tool_tip = <<-EOL @play_mplayer_raw.tool_tip = <<-EOL
This is also useful for comparing subtitle files to see This is also useful for comparing subtitle files to see
if they have accurate timings. if they have accurate timings.
Expand Down Expand Up @@ -209,7 +209,7 @@ module SensibleSwing
do_copy_dvd_to_hard_drive true, false, true do_copy_dvd_to_hard_drive true, false, true
} }


@rerun_preview = new_jbutton( "Re-run most recently watched file preview time frame", true ) @rerun_preview = new_jbutton( "Re-run most recently watched preview time frame", true )
@rerun_preview.tool_tip = "This will re-run the preview that you most recently performed. Great for checking to see if you last edits were successful or not." @rerun_preview.tool_tip = "This will re-run the preview that you most recently performed. Great for checking to see if you last edits were successful or not."
@rerun_preview.on_clicked { @rerun_preview.on_clicked {
repeat_last_copy_dvd_to_hard_drive repeat_last_copy_dvd_to_hard_drive
Expand Down Expand Up @@ -298,6 +298,7 @@ module SensibleSwing
@exit.on_clicked { @exit.on_clicked {
Thread.new { self.close } # don't waste the time to close it :P Thread.new { self.close } # don't waste the time to close it :P
kill_processes kill_processes
puts 'Thank you for using Sensible Cinema.'
java.lang.System.exit 0 java.lang.System.exit 0
} }


Expand Down Expand Up @@ -687,7 +688,7 @@ module SensibleSwing
@_get_import_from_filename ||= @_get_import_from_filename ||=
begin begin
file_from_chooser = new_filechooser Storage['get_import_from_filename_dir'] file_from_chooser = new_filechooser Storage['get_import_from_filename_dir']
file_from_chooser.set_title "Please choose the file that is your ripped version of #{dvd_title} title ##{dvd_title_track} (.mpg or .ts--see README)" file_from_chooser.set_title "Please choose the file that is your ripped version of #{dvd_title} title ##{dvd_title_track} (.mpg or .ts--see how_to_use.txt)"
outgoing = file_from_chooser.go outgoing = file_from_chooser.go
Storage['get_import_from_filename_dir'] = File.dirname(outgoing) Storage['get_import_from_filename_dir'] = File.dirname(outgoing)
outgoing outgoing
Expand Down Expand Up @@ -727,8 +728,14 @@ module SensibleSwing
# LODO allow for spaces in the save_to filename # LODO allow for spaces in the save_to filename
if should_prompt_for_start_and_end_times if should_prompt_for_start_and_end_times
# only show this message once :) # only show this message once :)
@show_block ||= 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 a deleted section 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 a long time (like an hour) as it sets up the video for previewing.\nSubsequent previews will be faster, though, as long as you use the same filename.\n @show_block ||= show_blocking_message_dialog(<<-EOL, "Preview")
Also note that if you change your delete list, you'll need to close, and regenerate the video to see it with your new settings.", "Preview") Ok, let's preview just a portion of it.
Note that you'll want to preview a section that wholly includes a deleted section in it.
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.
Also note that the first time you preview a section of a video, it will take a long time (like an hour) as it sets up the entire video for processing.
Subsequent previews will be faster, though, as long as you use the same filename, as it won't have to re-set it up for processing.
Also note that if you change your delete list, you'll need to close, and restart the video to be able to see it with your new settings.
EOL
old_start = Storage['start_time'] old_start = Storage['start_time']
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']) 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'])
default_end = Storage['end_time'] default_end = Storage['end_time']
Expand All @@ -752,7 +759,7 @@ module SensibleSwing
save_to_edited = get_save_to_filename dvd_friendly_name save_to_edited = get_save_to_filename dvd_friendly_name
fulli = MencoderWrapper.calculate_fulli_filename save_to_edited fulli = MencoderWrapper.calculate_fulli_filename save_to_edited
if exit_early_if_fulli_exists if exit_early_if_fulli_exists
if File.exist? fulli + ".done" if fulli_dot_done_file_exists
return [true, fulli] return [true, fulli]
end end
# make it create a dummy response file for us :) # make it create a dummy response file for us :)
Expand All @@ -770,6 +777,11 @@ module SensibleSwing
DriveInfo.get_drive_with_most_space_with_slash DriveInfo.get_drive_with_most_space_with_slash
end end


def fulli_dot_done_file_exists? save_to_edited
fulli = MencoderWrapper.calculate_fulli_filename save_to_edited
File.exist?(fulli + ".done") # stinky!
end

# to make it stubbable :) # to make it stubbable :)
def get_mencoder_commands descriptors, file_from, save_to, start_time, end_time, dvd_title_track, require_deletion_entry def get_mencoder_commands descriptors, file_from, save_to, start_time, end_time, dvd_title_track, require_deletion_entry
delete_partials = true unless start_time # in case anybody wants to look really really close [?] delete_partials = true unless start_time # in case anybody wants to look really really close [?]
Expand All @@ -790,15 +802,23 @@ module SensibleSwing
temp_dir = Dir.tmpdir temp_dir = Dir.tmpdir
temp_file = temp_dir + '/vlc.temp.bat' temp_file = temp_dir + '/vlc.temp.bat'
File.write(temp_file, commands) File.write(temp_file, commands)
popup = show_non_blocking_message_dialog(<<-EOL, "OK") popup_message = <<-EOL
Applying #{File.basename edit_list_path} Applying #{File.basename edit_list_path}
to #{file_from} (#{dvd_title}). to #{file_from} (#{dvd_title}).
Copying to #{save_to}. Copying to #{save_to}.
This could take quite awhile, and will prompt you and chime a noise when it is done.
You can close this window and continue working while it runs in the background.
NB that the created file will be playable only with VLC (possibly with smplayer, possibly with
Windows Media Player if you install ffdshow first with mpeg2 video checkbox checked).
EOL EOL
if !fulli_dot_done_file_exists save_to
popup_message += "This could take quite awhile (several hours), and will prompt you with a chime noise when it is done.\n
You can close this window and minimize sensible cinema and continue using your computer while it runs in the background."
end

if !start_time
# assume a full run..
popup_message += "\nNB that the created file will be playable only with VLC (possibly also with smplayer), but probably not with windows media player."
end


popup = show_non_blocking_message_dialog(popup_message, "OK")


# allow our popups to still be serviced while it is running # allow our popups to still be serviced while it is running
@background_thread = Thread.new { @background_thread = Thread.new {
Expand Down Expand Up @@ -836,7 +856,10 @@ module SensibleSwing
system_non_blocking "smplayer_portable #{saved_to}" system_non_blocking "smplayer_portable #{saved_to}"
else else
show_file = "explorer /e,/select,\"#{File.expand_path(saved_to).to_filename}\"" show_file = "explorer /e,/select,\"#{File.expand_path(saved_to).to_filename}\""
system_blocking show_file # returns immediately begin
system_blocking show_file # returns immediately tho...
rescue => why_does_this_happen_ignore_this_exception_it_actually_succeeded
end
PlayAudio.play(File.expand_path(File.dirname(__FILE__)) + "/../vendor/music.wav") PlayAudio.play(File.expand_path(File.dirname(__FILE__)) + "/../vendor/music.wav")
show_blocking_message_dialog "Done--you may now watch file\n #{saved_to}\n in VLC player (or possibly smplayer)" show_blocking_message_dialog "Done--you may now watch file\n #{saved_to}\n in VLC player (or possibly smplayer)"
end end
Expand Down

0 comments on commit a5bdf31

Please sign in to comment.