I have a few things about the headless gem and video recording.
How can I hide the mouse cursor?
In method stop_and_save in VideoRecorder class good option is add mkdir_p before mv
def stop_and_save(path)
Recorder::CliUtil.kill_process(@pid_file_path, :wait => true)
if File.exists? @tmp_file_path
begin
**FileUtils.mkdir_p(File.dirname(path))**
FileUtils.mv(@tmp_file_path, path)
rescue Errno::EINVAL
nil
end
end
end
what do you think?
In method command_line_for_capture in VideoRecorder class is a small bug:
Good idea is add something like post_processing_video method or yield that will be triggered in method stop_and_save before FileUtils.mv(@tmp_file_path, path) command. For instance:
def stop_and_save(path, &block)
Recorder::CliUtil.kill_process(@pid_file_path, :wait => true)
if File.exists? @tmp_file_path
begin
FileUtils.mkdir_p(File.dirname(path))
yield(@tmp_file_path) if block_given?
FileUtils.mv(@tmp_file_path, path)
rescue Errno::EINVAL
nil
end
end
end
This solution will be very helpful for add watermark or other operation after recording.
What do you think?
Last one question: how can I stop recording from bash or external script if I know screen number?
Hello,
I have a few things about the headless gem and video recording.
what do you think?
Before (look on @devices position in array):
After:
Could you fix it?
FileUtils.mv(@tmp_file_path, path)
command. For instance:This solution will be very helpful for add watermark or other operation after recording. What do you think?
Best Regards Peter