diff options
author | Filipp Lepalaan <f@230.to> | 2014-05-12 17:26:21 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2014-05-12 17:26:21 +0300 |
commit | 0360a58ccea8a3aad40b432a8fa57f81af149409 (patch) | |
tree | 9b659d0fc82acb5cc06ab080c0b9bd695477d485 /retrospect.rb | |
download | Retrospect-0360a58ccea8a3aad40b432a8fa57f81af149409.tar.gz Retrospect-0360a58ccea8a3aad40b432a8fa57f81af149409.tar.bz2 Retrospect-0360a58ccea8a3aad40b432a8fa57f81af149409.zip |
Initial commit
Diffstat (limited to 'retrospect.rb')
-rw-r--r-- | retrospect.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/retrospect.rb b/retrospect.rb new file mode 100644 index 0000000..783037f --- /dev/null +++ b/retrospect.rb @@ -0,0 +1,17 @@ +SECONDS = 10 +OUTPUT = "/tmp/movie.mov" +BASEDIR = File.dirname(File.realpath(__FILE__)) + +trap(:ALRM) { + fork do + system "#{BASEDIR}/ffmpeg", '-y', '-i', "/tmp/img_%d.jpg", OUTPUT + system "/usr/bin/open", OUTPUT + end +} + +i = 0 +while true do + system "/usr/sbin/screencapture", '-t', 'jpg', "/tmp/img_#{i}.jpg" + i = i + 1 + sleep 1 +end |