Skip to content

Commit

Permalink
Hardcode output video path.
Browse files Browse the repository at this point in the history
  • Loading branch information
iafonov committed Aug 17, 2011
1 parent 65dc1db commit 824f3f7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/headless/video/video_recorder.rb
Expand Up @@ -11,19 +11,16 @@ def initialize(display, dimensions, options = {})
end

def start
@output_file = Tempfile.new("video_recorder")
@output_file.close
CliUtil.fork_process("ffmpeg -y -r 30 -g 600 -s #{@dimensions} -f x11grab -i :#{@display} -vcodec qtrle #{@output_file.path}", @pid_file)
CliUtil.fork_process("ffmpeg -y -r 30 -g 600 -s #{@dimensions} -f x11grab -i :#{@display} -vcodec qtrle /tmp/ci.mov", @pid_file)
end

def stop_and_save(path)
CliUtil.kill_process(@pid_file)
FileUtils.cp @output_file.path, path
@output_file.unlink
FileUtils.cp("/tmp/ci.mov", path)
end

def stop_and_clear
CliUtil.kill_process(@pid_file)
@output_file.unlink
FileUtils.rm("/tmp/ci.mov")
end
end

0 comments on commit 824f3f7

Please sign in to comment.