Skip to content

Commit

Permalink
Add better estimates for 2 pass hb encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
HaveAGitGat committed Nov 8, 2023
1 parent ce4f069 commit f73157e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FlowPlugins/FlowHelpers/1.0.0/cliParsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ var handbrakeParser = function (_a) {
percentage = outputNum;
}
}
if (str.includes('task 1 of 2')) {
percentage /= 2;
}
else if (str.includes('task 2 of 2')) {
percentage = 50 + (percentage / 2);
}
return percentage;
};
exports.handbrakeParser = handbrakeParser;
Expand Down
6 changes: 6 additions & 0 deletions FlowPluginsTs/FlowHelpers/1.0.0/cliParsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ const handbrakeParser = ({
}
}

if (str.includes('task 1 of 2')) {
percentage /= 2;
} else if (str.includes('task 2 of 2')) {
percentage = 50 + (percentage / 2);
}

return percentage;
};

Expand Down

0 comments on commit f73157e

Please sign in to comment.