Closed aaron-humerickhouse closed 4 years ago
Hey @aaron-humerickhouse, thanks for the detailed bug report. The logs are showing that ffmpeg
is failing to stop normally for some reason. As a result, the gem is force killing it to avoid having a zombie process. This ultimately is causing the unplayable video.
2019-10-30 18:04:14 ScreenRecorder - ERROR - FFmpeg failed to stop. Force killing it...
2019-10-30 18:04:17 ScreenRecorder - ERROR - Check 'ffmpeg.log' for more information.
Now we need to figure out why ffmpeg
is not stopping normally, and for that I looked at the ffmpeg.log
and found out that the input stream is being captured at 1000k fps for some reason. Let's initialize the recorder with an input FPS and see if that fixes the problem:
advanced = { input: { framerate: 15 } }
out_file = "spec/artifacts/recordings/#{recording_name}"
@recorder = ScreenRecorder::Desktop.new(output: out_file, advanced: advanced)
Also, are you using the latest version of this gem?
@aaron-humerickhouse I was able to reproduce and actually fix the issue by passing vsync 0
for the input on macOS:
advanced = { input: { vsync: 0 } }
out_file = "spec/artifacts/recordings/#{recording_name}"
@recorder = ScreenRecorder::Desktop.new(output: out_file, advanced: advanced)
Feel free to reopen this issue if that doesn't work for you.
Summary
My video file saves and is persisted. When I try to open it, it cannot be played.
Debug Info
Please provide the following information for bug reports:
output: filename.mp4
ffmpeg.log
)- https://gist.github.com/aaron-humerickhouse/bc62215dd70a7e70a21bc8fb5d674388ScreenRecorder.logger.level = Logger::DEBUG
- https://gist.github.com/aaron-humerickhouse/79899bc3f63ae3e25f89e355dc3979e2Expected Behavior
Recording to stop appropriately. Able to watch the video
Actual Behavior
Recording fails to stop. Unable to watch the video