Commit 1ff33395 authored by rzumer's avatar rzumer Committed by Thomas Daede

Improve frame rate accuracy in CLI output

parent 0ed74d9f
......@@ -341,8 +341,8 @@ impl ProgressInfo {
}
pub fn encoding_fps(&self) -> f64 {
let seconds = Instant::now().duration_since(self.time_started).as_secs();
self.frame_info.len() as f64 / seconds as f64
let duration = Instant::now().duration_since(self.time_started);
self.frame_info.len() as f64 / (duration.as_secs() as f64 + duration.subsec_millis() as f64 / 1000f64)
}
pub fn video_fps(&self) -> f64 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment