@codenoobforreal/clitools
Version:
CLI tool for video processing (H.265/HEVC encoding & QuickTime compatibility) using FFmpeg, and batch lossless image compression with format preservation
9 lines • 332 B
JavaScript
export function convertBitrateToMbps(bitrate) {
const mbps = bitrate / 1e6;
const rounded = Math.round(mbps * 100) / 100;
const stringValue = rounded.toFixed(2);
return stringValue.endsWith(".00")
? parseInt(stringValue, 10)
: parseFloat(stringValue);
}
//# sourceMappingURL=bitrate-conversion.js.map