Permalink
Browse files

Merge branch 'master' of github.com:leonid-shevtsov/headless

  • Loading branch information...
2 parents 7a13097 + f176796 commit 2e883c19b136edaefac8106d8d48f52ba29eec27 @leonid-shevtsov committed Oct 8, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/headless/video/video_recorder.rb
@@ -14,14 +14,15 @@ def initialize(display, dimensions, options = {})
@tmp_file_path = options.fetch(:tmp_file_path, "/tmp/.headless_ffmpeg_#{@display}.mov")
@log_file_path = options.fetch(:log_file_path, "/dev/null")
@codec = options.fetch(:codec, "qtrle")
+ @frame_rate = options.fetch(:frame_rate, 30)
end
def capture_running?
CliUtil.read_pid @pid_file_path
end
def start_capture
- CliUtil.fork_process("#{CliUtil.path_to('ffmpeg')} -y -r 30 -g 600 -s #{@dimensions} -f x11grab -i :#{@display} -vcodec #{@codec} #{@tmp_file_path}", @pid_file_path, @log_file_path)
+ CliUtil.fork_process("#{CliUtil.path_to('ffmpeg')} -y -r #{@frame_rate} -g 600 -s #{@dimensions} -f x11grab -i :#{@display} -vcodec #{@codec} #{@tmp_file_path}", @pid_file_path, @log_file_path)
at_exit do
exit_status = $!.status if $!.is_a?(SystemExit)
stop_and_discard

0 comments on commit 2e883c1

Please sign in to comment.