restore -framerate 120 for capture, fix_intermediate_fps corrects after
This commit is contained in:
@@ -73,6 +73,11 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
|
||||
// correct. The fps filter in the export pipeline handles the conversion.
|
||||
tracing::info!("capture: size={}x{}", setup.width, setup.height);
|
||||
|
||||
// Declare a high-ish framerate so ffmpeg accepts all frames from the pipe.
|
||||
// The actual delivery rate varies; fix_intermediate_fps re-encodes with
|
||||
// the measured rate after capture.
|
||||
let capture_fps = 120u32;
|
||||
|
||||
let mut cmd = Command::new(&setup.ffmpeg_path);
|
||||
cmd.arg("-y")
|
||||
.arg("-hide_banner")
|
||||
@@ -80,6 +85,7 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
|
||||
.args(["-f", "rawvideo"])
|
||||
.args(["-pixel_format", "bgra"])
|
||||
.args(["-video_size", &format!("{}x{}", setup.width, setup.height)])
|
||||
.args(["-framerate", &capture_fps.to_string()])
|
||||
.args(["-i", "-"])
|
||||
.args(["-vf", &filter])
|
||||
.args(["-c:v", "libx264"])
|
||||
|
||||
Reference in New Issue
Block a user