remove -framerate 999, use default 25fps then re-encode with actual rate

This commit is contained in:
2026-05-30 01:28:31 +03:00
parent 5d312b6b00
commit 8b91028a42
-5
View File
@@ -73,10 +73,6 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
// correct. The fps filter in the export pipeline handles the conversion. // correct. The fps filter in the export pipeline handles the conversion.
tracing::info!("capture: size={}x{}", setup.width, setup.height); 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); let mut cmd = Command::new(&setup.ffmpeg_path);
cmd.arg("-y") cmd.arg("-y")
.arg("-hide_banner") .arg("-hide_banner")
@@ -84,7 +80,6 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
.args(["-f", "rawvideo"]) .args(["-f", "rawvideo"])
.args(["-pixel_format", "bgra"]) .args(["-pixel_format", "bgra"])
.args(["-video_size", &format!("{}x{}", setup.width, setup.height)]) .args(["-video_size", &format!("{}x{}", setup.width, setup.height)])
.args(["-framerate", &declared_fps.to_string()])
.args(["-i", "-"]) .args(["-i", "-"])
.args(["-vf", &filter]) .args(["-vf", &filter])
.args(["-c:v", "libx264"]) .args(["-c:v", "libx264"])