A feature I really miss from having a DVR is the ‘8 seconds back’ button, to catch a play or repeat something funny.
Recently I’ve been listening to recorded interviews we’ve been doing of HPC developers, and updating my notes (in VoodooPad using them. Since people mumble and use jargon I don’t always understand, I decided I really needed an instant replay button in QuickTime Player. It’ll come in handy if I watch sports on my laptop again, too.
In order to get it, I wrote this quick AppleScript and bound it to a Quicksilver trigger. If you run it while the movie is playing, it backs up 4 seconds and keeps playing from there.
-- 4secondsback.scpt
tell application "QuickTime Player"
set theMovie to movie 1
set ctime to current time of theMovie
set tscale to time scale of theMovie
set current time of theMovie to ctime - (4 * tscale)
end tell
Update: I just realized that for transcribing interviews I also needed a ‘play/pause’ command that could control QuickTime Player while keeping it in the background, just as the 4secondsback script does. It’s a really simple script, but since QuickTime Player lacks the convenient ‘playpause’ command that iTunes’s scripting dictionary has, I had to do this:
tell application "QuickTime Player"
if movie 1 is playing then
pause movie 1
else
play movie 1
end if
end tell
I have this set as a trigger for Control-Option-Space, and the 4secondsback script is control-option-’b’. This way I can listen, type, and control the recordings without leaving VoodooPad. Brilliant!
michael-mccracken.net » Script Dictionary Documentation 1:16 pm on August 1, 2006 Permalink
[...] In relation to my previous post about instant replay in QuickTime Player – The script dictionary almost looks like a program wrote the documentation. For example: [...]
rentzsch 8:09 pm on August 1, 2006 Permalink
4secondsback.scpt is a bit wordy? I know, I know, even by AS standards. This works too:
tell application “QuickTime Player” tell movie 1 set current time to current time – (4 * time scale) end tell end tell
Didn’t notice
time scalebefore — here I’ve been using the raw 600 “ticks” per second in my scripts. Thanks!Administrator 8:32 pm on August 1, 2006 Permalink
Hey, I forgot that you could use something that wasn’t an application as the target of a ‘tell’ block… good point.
Really, most of my applescripts are super wordy, because almost without fail, the first attempt I make fails, and they get excessively verbose while trying various versions of what ’should work’ to debug the script – invariably, the final working script is half the size of the largest intermediate and could probably stand to be shortened significantly even so.
In order to protect my ego, I consider this to be a failing of AppleScript and its poor error messages and debugging support…
Tobias 4:34 am on August 2, 2006 Permalink
http://www.inquirium.net/products/inqscribe/ is specifically made for this, but at 1.5.2 still only beta quality. You gave me courage to try replicating timestamp-jumping in AppleScript, using QT and some text editor.
Administrator 11:33 am on August 2, 2006 Permalink
Inqscribe looks really handy, but good lord – $70?!
Good luck with your scripting, Tobias!
Silks 4:14 pm on August 8, 2006 Permalink
is there a way to use this script without installing QS? i’d really rather not install it. thanks.
Administrator 4:21 pm on August 8, 2006 Permalink
Silks: I’m not sure why you wouldn’t want to install QuickSilver, but aside from that, all this script needs is to be run. You can save it as an application in Script Editor and run it like that.
You can double click it, maybe put it in your dock, or find any number of other hotkey programs instead of QuickSilver to use it with instead.
Net Crap (8/12) at Musings of a Chicagoan 12:20 am on August 12, 2006 Permalink
[...] Instant replay in QuickTime Player: “A feature I really miss from having a DVR is the ‘8 seconds back’ button, to catch a play or repeat something funny.” (tags: useful reference macintosh) [...]
Domain of the Bored » Blog Archive » Instant replay in iTunes 3:09 pm on December 1, 2006 Permalink
[...] While flipping through Michael McCracken’s blog, I found his blog post about his instant replay in QuickTime Player script, and decided that that would be a good thing to have in iTunes (especially when I want to quote some George Carlin to somebody). [...]
Goodtime 11:46 am on March 28, 2008 Permalink
Nice job on this script. I might implement something lik this in a QT based version of StarPlayr.
gt :-)
Goodtime 11:50 am on March 28, 2008 Permalink
By the way,
This might the least wordiest version of this script:
tell document 1 of application “QuickTime Player” set current time to current time – (4 * time scale) end tell
You can combine the tell into one statement instead of two.
Here is one more variation:
tell document 1 of application “QuickTime Player” to ¬ set current time to current time – (4 * time scale)