© 2009 Zachary McCune notes_on_a_dvd

Notes on a DVD

I have long believed that film students and critics need a real (or reel if you will exuse the pun) tool for critically annotating film. Now that DVD technology has advanced enough, I imagined a program or even a simple plugin that would enable movie viewers to take notes on a film.

The program would work simply enough. While watching a DVD, a user would hit a hot key (or key combination) to create an annotation. The DVD playback would then pause and a screenshot would be taken of the current frame. The screenshot would be loaded into a Text (or Word or Open Office or whatever) document, and the document would caption the image with the elapsed time of the film at the moment of the capture. Then, the user would be free to write whatever notes he/she chose, and continue along with the film. If another operative moment were to come along, then the next screenshot and note would simply be added to the existing file rather that start a new one. The text file would be saved with the film’s name and the date of the screening automatically. It would be an annotated digest of the film.

Once again this program would work by:

  1. pausing film
  2. taking a screenshot
  3. opening a text editor
  4. importing the screenshot
  5. importing the film’s elapsed time
  6. allowing for user note composition
  7. automatically save the file as the film’s name and date of screening (i.e. Godfather_3_20_2009.txt)
  8. allow for multiple notes in the same file

And that’s that.

Implementation

So I’ve been trying to make this a reality, and it’s proven quite difficult. The first problem is that I am rather forced to use applescript, because of its ease of use with multiple programs, rather than something more powerful like java. For those who have never used applescript, it’s a bit like programming for dummies, and while it is cool (and works with practically everything) it has exposed all sorts of short comings in my favorite programs (like why does VLC not have an elapsed time function?). The other problem I have run into is the screenshot component of the program which is not allowed if I play my DVDs through DVD Player, thereby forcing the use of VLC, which (as stated earlier) has a WEAK applescript library.

So here’s my code for now, hopefully more to come, although at current it still makes more sense for me to do this manually then struggle with this programming.

property el : 0
tell application “VLC”
play
end tell

property N : 0
set N to N + 1
set picPath to ((POSIX path of (path to desktop)) & “Cinema_” & N & “.png”) as string
do shell script “screencapture -tjpg ” & quoted form of picPath

tell application “TextEdit”
make new document
end tell

or for the DVD Player (screen capture doesn’t work)

property el : 0
tell application “DVD Player”
pause dvd
end tell

property N : 0
set N to N + 1
set picPath to ((POSIX path of (path to desktop)) & “Cinema_” & N & “.png”) as string
do shell script “screencapture -tjpg ” & quoted form of picPath

tell application “DVD Player”
set el to elapsed time
end tell

tell application “TextEdit”
make new document
set timeCode to “Note Taken at: ” & el & return
set the text of the front document to timeCode
end tell

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>