Skip to content

Commit

Permalink
fix: calculation of remaining time
Browse files Browse the repository at this point in the history
  • Loading branch information
kukhariev committed Aug 22, 2024
1 parent 835d4e6 commit 5e59ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ffprogress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function parseProgress(data: string, duration?: number): FfmpegProgressEv

if (duration) {
evt.percentage = +((100 * evt.time_ms) / duration).toFixed(2);
evt.remaining = Math.floor((duration - evt.time_ms) * evt.speed);
evt.remaining = Math.floor((duration - evt.time_ms) / evt.speed);
}
return evt;
}
Expand Down

0 comments on commit 5e59ef6

Please sign in to comment.