remove -framerate 999, use default 25fps then re-encode with actual rate
This commit is contained in:
@@ -73,10 +73,6 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
|
||||
// correct. The fps filter in the export pipeline handles the conversion.
|
||||
tracing::info!("capture: size={}x{}", setup.width, setup.height);
|
||||
|
||||
// Use a high declared framerate to accept all frames without dropping.
|
||||
// We'll measure the actual delivery rate and re-encode after capture.
|
||||
let declared_fps = 999u32;
|
||||
|
||||
let mut cmd = Command::new(&setup.ffmpeg_path);
|
||||
cmd.arg("-y")
|
||||
.arg("-hide_banner")
|
||||
@@ -84,7 +80,6 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
|
||||
.args(["-f", "rawvideo"])
|
||||
.args(["-pixel_format", "bgra"])
|
||||
.args(["-video_size", &format!("{}x{}", setup.width, setup.height)])
|
||||
.args(["-framerate", &declared_fps.to_string()])
|
||||
.args(["-i", "-"])
|
||||
.args(["-vf", &filter])
|
||||
.args(["-c:v", "libx264"])
|
||||
|
||||
Reference in New Issue
Block a user